feat: normalization embedding;feat: model top_p param config (#3723)

* edit form force close image select

* model config

* feat: normalization embedding

* perf: add share page title force refresh
This commit is contained in:
Archer
2025-02-08 12:16:46 +08:00
committed by GitHub
parent 42b2046f96
commit 51e17a47fa
30 changed files with 388 additions and 94 deletions

View File

@@ -8,6 +8,12 @@
"maxResponse": 4000,
"quoteMaxToken": 120000,
"maxTemperature": 0.99,
"showTopP": true,
"responseFormatList": [
"text",
"json_object"
],
"showStopSign": true,
"vision": false,
"toolChoice": true,
"functionCall": false,
@@ -30,6 +36,12 @@
"maxResponse": 4000,
"quoteMaxToken": 120000,
"maxTemperature": 0.99,
"showTopP": true,
"responseFormatList": [
"text",
"json_object"
],
"showStopSign": true,
"vision": false,
"toolChoice": true,
"functionCall": false,
@@ -52,6 +64,12 @@
"maxResponse": 4000,
"quoteMaxToken": 900000,
"maxTemperature": 0.99,
"showTopP": true,
"responseFormatList": [
"text",
"json_object"
],
"showStopSign": true,
"vision": false,
"toolChoice": false,
"functionCall": false,
@@ -74,6 +92,12 @@
"maxResponse": 4000,
"quoteMaxToken": 120000,
"maxTemperature": 0.99,
"showTopP": true,
"responseFormatList": [
"text",
"json_object"
],
"showStopSign": true,
"vision": false,
"toolChoice": true,
"functionCall": false,
@@ -96,6 +120,8 @@
"maxResponse": 1000,
"quoteMaxToken": 6000,
"maxTemperature": 0.99,
"showTopP": true,
"showStopSign": true,
"vision": true,
"toolChoice": false,
"functionCall": false,
@@ -118,6 +144,8 @@
"maxResponse": 1000,
"quoteMaxToken": 6000,
"maxTemperature": 0.99,
"showTopP": true,
"showStopSign": true,
"vision": true,
"toolChoice": false,
"functionCall": false,

View File

@@ -8,6 +8,8 @@
"maxResponse": 8000,
"quoteMaxToken": 100000,
"maxTemperature": 1,
"showTopP": true,
"showStopSign": true,
"vision": false,
"toolChoice": true,
"functionCall": false,
@@ -30,6 +32,8 @@
"maxResponse": 8000,
"quoteMaxToken": 100000,
"maxTemperature": 1,
"showTopP": true,
"showStopSign": true,
"vision": true,
"toolChoice": true,
"functionCall": false,
@@ -52,6 +56,8 @@
"maxResponse": 8000,
"quoteMaxToken": 100000,
"maxTemperature": 1,
"showTopP": true,
"showStopSign": true,
"vision": true,
"toolChoice": true,
"functionCall": false,
@@ -74,6 +80,8 @@
"maxResponse": 4096,
"quoteMaxToken": 100000,
"maxTemperature": 1,
"showTopP": true,
"showStopSign": true,
"vision": true,
"toolChoice": true,
"functionCall": false,

View File

@@ -7,7 +7,10 @@
"maxContext": 64000,
"maxResponse": 8000,
"quoteMaxToken": 60000,
"maxTemperature": 1.5,
"maxTemperature": 1,
"showTopP": true,
"responseFormatList": ["text", "json_object"],
"showStopSign": true,
"vision": false,
"toolChoice": true,
"functionCall": false,
@@ -42,7 +45,9 @@
"usedInToolCall": true,
"defaultConfig": {},
"fieldMap": {},
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
}
]
}

View File

