refactor(setting): split model dialogs into separate components

This commit is contained in:
2025-10-24 11:41:44 +08:00
parent cdc0a466b4
commit a9b47f776b
10 changed files with 1103 additions and 897 deletions

View File

@@ -7,6 +7,7 @@ import type {
AzureOpenAIFormData,
BedrockFormData,
OllamaFormData,
// SystemModelFormData,
} from '../components/ModelDialogs';
import type { ITenantInfo } from '@/interfaces/database/knowledge';
import { useLlmList } from '@/hooks/llm-hooks';
@@ -108,7 +109,7 @@ export const useAzureOpenAIDialog = () => {
// 调用 Azure OpenAI 特定的 API
await userService.set_api_key({
llm_factory: 'AzureOpenAI',
llm_name: data.deployment_name,
// llm_name: data.deployment_name,
api_key: data.api_key,
// azure_endpoint: data.azure_endpoint,
// api_version: data.api_version,
@@ -175,7 +176,7 @@ export const useOllamaDialog = () => {
// 调用添加 LLM 的 API
await userService.add_llm({
llm_factory: 'Ollama',
llm_name: data.model_name,
// llm_name: data.model_name,
// base_url: data.base_url,
});
showMessage.success('Ollama 模型添加成功');