mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-18 04:57:59 +00:00
Let tools tailor what they offer to each request
This commit is contained in:
12 files changed
+452
-126
No files matched your search
@@ -86,8 +86,13 @@ public sealed class ProviderAnthropic() : BaseProvider(LLMProviders.ANTHROPIC, n
|
||||
var providerSettings = this.CreateSettingsProvider(chatModel);
|
||||
var runnableTools = toolRegistry is null
|
||||
? []
|
||||
: await toolRegistry.GetRunnableToolsAsync(providerSettings, chatThread.RuntimeComponent, chatThread.RuntimeSelectedToolIds,
|
||||
this.Provider.GetConfidence(settingsManager).Level, chatThread.MayRunTools(settingsManager));
|
||||
: await toolRegistry.GetRunnableToolsAsync(new ToolResolutionContext
|
||||
{
|
||||
Provider = providerSettings,
|
||||
Component = chatThread.RuntimeComponent,
|
||||
ProviderConfidence = this.Provider.GetConfidence(settingsManager).Level,
|
||||
ChatThread = chatThread,
|
||||
}, chatThread.RuntimeSelectedToolIds, chatThread.MayRunTools(settingsManager), token);
|
||||
|
||||
var systemPrompt = chatThread.PrepareSystemPrompt(settingsManager, runnableTools.Select(x => x.Definition));
|
||||
if (toolExecutor is not null && runnableTools.Count > 0)
|
||||
|
||||
Reference in new issue
Block a user