@@ -8,6 +8,8 @@
"maxResponse": 4000,
"quoteMaxToken": 32000,
"maxTemperature": 1,
"showTopP": true,
"showStopSign": true,
"vision": false,
"toolChoice": true,
"functionCall": false,
@@ -30,6 +32,8 @@
"maxResponse": 4000,
"quoteMaxToken": 32000,
"maxTemperature": 1,
"showTopP": true,
"showStopSign": true,
"vision": false,
"toolChoice": true,
"functionCall": false,
@@ -52,6 +56,8 @@
"maxResponse": 12000,
"quoteMaxToken": 256000,
"maxTemperature": 1,
"showTopP": true,
"showStopSign": true,
"vision": false,
"toolChoice": true,
"functionCall": false,
@@ -74,6 +80,8 @@
"maxResponse": 4000,
"quoteMaxToken": 32000,
"maxTemperature": 1,
"showTopP": true,
"showStopSign": true,
"vision": true,
"toolChoice": true,
"functionCall": false,
@@ -96,6 +104,8 @@
"maxResponse": 4000,
"quoteMaxToken": 4000,
"maxTemperature": 1,
"showTopP": true,
"showStopSign": true,
"vision": false,
"toolChoice": true,
"functionCall": false,
@@ -118,6 +128,8 @@
"maxResponse": 4000,
"quoteMaxToken": 32000,
"maxTemperature": 1,
"showTopP": true,
"showStopSign": true,
"vision": false,
"toolChoice": true,
"functionCall": false,
@@ -153,7 +165,9 @@
"usedInToolCall": true,
"defaultConfig": {},
"fieldMap": {},
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
},
{
"model": "Doubao-vision-lite-32k",
@@ -175,7 +189,9 @@
"usedInToolCall": true,
"defaultConfig": {},
"fieldMap": {},
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
},
{
"model": "Doubao-pro-4k",
@@ -197,7 +213,9 @@
"usedInToolCall": true,
"defaultConfig": {},
"fieldMap": {},
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
},
{
"model": "Doubao-pro-32k",
@@ -219,7 +237,9 @@
"usedInToolCall": true,
"defaultConfig": {},
"fieldMap": {},
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
},
{
"model": "Doubao-pro-128k",
@@ -241,7 +261,9 @@
"usedInToolCall": true,
"defaultConfig": {},
"fieldMap": {},
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
},
{
"model": "Doubao-vision-pro-32k",
@@ -263,21 +285,25 @@
"usedInToolCall": true,
"defaultConfig": {},
"fieldMap": {},
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
},
{
"model": "Doubao-embedding-large",
"name": "Doubao-embedding-large",
"defaultToken": 512,
"maxToken": 4096,
"type": "embedding"
"type": "embedding",
"normalization": true
},
{
"model": "Doubao-embedding",
"name": "Doubao-embedding",
"defaultToken": 512,
"maxToken": 4096,
"type": "embedding"
"type": "embedding",
"normalization": true
}
]
}

View File

@@ -21,7 +21,9 @@
"usedInToolCall": true,
"defaultConfig": {},
"fieldMap": {},
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
},
{
"model": "ERNIE-4.0-Turbo-8K",
@@ -43,7 +45,9 @@
"usedInToolCall": true,
"defaultConfig": {},
"fieldMap": {},
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
},
{
"model": "ERNIE-Lite-8K",
@@ -65,7 +69,9 @@
"usedInToolCall": true,
"defaultConfig": {},
"fieldMap": {},
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
},
{
"model": "ERNIE-Speed-128K",
@@ -87,7 +93,9 @@
"usedInToolCall": true,
"defaultConfig": {},
"fieldMap": {},
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
},
{
"model": "Embedding-V1",

View File

@@ -21,7 +21,9 @@
"usedInToolCall": true,
"defaultConfig": {},
"fieldMap": {},
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
},
{
"model": "gemini-1.5-pro",
@@ -43,7 +45,9 @@
"usedInToolCall": true,
"defaultConfig": {},
"fieldMap": {},
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
},
{
"model": "gemini-2.0-flash-exp",
@@ -65,7 +69,9 @@
"usedInToolCall": true,
"defaultConfig": {},
"fieldMap": {},
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
},
{
"model": "gemini-2.0-flash-thinking-exp-1219",
@@ -87,7 +93,9 @@
"usedInToolCall": true,
"defaultConfig": {},
"fieldMap": {},
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
},
{
"model": "gemini-2.0-flash-thinking-exp-01-21",
@@ -109,7 +117,9 @@
"usedInToolCall": true,
"defaultConfig": {},
"fieldMap": {},
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
},
{
"model": "gemini-exp-1206",
@@ -131,7 +141,9 @@
"usedInToolCall": true,
"defaultConfig": {},
"fieldMap": {},
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
},
{
"model": "text-embedding-004",
@@ -141,4 +153,4 @@
"type": "embedding"
}
]
}
}

View File

@@ -20,7 +20,9 @@
"customExtractPrompt": "",
"usedInToolCall": true,
"defaultConfig": {},
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
},
{
"model": "llama-3.3-70b-versatile",
@@ -41,7 +43,9 @@
"customExtractPrompt": "",
"usedInToolCall": true,
"defaultConfig": {},
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
}
]
}

View File

@@ -21,7 +21,9 @@
"usedInToolCall": true,
"defaultConfig": {},
"fieldMap": {},
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
},
{
"model": "hunyuan-lite",
@@ -43,7 +45,9 @@
"usedInToolCall": true,
"defaultConfig": {},
"fieldMap": {},
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
},
{
"model": "hunyuan-pro",
@@ -65,7 +69,9 @@
"usedInToolCall": true,
"defaultConfig": {},
"fieldMap": {},
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
},
{
"model": "hunyuan-standard",
@@ -87,7 +93,9 @@
"usedInToolCall": true,
"defaultConfig": {},
"fieldMap": {},
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
},
{
"model": "hunyuan-turbo-vision",
@@ -109,7 +117,9 @@
"usedInToolCall": true,
"defaultConfig": {},
"fieldMap": {},
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
},
{
"model": "hunyuan-turbo",
@@ -131,7 +141,9 @@
"usedInToolCall": true,
"defaultConfig": {},
"fieldMap": {},
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
},
{
"model": "hunyuan-vision",
@@ -153,7 +165,9 @@
"usedInToolCall": true,
"defaultConfig": {},
"fieldMap": {},
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
},
{
"model": "hunyuan-embedding",

View File

@@ -21,7 +21,9 @@
"usedInToolCall": true,
"defaultConfig": {},
"fieldMap": {},
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
},
{
"model": "internlm3-8b-instruct",
@@ -43,7 +45,9 @@
"usedInToolCall": true,
"defaultConfig": {},
"fieldMap": {},
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
}
]
}

View File

@@ -21,7 +21,9 @@
"usedInToolCall": true,
"defaultConfig": {},
"fieldMap": {},
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
},
{
"model": "abab6.5s-chat",
@@ -43,7 +45,9 @@
"usedInToolCall": true,
"defaultConfig": {},
"fieldMap": {},
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
},
{
"model": "speech-01-turbo",
@@ -237,4 +241,4 @@
"type": "tts"
}
]
}
}

View File

@@ -21,7 +21,9 @@
"usedInToolCall": true,
"defaultConfig": {},
"fieldMap": {},
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
},
{
"model": "ministral-8b-latest",
@@ -43,7 +45,9 @@
"usedInToolCall": true,
"defaultConfig": {},
"fieldMap": {},
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
},
{
"model": "mistral-large-latest",
@@ -65,7 +69,9 @@
"usedInToolCall": true,
"defaultConfig": {},
"fieldMap": {},
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
},
{
"model": "mistral-small-latest",
@@ -87,7 +93,9 @@
"usedInToolCall": true,
"defaultConfig": {},
"fieldMap": {},
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
}
]
}

View File

@@ -21,7 +21,10 @@
"usedInToolCall": true,
"defaultConfig": {},
"fieldMap": {},
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true,
"responseFormatList": ["text", "json_object"]
},
{
"model": "moonshot-v1-32k",
@@ -43,7 +46,10 @@
"usedInToolCall": true,
"defaultConfig": {},
"fieldMap": {},
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true,
"responseFormatList": ["text", "json_object"]
},
{
"model": "moonshot-v1-128k",
@@ -65,7 +71,10 @@
"usedInToolCall": true,
"defaultConfig": {},
"fieldMap": {},
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true,
"responseFormatList": ["text", "json_object"]
}
]
}

View File

@@ -9,7 +9,11 @@
"quoteMaxToken": 60000,
"maxTemperature": 1.2,
"showTopP": true,
"responseFormatList": ["text", "json_object", "json_schema"],
"responseFormatList": [
"text",
"json_object",
"json_schema"
],
"showStopSign": true,
"vision": true,
"toolChoice": true,
@@ -32,6 +36,13 @@
"maxResponse": 4000,
"quoteMaxToken": 60000,
"maxTemperature": 1.2,
"showTopP": true,
"responseFormatList": [
"text",
"json_object",
"json_schema"
],
"showStopSign": true,
"vision": true,
"toolChoice": true,
"functionCall": true,
@@ -71,7 +82,9 @@
"fieldMap": {
"max_tokens": "max_completion_tokens"
},
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
},
{
"model": "o1-mini",
@@ -97,7 +110,9 @@
"fieldMap": {
"max_tokens": "max_completion_tokens"
},
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
},
{
"model": "o1",
@@ -123,7 +138,9 @@
"fieldMap": {
"max_tokens": "max_completion_tokens"
},
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
},
{
"model": "o1-preview",
@@ -149,7 +166,9 @@
"fieldMap": {
"max_tokens": "max_completion_tokens"
},
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
},
{
"model": "gpt-3.5-turbo",
@@ -158,6 +177,8 @@
"maxResponse": 4000,
"quoteMaxToken": 13000,
"maxTemperature": 1.2,
"showTopP": true,
"showStopSign": true,
"vision": false,
"toolChoice": true,
"functionCall": true,
@@ -178,6 +199,8 @@
"maxResponse": 4000,
"quoteMaxToken": 60000,
"maxTemperature": 1.2,
"showTopP": true,
"showStopSign": true,
"vision": true,
"toolChoice": true,
"functionCall": true,
@@ -252,4 +275,4 @@
"type": "stt"
}
]
}
}

View File

@@ -21,7 +21,10 @@
"usedInToolCall": true,
"defaultConfig": {},
"fieldMap": {},
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true,
"responseFormatList": ["text", "json_object"]
},
{
"model": "qwen-plus",
@@ -43,7 +46,10 @@
"usedInToolCall": true,
"defaultConfig": {},
"fieldMap": {},
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true,
"responseFormatList": ["text", "json_object"]
},
{
"model": "qwen-vl-plus",
@@ -63,7 +69,9 @@
"usedInQueryExtension": true,
"customExtractPrompt": "",
"usedInToolCall": true,
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
},
{
"model": "qwen-max",
@@ -85,7 +93,10 @@
"usedInToolCall": true,
"defaultConfig": {},
"fieldMap": {},
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true,
"responseFormatList": ["text", "json_object"]
},
{
"model": "qwen-vl-max",
@@ -107,7 +118,9 @@
"usedInToolCall": true,
"defaultConfig": {},
"fieldMap": {},
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
},
{
"model": "qwen-coder-turbo",
@@ -129,7 +142,9 @@
"usedInToolCall": true,
"defaultConfig": {},
"fieldMap": {},
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
},
{
"model": "qwen2.5-7b-instruct",
@@ -151,7 +166,10 @@
"usedInToolCall": true,
"defaultConfig": {},
"fieldMap": {},
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true,
"responseFormatList": ["text", "json_object"]
},
{
"model": "qwen2.5-14b-instruct",
@@ -173,7 +191,10 @@
"usedInToolCall": true,
"defaultConfig": {},
"fieldMap": {},
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true,
"responseFormatList": ["text", "json_object"]
},
{
"model": "qwen2.5-32b-instruct",
@@ -195,7 +216,10 @@
"usedInToolCall": true,
"defaultConfig": {},
"fieldMap": {},
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true,
"responseFormatList": ["text", "json_object"]
},
{
"model": "qwen2.5-72b-instruct",
@@ -217,7 +241,10 @@
"usedInToolCall": true,
"defaultConfig": {},
"fieldMap": {},
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true,
"responseFormatList": ["text", "json_object"]
}
]
}

View File

@@ -21,7 +21,9 @@
"usedInToolCall": true,
"defaultConfig": {},
"fieldMap": {},
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
},
{
"model": "Qwen/Qwen2-VL-72B-Instruct",
@@ -42,7 +44,9 @@
"customExtractPrompt": "",
"defaultSystemChatPrompt": "",
"defaultConfig": {},
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
},
{
"model": "deepseek-ai/DeepSeek-V2.5",
@@ -64,7 +68,9 @@
"usedInToolCall": true,
"defaultConfig": {},
"fieldMap": {},
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
},
{
"model": "BAAI/bge-m3",
@@ -201,4 +207,4 @@
"type": "rerank"
}
]
}
}

View File

@@ -19,7 +19,9 @@
"customCQPrompt": "",
"customExtractPrompt": "",
"defaultSystemChatPrompt": "",
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
},
{
"model": "generalv3",
@@ -39,7 +41,9 @@
"customCQPrompt": "",
"customExtractPrompt": "",
"defaultSystemChatPrompt": "",
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
},
{
"model": "pro-128k",
@@ -59,7 +63,9 @@
"customCQPrompt": "",
"customExtractPrompt": "",
"defaultSystemChatPrompt": "",
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
},
{
"model": "generalv3.5",
@@ -79,7 +85,9 @@
"customCQPrompt": "",
"customExtractPrompt": "",
"defaultSystemChatPrompt": "",
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
},
{
"model": "max-32k",
@@ -101,7 +109,9 @@
"usedInToolCall": true,
"defaultConfig": {},
"fieldMap": {},
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
},
{
"model": "4.0Ultra",
@@ -123,7 +133,9 @@
"usedInToolCall": true,
"defaultConfig": {},
"fieldMap": {},
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
}
]
}
}

View File

@@ -19,7 +19,9 @@
"customCQPrompt": "",
"customExtractPrompt": "",
"defaultSystemChatPrompt": "",
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
},
{
"model": "step-1-8k",
@@ -39,7 +41,9 @@
"customCQPrompt": "",
"customExtractPrompt": "",
"defaultSystemChatPrompt": "",
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
},
{
"model": "step-1-32k",
@@ -59,7 +63,9 @@
"customCQPrompt": "",
"customExtractPrompt": "",
"defaultSystemChatPrompt": "",
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
},
{
"model": "step-1-128k",
@@ -79,7 +85,9 @@
"customCQPrompt": "",
"customExtractPrompt": "",
"defaultSystemChatPrompt": "",
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
},
{
"model": "step-1-256k",
@@ -99,7 +107,9 @@
"customCQPrompt": "",
"customExtractPrompt": "",
"defaultSystemChatPrompt": "",
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
},
{
"model": "step-1o-vision-32k",
@@ -119,7 +129,9 @@
"customCQPrompt": "",
"customExtractPrompt": "",
"defaultSystemChatPrompt": "",
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
},
{
"model": "step-1v-8k",
@@ -139,7 +151,9 @@
"customCQPrompt": "",
"customExtractPrompt": "",
"defaultSystemChatPrompt": "",
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
},
{
"model": "step-1v-32k",
@@ -159,7 +173,9 @@
"customCQPrompt": "",
"customExtractPrompt": "",
"defaultSystemChatPrompt": "",
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
},
{
"model": "step-2-mini",
@@ -179,7 +195,9 @@
"customCQPrompt": "",
"customExtractPrompt": "",
"defaultSystemChatPrompt": "",
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
},
{
"model": "step-2-16k",
@@ -199,7 +217,9 @@
"customCQPrompt": "",
"customExtractPrompt": "",
"defaultSystemChatPrompt": "",
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
},
{
"model": "step-2-16k-exp",
@@ -219,7 +239,9 @@
"customCQPrompt": "",
"customExtractPrompt": "",
"defaultSystemChatPrompt": "",
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
},
{
"model": "step-tts-mini",
@@ -305,4 +327,4 @@
"type": "tts"
}
]
}
}

View File

@@ -21,7 +21,9 @@
"usedInToolCall": true,
"defaultConfig": {},
"fieldMap": {},
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
},
{
"model": "yi-vision-v2",
@@ -43,7 +45,9 @@
"usedInToolCall": true,
"defaultConfig": {},
"fieldMap": {},
"type": "llm"
"type": "llm",
"showTopP": true,
"showStopSign": true
}
]
}

View File

@@ -56,7 +56,14 @@ export async function getVectorsByText({ model, input, type }: GetVectorProps) {
const [tokens, vectors] = await Promise.all([
countPromptTokens(input),
Promise.all(res.data.map((item) => unityDimensional(item.embedding)))
Promise.all(
res.data
.map((item) => unityDimensional(item.embedding))
.map((item) => {
if (model.normalization) return normalization(item);
return item;
})
)
]);
return {
@@ -87,3 +94,15 @@ function unityDimensional(vector: number[]) {
return resultVector.concat(zeroVector);
}
// normalization processing
function normalization(vector: number[]) {
if (vector.some((item) => item > 1)) {
// Calculate the Euclidean norm (L2 norm)
const norm = Math.sqrt(vector.reduce((sum, val) => sum + val * val, 0));
// Normalize the vector by dividing each component by the norm
return vector.map((val) => val / norm);
}
return vector;
}