Skip to content

.Net Enhancement for Mistral: Make property safe_prompt optional #12629

Closed
@MarcusKohnert

Description

@MarcusKohnert

Package used: Microsoft.SemanticKernel.Connectors.MistralAI
Version: 1.58.0-alpha

Context:

Mistral has a specific property safe_prompt in it's chat completions request schema.

I'm using an LLM serving service that is very restrictive and forbids non-standard properties in requests send to it. So when the request body contains a safe_prompt property the request is rejected with 400 Bad Request.

Enhancement:

Would it be possible to make safe_prompt nullable to make it configurable for clients and enable them to not send the property. I've prepared a commit here.

safe_prompt defaults to false anyways. So if it is not send in the request body, it default to false on the server side.

I would be then able to exclude the property from a request like this:

executionSettings: new MistralAIPromptExecutionSettings
{
    SafePrompt = null
});

Thank you

Metadata

Metadata

Labels

.NETIssue or Pull requests regarding .NET code

Type

Projects

Status

Community PRs

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions