This commit is contained in:
hailin 2025-04-22 09:56:45 +08:00
parent b68bd20272
commit 97bbace6f0
4 changed files with 86 additions and 35 deletions

View File

@ -73,7 +73,7 @@ export const APIStep: FC<APIStepProps> = ({
<div className="mt-5 space-y-2">
<Label className="flex items-center">
<div>
{useAzureOpenai ? "Azure OpenAI API Key" : "OpenAI API Key"}
{useAzureOpenai ? t("setup.azureOpenaiApiKey") : t("setup.openaiApiKey")}
</div>
<Button
@ -88,7 +88,7 @@ export const APIStep: FC<APIStepProps> = ({
<Input
placeholder={
useAzureOpenai ? "Azure OpenAI API Key" : "OpenAI API Key"
useAzureOpenai ? t("setup.azureOpenaiApiKey") : t("setup.openaiApiKey")
}
type="password"
value={useAzureOpenai ? azureOpenaiAPIKey : openaiAPIKey}
@ -104,7 +104,7 @@ export const APIStep: FC<APIStepProps> = ({
{useAzureOpenai ? (
<>
<div className="space-y-1">
<Label>Azure OpenAI Endpoint</Label>
<Label>{t("setup.azureOpenaiEndpoint")}</Label>
<Input
placeholder="https://your-endpoint.openai.azure.com"
@ -115,10 +115,10 @@ export const APIStep: FC<APIStepProps> = ({
</div>
<div className="space-y-1">
<Label>Azure OpenAI GPT-3.5 Turbo ID</Label>
<Label>{t("setup.azureOpenai35TurboId")}</Label>
<Input
placeholder="Azure OpenAI GPT-3.5 Turbo ID"
placeholder={t("setup.azureOpenai35TurboId")}
type="password"
value={azureOpenai35TurboID}
onChange={e => onAzureOpenai35TurboIDChange(e.target.value)}
@ -126,10 +126,10 @@ export const APIStep: FC<APIStepProps> = ({
</div>
<div className="space-y-1">
<Label>Azure OpenAI GPT-4.5 Turbo ID</Label>
<Label>{t("setup.azureOpenai45TurboId")}</Label>
<Input
placeholder="Azure OpenAI GPT-4.5 Turbo ID"
placeholder={t("setup.azureOpenai45TurboId")}
type="password"
value={azureOpenai45TurboID}
onChange={e => onAzureOpenai45TurboIDChange(e.target.value)}
@ -137,10 +137,10 @@ export const APIStep: FC<APIStepProps> = ({
</div>
<div className="space-y-1">
<Label>Azure OpenAI GPT-4.5 Vision ID</Label>
<Label>{t("setup.azureOpenai45VisionId")}</Label>
<Input
placeholder="Azure OpenAI GPT-4.5 Vision ID"
placeholder={t("setup.azureOpenai45VisionId")}
type="password"
value={azureOpenai45VisionID}
onChange={e => onAzureOpenai45VisionIDChange(e.target.value)}
@ -148,10 +148,10 @@ export const APIStep: FC<APIStepProps> = ({
</div>
<div className="space-y-1">
<Label>Azure OpenAI Embeddings ID</Label>
<Label>{t("setup.azureOpenaiEmbeddingsId")}</Label>
<Input
placeholder="Azure OpenAI Embeddings ID"
placeholder={t("setup.azureOpenaiEmbeddingsId")}
type="password"
value={azureOpenaiEmbeddingsID}
onChange={e => onAzureOpenaiEmbeddingsIDChange(e.target.value)}
@ -161,10 +161,10 @@ export const APIStep: FC<APIStepProps> = ({
) : (
<>
<div className="space-y-1">
<Label>OpenAI Organization ID</Label>
<Label>{t("setup.openaiOrgId")}</Label>
<Input
placeholder="OpenAI Organization ID (optional)"
placeholder={t("setup.openaiOrgIdOptional")}
type="password"
value={openaiOrgID}
onChange={e => onOpenaiOrgIDChange(e.target.value)}
@ -175,10 +175,10 @@ export const APIStep: FC<APIStepProps> = ({
</div>
<div className="space-y-1">
<Label>Anthropic API Key</Label>
<Label>{t("setup.anthropicApiKey")}</Label>
<Input
placeholder="Anthropic API Key"
placeholder={t("setup.anthropicApiKey")}
type="password"
value={anthropicAPIKey}
onChange={e => onAnthropicAPIKeyChange(e.target.value)}
@ -186,10 +186,10 @@ export const APIStep: FC<APIStepProps> = ({
</div>
<div className="space-y-1">
<Label>Google Gemini API Key</Label>
<Label>{t("setup.googleGeminiApiKey")}</Label>
<Input
placeholder="Google Gemini API Key"
placeholder={t("setup.googleGeminiApiKey")}
type="password"
value={googleGeminiAPIKey}
onChange={e => onGoogleGeminiAPIKeyChange(e.target.value)}
@ -197,10 +197,10 @@ export const APIStep: FC<APIStepProps> = ({
</div>
<div className="space-y-1">
<Label>Mistral API Key</Label>
<Label>{t("setup.mistralApiKey")}</Label>
<Input
placeholder="Mistral API Key"
placeholder={t("setup.mistralApiKey")}
type="password"
value={mistralAPIKey}
onChange={e => onMistralAPIKeyChange(e.target.value)}
@ -208,10 +208,10 @@ export const APIStep: FC<APIStepProps> = ({
</div>
<div className="space-y-1">
<Label>Groq API Key</Label>
<Label>{t("setup.groqApiKey")}</Label>
<Input
placeholder="Groq API Key"
placeholder={t("setup.groqApiKey")}
type="password"
value={groqAPIKey}
onChange={e => onGroqAPIKeyChange(e.target.value)}
@ -219,20 +219,20 @@ export const APIStep: FC<APIStepProps> = ({
</div>
<div className="space-y-1">
<Label>Perplexity API Key</Label>
<Label>{t("setup.perplexityApiKey")}</Label>
<Input
placeholder="Perplexity API Key"
placeholder={t("setup.perplexityApiKey")}
type="password"
value={perplexityAPIKey}
onChange={e => onPerplexityAPIKeyChange(e.target.value)}
/>
</div>
<div className="space-y-1">
<Label>OpenRouter API Key</Label>
<Label>{t("setup.openrouterApiKey")}</Label>
<Input
placeholder="OpenRouter API Key"
placeholder={t("setup.openrouterApiKey")}
type="password"
value={openrouterAPIKey}
onChange={e => onOpenrouterAPIKeyChange(e.target.value)}

View File

@ -5,11 +5,28 @@
"setup": {
"LetsCreateYourProfile": "Let's create your profile.",
"WelcomeToChatbotUI": "Welcome to Chatbot UI",
"WelcomeToChatbotUI": "Welcome to ChatAI UI",
"EnterAPIKeysForEachServiceYoudLikeToUse": "Enter API keys for each service you'd like to use.",
"SetAPIKeysOptional": "Set API Keys (optional)",
"YouAreAllSetUp": "You are all set up!",
"SetupComplete": "Setup Complete"
"SetupComplete": "Setup Complete",
"azureOpenaiEndpoint": "Azure OpenAI Endpoint",
"azureOpenai35TurboId": "Azure OpenAI GPT-3.5 Turbo ID",
"azureOpenai45TurboId": "Azure OpenAI GPT-4.5 Turbo ID",
"azureOpenai45VisionId": "Azure OpenAI GPT-4.5 Vision ID",
"azureOpenaiEmbeddingsId": "Azure OpenAI Embeddings ID",
"openaiOrgId": "OpenAI Organization ID",
"anthropicApiKey": "Anthropic API Key",
"googleGeminiApiKey": "Google Gemini API Key",
"mistralApiKey": "Mistral API Key",
"groqApiKey": "Groq API Key",
"perplexityApiKey": "Perplexity API Key",
"openrouterApiKey": "OpenRouter API Key",
"azureOpenaiApiKey": "Azure OpenAI API Key",
"openaiApiKey": "OpenAI API Key",
"switchToAzure": "Switch To Azure OpenAI",
"switchToOpenai": "Switch To Standard OpenAI",
"openaiOrgIdOptional": "OpenAI Organization ID (optional)"
},
"login": {

View File

@ -4,11 +4,28 @@
"Clock In": "始める",
"setup": {
"LetsCreateYourProfile": "プロフィールを作成しましょう。",
"WelcomeToChatbotUI": "Chatbot UIへようこそ",
"WelcomeToChatbotUI": "ChatAI UIへようこそ",
"EnterAPIKeysForEachServiceYoudLikeToUse": "使用する各サービスのAPIキーを入力してください。",
"SetAPIKeysOptional": "APIキーの設定オプション",
"YouAreAllSetUp": "設定が完了しました!",
"SetupComplete": "セットアップ完了"
"SetupComplete": "セットアップ完了",
"azureOpenaiEndpoint": "Azure OpenAI エンドポイント",
"azureOpenai35TurboId": "Azure OpenAI GPT-3.5 Turbo ID",
"azureOpenai45TurboId": "Azure OpenAI GPT-4.5 Turbo ID",
"azureOpenai45VisionId": "Azure OpenAI GPT-4.5 Vision ID",
"azureOpenaiEmbeddingsId": "Azure OpenAI 埋め込み ID",
"openaiOrgId": "OpenAI 組織 ID",
"anthropicApiKey": "Anthropic API キー",
"googleGeminiApiKey": "Google Gemini API キー",
"mistralApiKey": "Mistral API キー",
"groqApiKey": "Groq API キー",
"perplexityApiKey": "Perplexity API キー",
"openrouterApiKey": "OpenRouter API キー",
"azureOpenaiApiKey": "Azure OpenAI APIキー",
"openaiApiKey": "OpenAI APIキー",
"switchToAzure": "Azure OpenAIに切り替える",
"switchToOpenai": "標準のOpenAIに切り替える",
"openaiOrgIdOptional": "OpenAI組織ID任意"
},
"login": {

View File

@ -4,11 +4,28 @@
"Clock In": "开始",
"setup": {
"LetsCreateYourProfile": "让我们来创建您的个人资料。",
"WelcomeToChatbotUI": "欢迎使用 Chatbot UI",
"WelcomeToChatbotUI": "欢迎使用 ChatAI UI",
"EnterAPIKeysForEachServiceYoudLikeToUse": "输入您希望使用的每个服务的 API 密钥。",
"SetAPIKeysOptional": "设置 API 密钥(可选)",
"YouAreAllSetUp": "设置完成!",
"SetupComplete": "设置完成"
"SetupComplete": "设置完成",
"azureOpenaiEndpoint": "Azure OpenAI 接口地址",
"azureOpenai35TurboId": "Azure OpenAI GPT-3.5 Turbo 模型 ID",
"azureOpenai45TurboId": "Azure OpenAI GPT-4.5 Turbo 模型 ID",
"azureOpenai45VisionId": "Azure OpenAI GPT-4.5 Vision 模型 ID",
"azureOpenaiEmbeddingsId": "Azure OpenAI 向量嵌入模型 ID",
"openaiOrgId": "OpenAI 组织 ID",
"anthropicApiKey": "Anthropic API 密钥",
"googleGeminiApiKey": "谷歌 Gemini API 密钥",
"mistralApiKey": "Mistral API 密钥",
"groqApiKey": "Groq API 密钥",
"perplexityApiKey": "Perplexity API 密钥",
"openrouterApiKey": "OpenRouter API 密钥",
"azureOpenaiApiKey": "Azure OpenAI API 密钥",
"openaiApiKey": "OpenAI API 密钥",
"switchToAzure": "切换到 Azure OpenAI",
"switchToOpenai": "切换到标准 OpenAI",
"openaiOrgIdOptional": "OpenAI 组织 ID可选"
},
"login": {
@ -84,7 +101,7 @@
"openAIAPIKeySetByAdmin": "OpenAI API 密钥由管理员设置。",
"azureEndpointSetByAdmin": "Azure 端点由管理员设置。",
"azureDeploymentNameSetByAdmin": "Azure 部署名称由管理员设置。",
"geminiAPIKeySetByAdmin": "Google Gemini API 密钥由管理员设置。",
"geminiAPIKeySetByAdmin": "谷歌 Gemini API 密钥由管理员设置。",
"mistralAPIKeySetByAdmin": "Mistral API 密钥由管理员设置。",
"groqAPIKeySetByAdmin": "Groq API 密钥由管理员设置。",
"perplexityAPIKeySetByAdmin": "Perplexity API 密钥由管理员设置。",
@ -96,7 +113,7 @@
"azureEmbeddingsDeploymentName": "Azure Embeddings 部署名称",
"openaiOrgIdLabel": "OpenAI 组织 ID",
"anthropicApiKeyLabel": "Anthropic API 密钥",
"googleGeminiApiKeyLabel": "Google Gemini API 密钥",
"googleGeminiApiKeyLabel": "谷歌 Gemini API 密钥",
"mistralApiKeyLabel": "Mistral API 密钥",
"groqApiKeyLabel": "Groq API 密钥",
"perplexityApiKeyLabel": "Perplexity API 密钥",
@ -108,7 +125,7 @@
"azureEmbeddingsDeploymentNamePlaceholder": "Azure Embeddings 部署名称",
"openaiOrgIdPlaceholder": "OpenAI 组织 ID可选",
"anthropicApiKeyPlaceholder": "Anthropic API 密钥",
"googleGeminiApiKeyPlaceholder": "Google Gemini API 密钥",
"googleGeminiApiKeyPlaceholder": "谷歌 Gemini API 密钥",
"mistralApiKeyPlaceholder": "Mistral API 密钥",
"groqApiKeyPlaceholder": "Groq API 密钥",
"perplexityApiKeyPlaceholder": "Perplexity API 密钥",
@ -119,7 +136,7 @@
"azureEmbeddingsDeploymentNameSetByAdmin": "Azure Embeddings 部署名称由管理员设置。",
"openaiOrgIdSetByAdmin": "OpenAI 组织 ID 由管理员设置。",
"anthropicApiKeySetByAdmin": "Anthropic API 密钥由管理员设置。",
"googleGeminiApiKeySetByAdmin": "Google Gemini API 密钥由管理员设置。",
"googleGeminiApiKeySetByAdmin": "谷歌 Gemini API 密钥由管理员设置。",
"mistralApiKeySetByAdmin": "Mistral API 密钥由管理员设置。",
"groqApiKeySetByAdmin": "Groq API 密钥由管理员设置。",
"perplexityApiKeySetByAdmin": "Perplexity API 密钥由管理员设置。",