From e2fb3a328d59d666326d4b666b537d0ec419e1d9 Mon Sep 17 00:00:00 2001 From: Arvin Xu Date: Fri, 23 Feb 2024 22:26:04 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=20style:=20add=20gemma=20model=20l?= =?UTF-8?q?ogo=20for=20ollama=20(#1369)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/components/ModelIcon/index.tsx | 2 ++ src/components/ModelTag/ModelIcon.tsx | 2 ++ src/config/modelProviders/ollama.ts | 22 ++++++++++++++++++++++ 4 files changed, 27 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 44e8d35d1c78..0fe06594d245 100644 --- a/package.json +++ b/package.json @@ -82,7 +82,7 @@ "@icons-pack/react-simple-icons": "^9", "@lobehub/chat-plugin-sdk": "latest", "@lobehub/chat-plugins-gateway": "latest", - "@lobehub/icons": "^1.11.1", + "@lobehub/icons": "^1.11.2", "@lobehub/tts": "latest", "@lobehub/ui": "^1.129.2", "@vercel/analytics": "^1", diff --git a/src/components/ModelIcon/index.tsx b/src/components/ModelIcon/index.tsx index 541b14823cf8..0ae2baab1662 100644 --- a/src/components/ModelIcon/index.tsx +++ b/src/components/ModelIcon/index.tsx @@ -4,6 +4,7 @@ import { Baichuan, ChatGLM, Gemini, + Gemma, Meta, Minimax, Mistral, @@ -29,6 +30,7 @@ const ModelIcon = memo(({ model, size = 12 }) => { if (model.includes('titan')) return ; if (model.includes('llama')) return ; if (model.includes('gemini')) return ; + if (model.includes('gemma')) return ; if (model.includes('qwen')) return ; if (model.includes('minmax')) return ; if (model.includes('moonshot')) return ; diff --git a/src/components/ModelTag/ModelIcon.tsx b/src/components/ModelTag/ModelIcon.tsx index 63d7d1c44bc2..e02435a162aa 100644 --- a/src/components/ModelTag/ModelIcon.tsx +++ b/src/components/ModelTag/ModelIcon.tsx @@ -4,6 +4,7 @@ import { Baichuan, ChatGLM, Gemini, + Gemma, Meta, Minimax, Mistral, @@ -28,6 +29,7 @@ const ModelIcon = memo(({ model, size = 12 }) => { if (model.includes('titan')) return ; if (model.includes('llama')) return ; if (model.includes('gemini')) return ; + if (model.includes('gemma')) return ; if (model.includes('moonshot')) return ; if (model.includes('qwen')) return ; if (model.includes('minmax')) return ; diff --git a/src/config/modelProviders/ollama.ts b/src/config/modelProviders/ollama.ts index 2bb2d9f374a9..b17ed678c912 100644 --- a/src/config/modelProviders/ollama.ts +++ b/src/config/modelProviders/ollama.ts @@ -2,6 +2,28 @@ import { ModelProviderCard } from '@/types/llm'; const Ollama: ModelProviderCard = { chatModels: [ + { + displayName: 'Gemma 7B', + functionCall: false, + id: 'gemma:7b', + tokens: 4000, + vision: false, + }, + { + displayName: 'Gemma 2B', + functionCall: false, + id: 'gemma', + tokens: 4000, + vision: false, + }, + { + displayName: 'Llama2 Chat 13B', + functionCall: false, + hidden: true, + id: 'llama2:13b', + tokens: 4000, + vision: false, + }, { displayName: 'Llama2 Chat 7B', functionCall: false,