feat: tools full integration

This commit is contained in:
Timothy J. Baek
2024-06-11 00:18:45 -07:00
parent a27175d672
commit 3d6f5f418d
4 changed files with 75 additions and 39 deletions

View File

@@ -73,6 +73,7 @@
let selectedModels = [''];
let atSelectedModel: Model | undefined;
let selectedToolIds = [];
let webSearchEnabled = false;
let chat = null;
@@ -687,6 +688,7 @@
},
format: $settings.requestFormat ?? undefined,
keep_alive: $settings.keepAlive ?? undefined,
tool_ids: selectedToolIds.length > 0 ? selectedToolIds : undefined,
docs: docs.length > 0 ? docs : undefined,
citations: docs.length > 0,
chat_id: $chatId
@@ -948,6 +950,7 @@
top_p: $settings?.params?.top_p ?? undefined,
frequency_penalty: $settings?.params?.frequency_penalty ?? undefined,
max_tokens: $settings?.params?.max_tokens ?? undefined,
tool_ids: selectedToolIds.length > 0 ? selectedToolIds : undefined,
docs: docs.length > 0 ? docs : undefined,
citations: docs.length > 0,
chat_id: $chatId
@@ -1274,6 +1277,7 @@
bind:files
bind:prompt
bind:autoScroll
bind:selectedToolIds
bind:webSearchEnabled
bind:atSelectedModel
{selectedModels}