Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ feat: support 01.AI as a new provider #1627

Merged
merged 16 commits into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
🐛 fix: remove custom model name and dark mode Logo for 01AI
  • Loading branch information
MapleEve committed Mar 19, 2024
commit 3eaa5fa793ae797aa4a20757fa1397d60f4145f6
2 changes: 1 addition & 1 deletion locales/zh-CN/error.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"InvalidOpenRouterAPIKey": "OpenRouter API Key 不正确或为空,请检查 OpenRouter API Key 后重试",
"OpenRouterBizError": "请求 OpenRouter AI 服务出错,请根据以下信息排查或重试",
"ZeroOneBizError": "请求零一万物服务出错,请根据以下信息排查或重试",
"InvalidZeroOneAPIKey": "零一万物 AI API Key 不正确或为空,请检查零一万物 API Key 后重试",
"InvalidZeroOneAPIKey": "零一万物 API Key 不正确或为空,请检查零一万物 API Key 后重试",
"InvalidOllamaArgs": "Ollama 配置不正确,请检查 Ollama 配置后重试",
"OllamaBizError": "请求 Ollama 服务出错,请根据以下信息排查或重试",
"OllamaServiceUnavailable": "未检测到 Ollama 服务,请检查是否正常启动",
Expand Down
21 changes: 2 additions & 19 deletions src/app/settings/llm/ZeroOne/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,31 +32,14 @@ const ZeroOneProvider = memo(() => {
name: [LLMProviderConfigKey, providerKey, LLMProviderApiTokenKey],
},
{
children: (
<Input.TextArea
allowClear
placeholder={t('llm.ZeroOne.customModelName.placeholder')}
style={{ height: 100 }}
/>
),
desc: t('llm.ZeroOne.customModelName.desc'),
label: t('llm.ZeroOne.customModelName.title'),
name: [LLMProviderConfigKey, providerKey, 'customModelName'],
},
{
children: <Checker model={'mistralai/mistral-7b-instruct:free'} provider={ModelProvider.ZeroOne} />,
children: <Checker model={'yi-34b-chat-0205'} provider={ModelProvider.ZeroOne} />,
desc: t('llm.checker.desc'),
label: t('llm.checker.title'),
minWidth: '100%',
},
]}
provider={providerKey}
title={
<ZeroOne.Combine
color={theme.isDarkMode ? theme.colorText : ZeroOne.colorPrimary}
size={24}
/>
}
title={<ZeroOne.Text color={theme.isDarkMode ? theme.colorText : ZeroOne.colorPrimary} size={24} />}
/>
);
});
Expand Down
2 changes: 1 addition & 1 deletion src/locales/default/error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export default {
OpenRouterBizError: '请求 OpenRouter AI 服务出错,请根据以下信息排查或重试',

ZeroOneBizError: '请求零一万物服务出错,请根据以下信息排查或重试',
InvalidZeroOneAPIKey: '零一万物 AI API Key 不正确或为空,请检查零一万物 API Key 后重试',
InvalidZeroOneAPIKey: '零一万物 API Key 不正确或为空,请检查零一万物 API Key 后重试',

InvalidOllamaArgs: 'Ollama 配置不正确,请检查 Ollama 配置后重试',
OllamaBizError: '请求 Ollama 服务出错,请根据以下信息排查或重试',
Expand Down
Loading