Open mawcc opened 7 months ago
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @jpalvarezl @trrwilson.
did you find any solution for your problem? Iam facing the same
I think what helped in my case was to also specify a ChatRequestUserMessage, e.g.
Messages =
{
new ChatRequestSystemMessage("..."),
new ChatRequestUserMessage("...")
},
Library name and version
Azure.AI.OpenAI 1.0.0-beta.15
Describe the bug
Trying to use OpenAIClient together with AI Search doesn't seem to work. OpenAIClient by itself works. SearchIndexClient by itself works, too. So the API Keys are correct. Also, using the this combination in Azure AI Studio works.
But combining them using the code below results in Service request failed. Status: 400 (Bad Request)
Expected behavior
Results should be produced based on the LLM and the data stored in the search index.
Actual behavior
`Azure.RequestFailedException: 'Service request failed. Status: 400 (Bad Request)
Content: {"error": {"requestid": "44ca8dc6-da5a-4330-ab3e-e219a9185bc6", "code": 400, "message": "Invalid message request body. Learn how to use Completions extension API, please refer to https://learn.microsoft.com/azure/ai-services/openai/reference#completions-extensions"}}`
Reproduction Steps
Create C# Console App using this code:
Environment