-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: iOS - Content is null - 400 error #7221
Comments
Hi @jerry2007 and thanks for filing this issue. Would you be able to share a snippet of the code that replicates this issue for us? |
` _history.AddUserMessage(question); var answer = ""; this code crash on line with foreach.... |
this is related: |
I found out that downgrade nuget Azure.AI.OpneAI to version 1.0.0-beta.15 in semnatic kernel project Connectors.OpenAI works correctly. |
Unfortunately, this issue not resolved in the latest versions. We use Structured Outputs which is not supported in earlier versions. :( |
Describe the bug
When I call one of method InvokePromptAsync/GetChatMessageContentsAsync/GetStreamingChatMessageContentsAsync on iOS. The error is raised.
Microsoft.SemanticKernel.HttpOperationException
Invalid value for 'content': expected a string, got null.
Status: 400 (model_error)
Content:
{
"error": {
"message": "Invalid value for 'content': expected a string, got null.",
"type": "invalid_request_error",
"param": "messages.[0].content",
"code": null
}
}
Headers:
x-ms-region: REDACTED
apim-request-id: REDACTED
x-ratelimit-remaining-requests: REDACTED
x-ms-rai-invoked: REDACTED
X-Request-ID: REDACTED
ms-azureml-model-error-reason: REDACTED
ms-azureml-model-error-statuscode: REDACTED
Strict-Transport-Security: REDACTED
azureml-model-session: REDACTED
X-Content-Type-Options: REDACTED
x-envoy-upstream-service-time: REDACTED
x-ms-client-request-id: 7f2d2543-dde4-45fc-87c3-934a33753cee
x-ratelimit-remaining-tokens: REDACTED
Date: Fri, 12 Jul 2024 07:42:46 GMT
Content-Length: 187
Content-Type: application/json
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Can call these methods with no error
Platform
The text was updated successfully, but these errors were encountered: