feat: 扩展 Model 设置功能

- 添加 Embedding 模型类型支持
- 优化模型设置表单样式

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-07 17:19:11 +08:00
parent 0c63c3b44d
commit a104046fbd
3 changed files with 25 additions and 3 deletions

View File

@@ -27,6 +27,8 @@ export function useModelSettings() {
// 默认 Base URL 映射
const defaultBaseUrls: Record<string, string> = {
OpenAI: 'http://localhost:1234/v1',
Ollama: 'http://localhost:11434',
ali: 'https://dashscope.aliyuncs.com/compatible-mode/v1',
}
@@ -120,6 +122,7 @@ export function useModelSettings() {
body: JSON.stringify({
provider: newModelForm.value.provider,
model: newModelForm.value.model,
model_type: newModelForm.value.modelType || 'chat',
api_key: newModelForm.value.apiKey,
base_url: newModelForm.value.baseUrl,
api_endpoint: newModelForm.value.apiEndpoint,