Skip to content

Commit

Permalink
♻️ refactor: refactor the hidden to enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx committed Apr 10, 2024
1 parent 6dc9884 commit 78a1aac
Show file tree
Hide file tree
Showing 21 changed files with 100 additions and 94 deletions.
7 changes: 6 additions & 1 deletion src/config/modelProviders/anthropic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const Anthropic: ModelProviderCard = {
description:
'Ideal balance of intelligence and speed for enterprise workloads. Maximum utility at a lower price, dependable, balanced for scaled deployments',
displayName: 'Claude 3 Sonnet',
enabled: true,
id: 'claude-3-sonnet-20240229',
maxOutput: 4096,
tokens: 200_000,
Expand All @@ -15,6 +16,7 @@ const Anthropic: ModelProviderCard = {
description:
'Most powerful model for highly complex tasks. Top-level performance, intelligence, fluency, and understanding',
displayName: 'Claude 3 Opus',
enabled: true,
id: 'claude-3-opus-20240229',
maxOutput: 4096,
tokens: 200_000,
Expand All @@ -24,26 +26,29 @@ const Anthropic: ModelProviderCard = {
description:
'Fastest and most compact model for near-instant responsiveness. Quick and accurate targeted performance',
displayName: 'Claude 3 Haiku',
enabled: true,
id: 'claude-3-haiku-20240307',
maxOutput: 4096,
tokens: 200_000,
vision: true,
},
{
displayName: 'Claude 2.1',
enabled: false,
id: 'claude-2.1',
maxOutput: 4096,
tokens: 200_000,
},
{
displayName: 'Claude 2.0',
enabled: false,
id: 'claude-2.0',
maxOutput: 4096,
tokens: 100_000,
},
{
displayName: 'Claude Instant 1.2',
hidden: true,
enabled: false,
id: 'claude-instant-1.2',
maxOutput: 4096,
tokens: 100_000,
Expand Down
5 changes: 4 additions & 1 deletion src/config/modelProviders/bedrock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ const Bedrock: ModelProviderCard = {
description:
'Amazon Titan Text G1 - Express v1,上下文长度可达 8000 个 token,适合广泛的用途。',
displayName: 'Titan Text G1 - Express',
hidden: true,
id: 'amazon.titan-text-express-v1:0:8k',
tokens: 8000,
},
{
description:
'Anthropic 推出的 Claude 3 Sonnet 模型在智能和速度之间取得理想的平衡,尤其是在处理企业工作负载方面。该模型提供最大的效用,同时价格低于竞争产品,并且其经过精心设计,是大规模部署人工智能的可信赖、高耐久性骨干模型。 Claude 3 Sonnet 可以处理图像和返回文本输出,并且提供 200K 上下文窗口。',
displayName: 'Claude 3 Sonnet',
enabled: true,
id: 'anthropic.claude-3-sonnet-20240229-v1:0',
tokens: 200_000,
vision: true,
Expand All @@ -22,6 +22,7 @@ const Bedrock: ModelProviderCard = {
description:
'Claude 3 Haiku 是 Anthropic 最快速、最紧凑的模型,具有近乎即时的响应能力。该模型可以快速回答简单的查询和请求。客户将能够构建模仿人类交互的无缝人工智能体验。 Claude 3 Haiku 可以处理图像和返回文本输出,并且提供 200K 上下文窗口。',
displayName: 'Claude 3 Haiku',
enabled: true,
id: 'anthropic.claude-3-haiku-20240307-v1:0',
tokens: 200_000,
vision: true,
Expand All @@ -43,12 +44,14 @@ const Bedrock: ModelProviderCard = {
{
description: 'Llama 2 Chat 13B v1,上下文大小为 4k,Llama 2 模型的对话用例优化变体。',
displayName: 'Llama 2 Chat 13B',
enabled: true,
id: 'meta.llama2-13b-chat-v1',
tokens: 4000,
},
{
description: 'Llama 2 Chat 70B v1,上下文大小为 4k,Llama 2 模型的对话用例优化变体。',
displayName: 'Llama 2 Chat 70B',
enabled: true,
id: 'meta.llama2-70b-chat-v1',
tokens: 4000,
},
Expand Down
7 changes: 2 additions & 5 deletions src/config/modelProviders/google.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,28 @@ const Google: ModelProviderCard = {
{
description: 'A legacy text-only model optimized for chat conversations',
displayName: 'PaLM 2 Chat (Legacy)',
hidden: true,
id: 'chat-bison-001',
maxOutput: 1024,
},
{
description: 'A legacy model that understands text and generates text as an output',
displayName: 'PaLM 2 (Legacy)',
hidden: true,
id: 'text-bison-001',
maxOutput: 1024,
tokens: 9220,
},
{
description: 'The best model for scaling across a wide range of tasks',
displayName: 'Gemini 1.0 Pro',
enabled: true,
id: 'gemini-pro',
maxOutput: 2048,
tokens: 32_768,
},
{
description: 'The best image understanding model to handle a broad range of applications',
displayName: 'Gemini 1.0 Pro Vision',
enabled: true,
id: 'gemini-1.0-pro-vision-latest',
maxOutput: 4096,
tokens: 16_384,
Expand All @@ -35,7 +35,6 @@ const Google: ModelProviderCard = {
{
description: 'The best image understanding model to handle a broad range of applications',
displayName: 'Gemini 1.0 Pro Vision',
hidden: true,
id: 'gemini-pro-vision',
maxOutput: 4096,
tokens: 16_384,
Expand All @@ -45,7 +44,6 @@ const Google: ModelProviderCard = {
description:
'The best model for scaling across a wide range of tasks. This is a stable model that supports tuning.',
displayName: 'Gemini 1.0 Pro 001 (Tuning)',
hidden: true,
id: 'gemini-1.0-pro-001',
maxOutput: 2048,
tokens: 32_768,
Expand All @@ -54,7 +52,6 @@ const Google: ModelProviderCard = {
description:
'The best model for scaling across a wide range of tasks. This is the latest model.',
displayName: 'Gemini 1.0 Pro Latest',
hidden: true,
id: 'gemini-1.0-pro-latest',
maxOutput: 2048,
tokens: 32_768,
Expand Down
3 changes: 3 additions & 0 deletions src/config/modelProviders/groq.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,19 @@ const Groq: ModelProviderCard = {
chatModels: [
{
displayName: 'Mixtral-8x7b-Instruct-v0.1',
enabled: true,
id: 'mixtral-8x7b-32768',
tokens: 32_768,
},
{
displayName: 'Gemma-7b-it',
enabled: true,
id: 'gemma-7b-it',
tokens: 8192,
},
{
displayName: 'LLaMA2-70b-chat',
enabled: true,
id: 'llama2-70b-4096',
tokens: 4096,
},
Expand Down
2 changes: 1 addition & 1 deletion src/config/modelProviders/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const LOBE_DEFAULT_MODEL_LIST: ChatModelCard[] = [
].flat();

export const filterEnabledModels = (provider: ModelProviderCard) => {
return provider.chatModels.filter((v) => !v.hidden).map((m) => m.id);
return provider.chatModels.filter((v) => v.enabled).map((m) => m.id);
};

export { default as AnthropicProvider } from './anthropic';
Expand Down
5 changes: 5 additions & 0 deletions src/config/modelProviders/mistral.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,31 @@ const Mistral: ModelProviderCard = {
chatModels: [
{
displayName: 'Mistral 7B',
enabled: true,
id: 'open-mistral-7b',
tokens: 32_768,
},
{
displayName: 'Mixtral 8x7B',
enabled: true,
id: 'open-mixtral-8x7b',
tokens: 32_768,
},
{
displayName: 'Mistral Small (2402)',
enabled: true,
id: 'mistral-small-2402',
tokens: 32_768,
},
{
displayName: 'Mistral Medium (2312)',
enabled: true,
id: 'mistral-medium-2312',
tokens: 32_768,
},
{
displayName: 'Mistral Large (2402)',
enabled: true,
id: 'mistral-large-2402',
tokens: 32_768,
},
Expand Down
4 changes: 3 additions & 1 deletion src/config/modelProviders/moonshot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,25 @@ const Moonshot: ModelProviderCard = {
chatModels: [
{
displayName: 'Moonshot V1 8K',
enabled: true,
id: 'moonshot-v1-8k',
tokens: 8192,
},
{
displayName: 'Moonshot V1 32K',
enabled: true,
id: 'moonshot-v1-32k',
tokens: 32_768,
},
{
displayName: 'Moonshot V1 128K',
enabled: true,
id: 'moonshot-v1-128k',
tokens: 128_000,
},
{
displayName: 'Moonshot Kimi Reverse',
files: true,
hidden: true,
id: 'moonshot-v1',
tokens: 200_000,
vision: true,
Expand Down
Loading

0 comments on commit 78a1aac

Please sign in to comment.