diff --git a/frontend/src/app/settings/llm/ChatChat/index.tsx b/frontend/src/app/settings/llm/ChatChat/index.tsx new file mode 100644 index 00000000..1849cd65 --- /dev/null +++ b/frontend/src/app/settings/llm/ChatChat/index.tsx @@ -0,0 +1,69 @@ +import { Input, Flex } from 'antd'; +import { useTheme } from 'antd-style'; +import { memo } from 'react'; +import { useTranslation } from 'react-i18next'; +import Avatar from 'next/image'; + +import { imageUrl } from '@/const/url'; + +import { ModelProvider } from '@/libs/agent-runtime'; + +import Checker from '../components/Checker'; +import ProviderConfig from '../components/ProviderConfig'; +import { LLMProviderBaseUrlKey, LLMProviderConfigKey } from '../const'; + +const providerKey = 'chatchat'; + +const ChatChatProvider = memo(() => { + const { t } = useTranslation('setting'); + const theme = useTheme(); + + console.log('----ttt---1-', t('llm.ChatChat.endpoint.title')) + console.log('----ttt---2-', t('llm.Ollama.endpoint.title')) + console.log('----ttt---3-', t) + + return ( + , + desc: t('llm.ChatChat.endpoint.desc'), + label: t('llm.ChatChat.endpoint.title'), + name: [LLMProviderConfigKey, providerKey, LLMProviderBaseUrlKey], + }, + { + children: ( + + ), + desc: t('llm.ChatChat.customModelName.desc'), + label: t('llm.ChatChat.customModelName.title'), + name: [LLMProviderConfigKey, providerKey, 'customModelName'], + }, + { + children: , + desc: t('llm.ChatChat.checker.desc'), + label: t('llm.checker.title'), + minWidth: undefined, + }, + ]} + provider={providerKey} + title={ + + + { 'ChatChat' } + + } + /> + ); +}); + +export default ChatChatProvider; diff --git a/frontend/src/app/settings/llm/index.tsx b/frontend/src/app/settings/llm/index.tsx index 72ba4868..c085bc39 100644 --- a/frontend/src/app/settings/llm/index.tsx +++ b/frontend/src/app/settings/llm/index.tsx @@ -17,6 +17,7 @@ import Ollama from './Ollama'; import OpenAI from './OpenAI'; import Perplexity from './Perplexity'; import Zhipu from './Zhipu'; +import ChatChat from './ChatChat' export default memo<{ showOllama: boolean }>(({ showOllama }) => { const { t } = useTranslation('setting'); @@ -34,6 +35,7 @@ export default memo<{ showOllama: boolean }>(({ showOllama }) => { {showOllama && } +