SetSearchKey and SetEmbeddingKey return “does not contain a definition for …”
I’m currently using Azure.AI.OpenAI 1.0 beta 12, I’m using the samples provided by Microsoft however when I compile the code I get the following error
‘AzureCognitiveSearchChatExtensionConfiguration’ does not contain a definition for ‘SetSearchKey’ and no accessible extension method ‘SetSearchKey’ accepting a first argument of type ‘AzureCognitiveSearchChatExtensionConfiguration’ could be found (are you missing a using directive or an assembly reference?)
and
‘AzureCognitiveSearchChatExtensionConfiguration’ does not contain a definition for ‘SetEmbeddingKey’ and no accessible extension method ‘SetEmbeddingKey’ accepting a first argument of type ‘AzureCognitiveSearchChatExtensionConfiguration’ could be found (are you missing a using directive or an assembly reference?).
The lines of code I’m using are
I’ve checked the solution and it has the correct version of Azure.AI.OpenAI installed.
Any thoughts welcome.
Thanks
Rob Ireland
I’m currently using Azure.AI.OpenAI 1.0 beta 12, I’m using the samples provided by Microsoft however when I compile the code I get the following error’AzureCognitiveSearchChatExtensionConfiguration’ does not contain a definition for ‘SetSearchKey’ and no accessible extension method ‘SetSearchKey’ accepting a first argument of type ‘AzureCognitiveSearchChatExtensionConfiguration’ could be found (are you missing a using directive or an assembly reference?) and ‘AzureCognitiveSearchChatExtensionConfiguration’ does not contain a definition for ‘SetEmbeddingKey’ and no accessible extension method ‘SetEmbeddingKey’ accepting a first argument of type ‘AzureCognitiveSearchChatExtensionConfiguration’ could be found (are you missing a using directive or an assembly reference?). The lines of code I’m using are// Initialize the AzureCognitiveSearchChatExtensionConfigurationvar search = new AzureCognitiveSearchChatExtensionConfiguration(){ SearchEndpoint = new Uri(searchEndpoint), IndexName = searchIndexName}; // Set the SearchKeysearch.SetSearchKey(searchKey); // Set the EmbeddingKeysearch.SetEmbeddingKey(embeddingKey); I’ve checked the solution and it has the correct version of Azure.AI.OpenAI installed. Any thoughts welcome. ThanksRob Ireland Read More