Skip to content

Commit

Permalink
✨ feat: support model list with model providers (lobehub#1916)
Browse files Browse the repository at this point in the history
✨ feat: support display model list
  • Loading branch information
arvinxx authored and Yanyutin753 committed Apr 10, 2024
1 parent fd34009 commit ec841cc
Show file tree
Hide file tree
Showing 243 changed files with 11,112 additions and 7,713 deletions.
8 changes: 3 additions & 5 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
# add a access code to lock your lobe-chat application, you can set a long password to avoid leaking. If this value contains a comma, it is a password array.
#ACCESS_CODE=lobe66

# add your custom model name, multi model separate by comma. for example gpt-3.5-1106,gpt-4-1106
# CUSTOM_MODELS=model1,model2,model3

# Specify your API Key selection method, currently supporting `random` and `turn`.
# API_KEY_SELECT_MODE=random

# ---- only choose one from OpenAI Service and Azure OpenAI Service ---- #

########################################
############ OpenAI Service ############
Expand All @@ -19,13 +15,15 @@ OPENAI_API_KEY=sk-xxxxxxxxx
# use a proxy to connect to the OpenAI API
# OPENAI_PROXY_URL=https://api.openai.com/v1

# add your custom model name, multi model separate by comma. for example gpt-3.5-1106,gpt-4-1106
#OPENAI_ENABLED_MODELS=gpt-3.5-turbo

########################################
######### Azure OpenAI Service #########
########################################
# you can learn azure OpenAI Service on https://learn.microsoft.com/en-us/azure/ai-services/openai/overview

# use Azure OpenAI Service by uncomment the following line
# USE_AZURE_OPENAI=1

# The API key you applied for on the Azure OpenAI account page, which can be found in the "Keys and Endpoints" section.
# AZURE_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/issue-close-require.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
actions: 'check-inactive'
token: ${{ secrets.GH_TOKEN }}
inactive-label: 'Inactive'
inactive-day: 30
inactive-day: 60

issue-close-require:
permissions:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Install bun
uses: oven-sh/setup-bun@v1
with:
bun-version: ${{ secrets.BUN_VERSION }}
bun-version: ${{ secrets.BUN_VERSION }}

- name: Install deps
run: bun i
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- name: Install bun
uses: oven-sh/setup-bun@v1
with:
bun-version: ${{ secrets.BUN_VERSION }}
bun-version: ${{ secrets.BUN_VERSION }}

- name: Install deps
run: bun i
Expand All @@ -23,3 +23,5 @@ jobs:

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }} # required
5 changes: 0 additions & 5 deletions docs/package.json

This file was deleted.

