Skip to content

Microsoft.SemanticKernel.HttpOperationException when using MistralAIChatCompletionService #6

Open
@TRybina132

Description

@TRybina132

Describe the bug
I'm using latest version 1.5.0 of mistral connector for semantic kernel and methods GetStreamingChatMessageContentsAsync, GetChatMessageContentAsync from MistralAIChatCompletionService
I receive this exception(in previous version there was no exception):

Microsoft.SemanticKernel.HttpOperationException: Unprocessable Entity
---> System.Net.Http.HttpRequestException: Exception of type 'System.Net.Http.HttpRequestException' was thrown.
--- End of inner exception stack trace ---
at Microsoft.SemanticKernel.Connectors.Mistral.MistralClientCore.CallMistralAuthedAsync(String url, StringContent content)
at Microsoft.SemanticKernel.Connectors.Mistral.MistralClientCore.CallMistralChatEndpointAsync(ChatHistory chat, MistralPromptExecutionSettings textExecutionSettings)
at Microsoft.SemanticKernel.Connectors.Mistral.MistralClientCore.GetChatMessageContentsAsync(ChatHistory chat, PromptExecutionSettings executionSettings, Kernel kernel, CancellationToken cancellationToken)
at Microsoft.SemanticKernel.ChatCompletion.ChatCompletionServiceExtensions.GetChatMessageContentAsync(IChatCompletionService chatCompletionService, ChatHistory chatHistory, PromptExecutionSettings executionSettings, Kernel kernel, CancellationToken cancellationToken)

What can it be?

To Reproduce
Here is bug reproduction repository: https://github.com/TRybina132/MistralConnectorBug

Expected behavior
No exception is thrown and method returns result.

Platform

  • OS: Windows, Mac
  • Language: C#
  • Source: NuGet package version 1.5.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions