diff --git a/web/src/pages/user-setting/setting-model/ollama-modal/index.tsx b/web/src/pages/user-setting/setting-model/ollama-modal/index.tsx index d4bb385b60..c880ec254b 100644 --- a/web/src/pages/user-setting/setting-model/ollama-modal/index.tsx +++ b/web/src/pages/user-setting/setting-model/ollama-modal/index.tsx @@ -53,6 +53,26 @@ const OllamaModal = ({ const url = llmFactoryToUrlMap[llmFactory as LlmFactory] || 'https://github.com/infiniflow/ragflow/blob/main/docs/guides/deploy_local_llm.mdx'; + const optionsMap = { + HuggingFace: [{ value: 'embedding', label: 'embedding' }], + Xinference: [ + { value: 'chat', label: 'chat' }, + { value: 'embedding', label: 'embedding' }, + { value: 'rerank', label: 'rerank' }, + { value: 'image2text', label: 'image2text' }, + { value: 'speech2text', label: 'sequence2text' }, + { value: 'tts', label: 'tts' }, + ], + Default: [ + { value: 'chat', label: 'chat' }, + { value: 'embedding', label: 'embedding' }, + { value: 'rerank', label: 'rerank' }, + { value: 'image2text', label: 'image2text' }, + ], + }; + const getOptions = (factory: string) => { + return optionsMap[factory as keyof typeof optionsMap] || optionsMap.Default; + }; return (