-
Notifications
You must be signed in to change notification settings - Fork 3.7k
.NET: Bug: extra-parameters
needed in HttpClient for Mistral
#11634
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
Comments
extra-parameters
needed in HttpClient for Mistralextra-parameters
needed in HttpClient for Mistral
extra-parameters
needed in HttpClient for Mistralextra-parameters
needed in HttpClient for Mistral
extra-parameters
needed in HttpClient for Mistralextra-parameters
needed in HttpClient for Mistral
The Mistral endpoint I am using is serverless, alike the Python LangChain user from the Microsoft Q+A linked above |
Hi @RogerBarreto / @westey-m, I have raised PR to fix this. Will monitor for the green build. :) |
I have exactly the same setup and error, but my Mistral Chat Completion service is not accepting public static IServiceCollection AddMistralChatCompletion(
this IServiceCollection services,
string modelId,
string apiKey,
Uri? endpoint = null,
string? serviceId = null)
{
Verify.NotNull(services);
return services.AddKeyedSingleton<IChatCompletionService>(serviceId, (serviceProvider, _) =>
new MistralAIChatCompletionService(modelId, apiKey, endpoint, HttpClientProvider.GetHttpClient(serviceProvider)));
} What am I missing? |
@donatas-xyz, If you don't have one registered it will create a new HttpClient without the header setting. Without the header setting you may see the same error. The PR #11646 will fix this. |
Describe the bug
I am getting a 400 bad request exception for Mistral chat completions when I don't specify an
HttpClient
with the following headerExpected behavior
A clear and concise description of what you expected to happen.
To Reproduce
Run reproducer code
https://github.com/williambohrmann3/SemanticKernelMistralBug/blob/master/Program.cs
Expected behavior
The
HttpRequest
parameter is marked as optional, so this header shouldn't be required. It should "just work".Platform
Additional context
Interestingly, Python devs using the Mistral connector for LangChain are getting the same error message.
https://learn.microsoft.com/en-us/answers/questions/2117664/my-mistral-large-2407-serverless-deployment-api-is
https://learn.microsoft.com/en-us/answers/questions/2113323/((detail-extra-parameters-(safe-prompt)-are-not-al
Deep in the stack trace, after enabling language runtime exceptions, my colleague found the following error
The text was updated successfully, but these errors were encountered: