semantic-kernel
semantic-kernel copied to clipboard
Bug: iOS - Content is null - 400 error
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:
- In Maui iOS call InvokePromptAsync/GetChatMessageContentsAsync/GetStreamingChatMessageContentsAsync
- See error
Expected behavior Can call these methods with no error
Platform
- OS: iOS
- IDE: Visual Studio
- Language: C#
- Source: NuGet package version 1.15.1