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

🐛 fix: fix provider form api key #6115

Merged
merged 2 commits into from
Feb 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions locales/ar/modelProvider.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
"createNewAiProvider": {
"apiKey": {
"placeholder": "يرجى إدخال مفتاح API الخاص بك",
"required": "يرجى إدخال مفتاح API الخاص بك",
"title": "مفتاح API"
},
"basicTitle": "المعلومات الأساسية",
Expand Down Expand Up @@ -94,7 +93,8 @@
"title": "اسم المزود"
},
"proxyUrl": {
"placeholder": "يرجى إدخال عنوان الطلب الخاص بك، إذا لم يتم إدخاله سيتم استخدام عنوان الطلب المقابل لـ SDK",
"placeholder": "يرجى إدخال عنوان الطلب الخاص بك",
"required": "يرجى إدخال عنوان الوكيل",
"title": "عنوان الوكيل"
},
"sdkType": {
Expand Down
4 changes: 2 additions & 2 deletions locales/bg-BG/modelProvider.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
"createNewAiProvider": {
"apiKey": {
"placeholder": "Моля, въведете вашия API ключ",
"required": "Моля, въведете вашия API ключ",
"title": "API ключ"
},
"basicTitle": "Основна информация",
Expand Down Expand Up @@ -94,7 +93,8 @@
"title": "Име на доставчика"
},
"proxyUrl": {
"placeholder": "Моля, въведете адреса на вашето запитване, ако не е попълнен, ще се използва съответния адрес на SDK",
"placeholder": "Моля, въведете адреса на вашето запитване",
"required": "Моля, въведете адреса на проксито",
"title": "Адрес на прокси"
},
"sdkType": {
Expand Down
4 changes: 2 additions & 2 deletions locales/de-DE/modelProvider.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
"createNewAiProvider": {
"apiKey": {
"placeholder": "Bitte geben Sie Ihren API-Schlüssel ein",
"required": "Bitte geben Sie Ihren API-Schlüssel ein",
"title": "API-Schlüssel"
},
"basicTitle": "Grundinformationen",
Expand Down Expand Up @@ -94,7 +93,8 @@
"title": "Name des Anbieters"
},
"proxyUrl": {
"placeholder": "Bitte geben Sie Ihre Anforderungsadresse ein, wenn nicht angegeben, wird die entsprechende Anforderungsadresse des SDK verwendet",
"placeholder": "Bitte geben Sie Ihre Anforderungs-URL ein",
"required": "Bitte geben Sie die Proxy-Adresse ein",
"title": "Proxy-Adresse"
},
"sdkType": {
Expand Down
4 changes: 2 additions & 2 deletions locales/en-US/modelProvider.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
"createNewAiProvider": {
"apiKey": {
"placeholder": "Please enter your API Key",
"required": "Please enter your API Key",
"title": "API Key"
},
"basicTitle": "Basic Information",
Expand Down Expand Up @@ -94,7 +93,8 @@
"title": "Provider Name"
},
"proxyUrl": {
"placeholder": "Please enter your request URL, if left blank, the corresponding SDK request URL will be used",
"placeholder": "Please enter your request URL",
"required": "Please enter the proxy address",
"title": "Proxy URL"
},
"sdkType": {
Expand Down
4 changes: 2 additions & 2 deletions locales/es-ES/modelProvider.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
"createNewAiProvider": {
"apiKey": {
"placeholder": "Por favor, introduce tu API Key",
"required": "Por favor, introduce tu API Key",
"title": "API Key"
},
"basicTitle": "Información básica",
Expand Down Expand Up @@ -94,7 +93,8 @@
"title": "Nombre del proveedor"
},
"proxyUrl": {
"placeholder": "Por favor, introduce tu dirección de solicitud, si no se completa, se usará la dirección de solicitud correspondiente del SDK",
"placeholder": "Por favor, introduce tu dirección de solicitud",
"required": "Por favor, introduce la dirección del proxy",
"title": "Dirección del proxy"
},
"sdkType": {
Expand Down
4 changes: 2 additions & 2 deletions locales/fa-IR/modelProvider.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
"createNewAiProvider": {
"apiKey": {
"placeholder": "لطفاً کلید API خود را وارد کنید",
"required": "لطفاً کلید API خود را وارد کنید",
"title": "کلید API"
},
"basicTitle": "اطلاعات پایه",
Expand Down Expand Up @@ -94,7 +93,8 @@
"title": "نام ارائه‌دهنده"
},
"proxyUrl": {
"placeholder": "لطفاً آدرس درخواست خود را وارد کنید، در صورت عدم وارد کردن از آدرس درخواست مربوط به SDK استفاده خواهد شد",
"placeholder": "لطفاً آدرس درخواست خود را وارد کنید",
"required": "لطفاً آدرس پروکسی را وارد کنید",
"title": "آدرس پروکسی"
},
"sdkType": {
Expand Down
4 changes: 2 additions & 2 deletions locales/fr-FR/modelProvider.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
"createNewAiProvider": {
"apiKey": {
"placeholder": "Veuillez entrer votre clé API",
"required": "Veuillez entrer votre clé API",
"title": "Clé API"
},
"basicTitle": "Informations de base",
Expand Down Expand Up @@ -94,7 +93,8 @@
"title": "Nom du fournisseur"
},
"proxyUrl": {
"placeholder": "Veuillez entrer votre adresse de requête, sinon l'adresse de requête correspondante au SDK sera utilisée",
"placeholder": "Veuillez saisir votre adresse de requête",
"required": "Veuillez remplir l'adresse du proxy",
"title": "Adresse du proxy"
},
"sdkType": {
Expand Down
4 changes: 2 additions & 2 deletions locales/it-IT/modelProvider.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
"createNewAiProvider": {
"apiKey": {
"placeholder": "Inserisci la tua API Key",
"required": "Inserisci la tua API Key",
"title": "API Key"
},
"basicTitle": "Informazioni di base",
Expand Down Expand Up @@ -94,7 +93,8 @@
"title": "Nome del fornitore"
},
"proxyUrl": {
"placeholder": "Inserisci il tuo indirizzo di richiesta, se non specificato verrà utilizzato l'indirizzo di richiesta corrispondente all'SDK",
"placeholder": "Inserisci il tuo URL di richiesta",
"required": "Inserisci l'indirizzo del proxy",
"title": "Indirizzo proxy"
},
"sdkType": {
Expand Down
4 changes: 2 additions & 2 deletions locales/ja-JP/modelProvider.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
"createNewAiProvider": {
"apiKey": {
"placeholder": "あなたの API キーを入力してください",
"required": "あなたの API キーを入力してください",
"title": "API キー"
},
"basicTitle": "基本情報",
Expand Down Expand Up @@ -94,7 +93,8 @@
"title": "サービスプロバイダー名"
},
"proxyUrl": {
"placeholder": "リクエストアドレスを入力してください。未入力の場合は SDK に対応するリクエストアドレスが使用されます",
"placeholder": "リクエストURLを入力してください",
"required": "プロキシURLを入力してください",
"title": "プロキシアドレス"
},
"sdkType": {
Expand Down
4 changes: 2 additions & 2 deletions locales/ko-KR/modelProvider.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
"createNewAiProvider": {
"apiKey": {
"placeholder": "API 키를 입력하세요",
"required": "API 키를 입력하세요",
"title": "API 키"
},
"basicTitle": "기본 정보",
Expand Down Expand Up @@ -94,7 +93,8 @@
"title": "서비스 제공자 이름"
},
"proxyUrl": {
"placeholder": "요청 주소를 입력하세요, 입력하지 않으면 SDK의 요청 주소가 사용됩니다",
"placeholder": "요청 주소를 입력하세요",
"required": "프록시 주소를 입력하세요",
"title": "프록시 주소"
},
"sdkType": {
Expand Down
4 changes: 2 additions & 2 deletions locales/nl-NL/modelProvider.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
"createNewAiProvider": {
"apiKey": {
"placeholder": "Vul je API-sleutel in",
"required": "Vul je API-sleutel in",
"title": "API-sleutel"
},
"basicTitle": "Basisinformatie",
Expand Down Expand Up @@ -94,7 +93,8 @@
"title": "Naam van de provider"
},
"proxyUrl": {
"placeholder": "Vul je aanvraagadres in, als je dit niet invult, wordt het overeenkomstige aanvraagadres van de SDK gebruikt",
"placeholder": "Vul je verzoekadres in",
"required": "Vul het proxyadres in",
"title": "Proxy-adres"
},
"sdkType": {
Expand Down
4 changes: 2 additions & 2 deletions locales/pl-PL/modelProvider.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
"createNewAiProvider": {
"apiKey": {
"placeholder": "Proszę wpisać swój klucz API",
"required": "Proszę wpisać swój klucz API",
"title": "Klucz API"
},
"basicTitle": "Podstawowe informacje",
Expand Down Expand Up @@ -94,7 +93,8 @@
"title": "Nazwa dostawcy"
},
"proxyUrl": {
"placeholder": "Proszę wpisać adres żądania, jeśli nie zostanie podany, użyty zostanie odpowiedni adres żądania SDK",
"placeholder": "Proszę wpisać adres żądania",
"required": "Proszę wpisać adres proxy",
"title": "Adres proxy"
},
"sdkType": {
Expand Down
4 changes: 2 additions & 2 deletions locales/pt-BR/modelProvider.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
"createNewAiProvider": {
"apiKey": {
"placeholder": "Por favor, insira sua API Key",
"required": "Por favor, insira sua API Key",
"title": "API Key"
},
"basicTitle": "Informações Básicas",
Expand Down Expand Up @@ -94,7 +93,8 @@
"title": "Nome do Provedor"
},
"proxyUrl": {
"placeholder": "Por favor, insira seu endereço de requisição, se não for preenchido, será usado o endereço correspondente do SDK",
"placeholder": "Por favor, insira o seu endereço de solicitação",
"required": "Por favor, insira o endereço do proxy",
"title": "Endereço do Proxy"
},
"sdkType": {
Expand Down
4 changes: 2 additions & 2 deletions locales/ru-RU/modelProvider.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
"createNewAiProvider": {
"apiKey": {
"placeholder": "Пожалуйста, введите ваш API Key",
"required": "Пожалуйста, введите ваш API Key",
"title": "API Key"
},
"basicTitle": "Основная информация",
Expand Down Expand Up @@ -94,7 +93,8 @@
"title": "Имя провайдера"
},
"proxyUrl": {
"placeholder": "Пожалуйста, введите ваш адрес запроса, если не заполните, будет использован соответствующий адрес SDK",
"placeholder": "Пожалуйста, введите ваш адрес запроса",
"required": "Пожалуйста, введите адрес прокси",
"title": "Адрес прокси"
},
"sdkType": {
Expand Down
4 changes: 2 additions & 2 deletions locales/tr-TR/modelProvider.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
"createNewAiProvider": {
"apiKey": {
"placeholder": "Lütfen API Anahtarınızı girin",
"required": "Lütfen API Anahtarınızı girin",
"title": "API Anahtarı"
},
"basicTitle": "Temel Bilgiler",
Expand Down Expand Up @@ -94,7 +93,8 @@
"title": "Hizmet Sağlayıcı Adı"
},
"proxyUrl": {
"placeholder": "Lütfen istek adresinizi girin, boş bırakılırsa SDK'nın ilgili istek adresi kullanılacaktır",
"placeholder": "Lütfen istek adresinizi girin",
"required": "Lütfen proxy adresini girin",
"title": "Proxy Adresi"
},
"sdkType": {
Expand Down
4 changes: 2 additions & 2 deletions locales/vi-VN/modelProvider.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
"createNewAiProvider": {
"apiKey": {
"placeholder": "Vui lòng nhập API Key của bạn",
"required": "Vui lòng nhập API Key của bạn",
"title": "API Key"
},
"basicTitle": "Thông tin cơ bản",
Expand Down Expand Up @@ -94,7 +93,8 @@
"title": "Tên nhà cung cấp"
},
"proxyUrl": {
"placeholder": "Vui lòng nhập địa chỉ yêu cầu của bạn, nếu không sẽ sử dụng địa chỉ yêu cầu tương ứng của SDK",
"placeholder": "Vui lòng nhập địa chỉ yêu cầu của bạn",
"required": "Vui lòng nhập địa chỉ proxy",
"title": "Địa chỉ proxy"
},
"sdkType": {
Expand Down
6 changes: 3 additions & 3 deletions locales/zh-CN/modelProvider.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
"createNewAiProvider": {
"apiKey": {
"placeholder": "请填写你的 API Key",
"required": "请填写你的 API Key",
"title": "API Key"
},
"basicTitle": "基本信息",
Expand Down Expand Up @@ -94,7 +93,8 @@
"title": "服务商名称"
},
"proxyUrl": {
"placeholder": "请填写你的请求地址,如果不填则会使用 SDK 对应的请求地址",
"placeholder": "请填写你的请求地址",
"required": "请填写代理地址",
"title": "代理地址"
},
"sdkType": {
Expand Down Expand Up @@ -305,4 +305,4 @@
"zhipu": {
"title": "智谱"
}
}
}
4 changes: 2 additions & 2 deletions locales/zh-TW/modelProvider.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
"createNewAiProvider": {
"apiKey": {
"placeholder": "請填寫你的 API Key",
"required": "請填寫你的 API Key",
"title": "API Key"
},
"basicTitle": "基本資訊",
Expand Down Expand Up @@ -94,7 +93,8 @@
"title": "服務商名稱"
},
"proxyUrl": {
"placeholder": "請填寫你的請求地址,如果不填則會使用 SDK 對應的請求地址",
"placeholder": "請填寫你的請求地址",
"required": "請填寫代理地址",
"title": "代理地址"
},
"sdkType": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,21 @@ const CreateNewProvider = memo<CreateNewProviderProps>(({ onClose, open }) => {
options={[
{ label: 'OpenAI', value: 'openai' },
{ label: 'Anthropic', value: 'anthropic' },
{ label: 'Ollama', value: 'ollama' },
]}
/>
),
label: t('createNewAiProvider.sdkType.title'),
name: 'sdkType',
rules: [{ message: t('createNewAiProvider.sdkType.required'), required: true }],
},
{
children: <Input allowClear placeholder={'https://xxxx-proxy.com/v1'} variant={'filled'} />,
label: t('createNewAiProvider.proxyUrl.title'),
minWidth: 400,
name: [KeyVaultsConfigKey, LLMProviderBaseUrlKey],
rules: [{ message: t('createNewAiProvider.proxyUrl.required'), required: true }],
},
{
children: (
<Input.Password
Expand All @@ -109,14 +117,6 @@ const CreateNewProvider = memo<CreateNewProviderProps>(({ onClose, open }) => {
label: t('createNewAiProvider.apiKey.title'),
minWidth: 400,
name: [KeyVaultsConfigKey, LLMProviderApiTokenKey],
rules: [{ message: t('createNewAiProvider.apiKey.required'), required: true }],
},
{
children: <Input allowClear placeholder={'https://xxxx-proxy.com/v1'} variant={'filled'} />,
desc: t('createNewAiProvider.proxyUrl.placeholder'),
label: t('createNewAiProvider.proxyUrl.title'),
minWidth: 400,
name: [KeyVaultsConfigKey, LLMProviderBaseUrlKey],
},
];

Expand Down
3 changes: 1 addition & 2 deletions src/locales/default/modelProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ export default {
createNewAiProvider: {
apiKey: {
placeholder: '请填写你的 API Key',
required: '请填写你的 API Key',
title: 'API Key',
},
basicTitle: '基本信息',
Expand Down Expand Up @@ -95,7 +94,7 @@ export default {
title: '服务商名称',
},
proxyUrl: {
placeholder: '请填写你的请求地址,如果不填则会使用 SDK 对应的请求地址',
required: '请填写代理地址',
title: '代理地址',
},
sdkType: {
Expand Down
4 changes: 2 additions & 2 deletions src/server/manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ export class Manifest {
screenshots: screenshots.map((item) => this._getScreenshot(item)),
short_name: name,
splash_pages: null,
start_url: '.',
start_url: '/chat',
tab_strip: {
new_tab_button: {
url: '/',
url: '/chat',
},
},
theme_color: color,
Expand Down
Loading