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