Added tool calling support (#731)

Co-authored-by: krut_ni <nils.kruthoff@dlr.de>
Co-authored-by: Thorsten Sommer <SommerEngineering@users.noreply.github.com>
This commit is contained in:
authored and GitHub committed 2026-09-04 15:48:07 +02:00
1 parent b00c3f9ab3
commit 4d8d30e15e
266 files changed
+11186 -740

No files matched your search

@@ -0,0 +1,3 @@
namespace AIStudio.Provider.Mistral;
public readonly record struct Model(string Id, string Object, int Created, string OwnedBy);
@@ -1,5 +1,3 @@
namespace AIStudio.Provider.Mistral;
public readonly record struct ModelsResponse(string Object, Model[] Data);
public readonly record struct Model(string Id, string Object, int Created, string OwnedBy);
public readonly record struct ModelsResponse(string Object, Model[] Data);
@@ -29,7 +29,7 @@ public sealed class ProviderMistral() : BaseProvider(LLMProviders.MISTRAL, new U
chatModel,
chatThread,
settingsManager,
async (systemPrompt, apiParameters) =>
async (systemPrompt, apiParameters, tools) =>
{
if (TryPopBoolParameter(apiParameters, "safe_prompt", out var parsedSafePrompt))
apiParameters["safe_prompt"] = parsedSafePrompt;
@@ -51,6 +51,7 @@ public sealed class ProviderMistral() : BaseProvider(LLMProviders.MISTRAL, new U
// Right now, we only support streaming completions:
Stream = true,
Tools = tools,
AdditionalApiParameters = apiParameters
};
},
@@ -138,7 +139,6 @@ public sealed class ProviderMistral() : BaseProvider(LLMProviders.MISTRAL, new U
storeType,
"models",
modelResponse => modelResponse.Data.Select(n => new Provider.Model(n.Id, null)),
token,
apiKeyProvisional);
apiKeyProvisional, token: token);
}
}
}