feat: support setting model context length
This commit is contained in:
@ -27,6 +27,7 @@ Please give a 🌟 Star if you like this project!
|
||||
25/02/17
|
||||
|
||||
- Added: set rate limits for web search
|
||||
- Added: set context length for AI model
|
||||
|
||||
25/02/16
|
||||
|
||||
|
@ -18,6 +18,11 @@
|
||||
|
||||
## 近期更新
|
||||
|
||||
25/02/17
|
||||
|
||||
- 支持设置模型上下文长度
|
||||
- 支持限制联网搜索的并发数
|
||||
|
||||
25/02/16
|
||||
|
||||
- 使用 VueFlow 重构了搜索可视化功能
|
||||
|
@ -103,7 +103,7 @@
|
||||
} finally {
|
||||
loadingAiModels.value = false
|
||||
}
|
||||
}, 1000)
|
||||
}, 500)
|
||||
|
||||
function createAndSelectAiModel(model: string) {
|
||||
aiModelOptions.value.push(model)
|
||||
@ -189,6 +189,19 @@
|
||||
:placeholder="$t('settings.ai.model')"
|
||||
/>
|
||||
</UFormField>
|
||||
<UFormField :label="$t('settings.ai.contextSize')">
|
||||
<template #help>
|
||||
{{ $t('settings.ai.contextSizeHelp') }}
|
||||
</template>
|
||||
<UInput
|
||||
v-model="config.ai.contextSize"
|
||||
class="w-26"
|
||||
type="number"
|
||||
placeholder="128000"
|
||||
:min="512"
|
||||
/>
|
||||
tokens
|
||||
</UFormField>
|
||||
</div>
|
||||
|
||||
<USeparator class="my-2" />
|
||||
@ -247,6 +260,7 @@
|
||||
v-model="config.webSearch.concurrencyLimit"
|
||||
class="w-15"
|
||||
type="number"
|
||||
placeholder="2"
|
||||
:min="1"
|
||||
:max="5"
|
||||
:step="1"
|
||||
|
@ -17,8 +17,8 @@
|
||||
"apiKey": "API Key",
|
||||
"apiBase": "API Base URL",
|
||||
"model": "Model",
|
||||
"contextSize": "Context Size",
|
||||
"contextSizeHelp": "The maximum size of the context in tokens. This is the maximum number of tokens that will be sent to the model. The default is 128,000 tokens.",
|
||||
"contextSize": "Context Length",
|
||||
"contextSizeHelp": "The maximum number of tokens that will be sent to the model. Can't be bigger than the model's context length.",
|
||||
"providers": {
|
||||
"openaiCompatible": {
|
||||
"title": "OpenAI Compatible",
|
||||
@ -102,4 +102,4 @@
|
||||
"refresh": "Refresh page",
|
||||
"dismiss": "Dismiss"
|
||||
}
|
||||
}
|
||||
}
|
@ -17,8 +17,8 @@
|
||||
"apiKey": "API 密钥",
|
||||
"apiBase": "API Base URL",
|
||||
"model": "模型名称",
|
||||
"contextSize": "上下文大小",
|
||||
"contextSizeHelp": "上下文的最大大小(以 token 计)。这是将发送给模型的最大 token 数量。默认值为 128,000 个 token。",
|
||||
"contextSize": "上下文长度",
|
||||
"contextSizeHelp": "发送给模型的最大 token 数量,不能超过模型本身支持的上下文长度。",
|
||||
"providers": {
|
||||
"openaiCompatible": {
|
||||
"title": "OpenAI Compatible",
|
||||
@ -102,4 +102,4 @@
|
||||
"refresh": "刷新",
|
||||
"dismiss": "忽略"
|
||||
}
|
||||
}
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
{
|
||||
"version": "1.1.0"
|
||||
"version": "1.1.1"
|
||||
}
|
Reference in New Issue
Block a user