Dec 20 2023 06:28 AM - edited Dec 20 2023 06:32 AM
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
Dec 26 2023 10:47 AM
Use version beta 9 instead of 12 and it will work. In the new version 12, they somehow removed this method. I ran through same problem and fixed when used 9.
Use below:
"dotnet add package Azure.AI.OpenAI --version 1.0.0-beta.9"