26 changes: 0 additions & 26 deletions locales/ar/common.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
{
"ModelSelect": {
"featureTag": {
"custom": "نموذج مخصص، يدعم الوظائف والتعرف على الرؤية، يرجى التحقق من قدرة النموذج على القيام بذلك وفقًا للحالة الفعلية",
"file": "يدعم هذا النموذج قراءة وتعرف على الملفات المرفقة",
"functionCall": "يدعم هذا النموذج استدعاء الوظائف",
"tokens": "هذا النموذج يدعم حتى {{tokens}} رموز في جلسة واحدة",
"vision": "يدعم هذا النموذج التعرف على الرؤية"
}
},
"about": "حول",
"advanceSettings": "إعدادات متقدمة",
"appInitializing": "جاري تهيئة LobeChat، يرجى الانتظار ...",
Expand Down Expand Up @@ -95,23 +86,6 @@
"zh-TW": "الصينية التقليدية"
},
"layoutInitializing": "جاري تحميل التخطيط...",
"modelProvider": {
"anthropic": "Anthropic",
"azure": "أزور",
"bedrock": "بيدروك لأمازون ويب سيرفيس",
"google": "جوجل",
"groq": "Groq",
"mistral": "Mistral AI",
"moonshot": "مونشوت الذكاء الاصطناعي",
"ollama": "أولاما",
"oneapi": "وان آبي آي",
"openai": "أوبن إيه آي",
"openrouter": "OpenRouter",
"perplexity": "Perplexity",
"togetherai": "TogetherAI",
"zeroone": "01.AI الصفر والواحد",
"zhipu": "Zhipu"
},
"noDescription": "لا توجد وصف",
"oauth": "تسجيل الدخول SSO",
"ok": "موافق",
Expand Down
15 changes: 15 additions & 0 deletions locales/ar/components.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"ModelSelect": {
"featureTag": {
"custom": "نموذج مخصص، الإعداد الافتراضي يدعم الاستدعاء الوظيفي والتعرف البصري، يرجى التحقق من قدرة النموذج على القيام بذلك بناءً على الحالة الفعلية",
"file": "يدعم هذا النموذج قراءة وتعرف الملفات المرفوعة",
"functionCall": "يدعم هذا النموذج استدعاء الوظائف",
"tokens": "يدعم هذا النموذج حتى {{tokens}} رمزًا في جلسة واحدة",
"vision": "يدعم هذا النموذج التعرف البصري"
}
},
"ModelSwitchPanel": {
"emptyModel": "لا توجد نماذج ممكن تمكينها، يرجى الانتقال إلى الإعدادات لتمكينها",
"provider": "مزود"
}
}
53 changes: 1 addition & 52 deletions locales/ar/error.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,58 +85,7 @@
"responseError": "فشل طلب الخدمة، يرجى التحقق من الإعدادات أو إعادة المحاولة"
},
"unlock": {
"apikey": {
"Anthropic": {
"description": "أدخل مفتاح Anthropic API الخاص بك للبدء في الجلسة. لن يقوم التطبيق بتسجيل مفتاح الواجهة البرمجية الخاص بك",
"title": "استخدام مفتاح واجهة برمجة التطبيقات الخاص بـ Anthropic"
},
"Bedrock": {
"customRegion": "منطقة خدمة مخصصة",
"description": "أدخل مفتاح الوصول الخاص بك لـ AWS AccessKeyId / SecretAccessKey لبدء الجلسة. لن يقوم التطبيق بتسجيل تكوين المصادقة الخاص بك",
"title": "استخدام معلومات مصادقة Bedrock المخصصة"
},
"Google": {
"description": "أدخل مفتاح Google API الخاص بك لبدء الجلسة. لن يقوم التطبيق بتسجيل مفتاح الواجهة البرمجية الخاص بك",
"title": "استخدام مفتاح Google API المخصص"
},
"Groq": {
"description": "قم بإدخال مفتاح API الخاص بك لـ Groq للبدء في الجلسة. لن يتم تسجيل مفتاح الخاص بك من قبل التطبيق",
"title": "استخدام مفتاح API الخاص بـ Groq المخصص"
},
"Mistral": {
"description": "أدخل مفتاح Mistral AI API الخاص بك لبدء الجلسة. لن يتم تسجيل مفتاح الواجهة البرمجية الخاص بك من قبل التطبيق",
"title": "استخدام مفتاح Mistral AI API المخصص"
},
"Moonshot": {
"description": "قم بإدخال مفتاح API الخاص بك لـ Moonshot AI لبدء الجلسة. لن يتم تسجيل مفتاح الـ API الخاص بك من قبل التطبيق",
"title": "استخدام مفتاح API مخصص لـ Moonshot AI"
},
"OpenAI": {
"addProxyUrl": "إضافة عنوان وكيل OpenAI (اختياري)",
"description": "أدخل مفتاح OpenAI API الخاص بك لبدء الجلسة. لن يقوم التطبيق بتسجيل مفتاح الواجهة البرمجية الخاص بك",
"title": "استخدام مفتاح OpenAI API المخصص"
},
"OpenRouter": {
"description": "أدخل مفتاح OpenRouter API الخاص بك للبدء في الجلسة. لن يتم تسجيل مفتاح الخاص بك من قبل التطبيق",
"title": "استخدام مفتاح OpenRouter API المخصص"
},
"Perplexity": {
"description": "أدخل مفتاح Perplexity API الخاص بك للبدء في الجلسة. لن يتم تسجيل مفتاح الواجهة البرمجية لتطبيقات الجلسة",
"title": "استخدام مفتاح Perplexity API المخصص"
},
"TogetherAI": {
"description": "أدخل مفتاح TogetherAI API الخاص بك للبدء في الجلسة. لن يتم تسجيل مفتاح الخاص بك من قبل التطبيق",
"title": "استخدام مفتاح TogetherAI API المخصص"
},
"ZeroOne": {
"description": "أدخل مفتاح ZeroOne API الخاص بك لبدء الجلسة. لن يتم تسجيل مفتاح الواجهة البرمجية لتطبيقك",
"title": "استخدام مفتاح واجهة برمجة التطبيقات الخاص بك لـ ZeroOne"
},
"Zhipu": {
"description": "أدخل مفتاح Zhipu API الخاص بك لبدء الجلسة. لن يقوم التطبيق بتسجيل مفتاح الواجهة البرمجية الخاص بك",
"title": "استخدام مفتاح Zhipu API المخصص"
}
},
"addProxyUrl": "إضافة عنوان وكيل OpenAI (اختياري)",
"closeMessage": "إغلاق الرسالة",
"confirm": "تأكيد وإعادة المحاولة",
"model": {
Expand Down
Loading

0 comments on commit ec841cc

Please sign in to comment.