Skip to content

Commit 0895dd2

Browse files
authored
✨ feat: support model list with model providers (lobehub#1916)
✨ feat: support display model list
2 parents cef3f8c + 67ed8c2 commit 0895dd2

File tree

249 files changed

+11821
-7938
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

249 files changed

+11821
-7938
lines changed

.env.example

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
# 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.
22
#ACCESS_CODE=lobe66
33

4-
# add your custom model name, multi model separate by comma. for example gpt-3.5-1106,gpt-4-1106
5-
# CUSTOM_MODELS=model1,model2,model3
6-
74
# Specify your API Key selection method, currently supporting `random` and `turn`.
85
# API_KEY_SELECT_MODE=random
96

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

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

18+
# add your custom model name, multi model separate by comma. for example gpt-3.5-1106,gpt-4-1106
19+
#OPENAI_ENABLED_MODELS=gpt-3.5-turbo
20+
2221
########################################
2322
######### Azure OpenAI Service #########
2423
########################################
2524
# you can learn azure OpenAI Service on https://learn.microsoft.com/en-us/azure/ai-services/openai/overview
2625

2726
# use Azure OpenAI Service by uncomment the following line
28-
# USE_AZURE_OPENAI=1
2927

3028
# The API key you applied for on the Azure OpenAI account page, which can be found in the "Keys and Endpoints" section.
3129
# AZURE_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

.github/workflows/issue-close-require.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
actions: 'check-inactive'
2121
token: ${{ secrets.GH_TOKEN }}
2222
inactive-label: 'Inactive'
23-
inactive-day: 30
23+
inactive-day: 60
2424

2525
issue-close-require:
2626
permissions:

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- name: Install bun
1515
uses: oven-sh/setup-bun@v1
1616
with:
17-
bun-version: ${{ secrets.BUN_VERSION }}
17+
bun-version: ${{ secrets.BUN_VERSION }}
1818

1919
- name: Install deps
2020
run: bun i

.github/workflows/test.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
- name: Install bun
1111
uses: oven-sh/setup-bun@v1
1212
with:
13-
bun-version: ${{ secrets.BUN_VERSION }}
13+
bun-version: ${{ secrets.BUN_VERSION }}
1414

1515
- name: Install deps
1616
run: bun i
@@ -23,3 +23,5 @@ jobs:
2323

2424
- name: Upload coverage to Codecov
2525
uses: codecov/codecov-action@v4
26+
with:
27+
token: ${{ secrets.CODECOV_TOKEN }} # required

.i18nrc.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,12 @@ module.exports = defineConfig({
2424
],
2525
temperature: 0,
2626
modelName: 'gpt-3.5-turbo-0125',
27-
splitToken: 1024,
27+
splitToken: 2048,
2828
experimental: {
2929
jsonMode: true,
3030
},
31-
reference:
32-
'You need to maintain the component format of MDX, and the output text does not need to be wrapped in any code block syntax at the outermost level.',
3331
markdown: {
32+
// reference: '你需要保持 mdx 的组件格式,输出文本不需要在最外层包裹任何代码块语法',
3433
entry: ['./README.zh-CN.md', './contributing/**/*.zh-CN.md', './docs/**/*.zh-CN.mdx'],
3534
entryLocale: 'zh-CN',
3635
outputLocales: ['en-US'],

docs/package.json

-5
This file was deleted.

locales/ar/common.json

-26
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,4 @@
11
{
2-
"ModelSelect": {
3-
"featureTag": {
4-
"custom": "نموذج مخصص، يدعم الوظائف والتعرف على الرؤية، يرجى التحقق من قدرة النموذج على القيام بذلك وفقًا للحالة الفعلية",
5-
"file": "يدعم هذا النموذج قراءة وتعرف على الملفات المرفقة",
6-
"functionCall": "يدعم هذا النموذج استدعاء الوظائف",
7-
"tokens": "هذا النموذج يدعم حتى {{tokens}} رموز في جلسة واحدة",
8-
"vision": "يدعم هذا النموذج التعرف على الرؤية"
9-
}
10-
},
112
"about": "حول",
123
"advanceSettings": "إعدادات متقدمة",
134
"appInitializing": "جاري تهيئة LobeChat، يرجى الانتظار ...",
@@ -95,23 +86,6 @@
9586
"zh-TW": "الصينية التقليدية"
9687
},
9788
"layoutInitializing": "جاري تحميل التخطيط...",
98-
"modelProvider": {
99-
"anthropic": "Anthropic",
100-
"azure": "أزور",
101-
"bedrock": "بيدروك لأمازون ويب سيرفيس",
102-
"google": "جوجل",
103-
"groq": "Groq",
104-
"mistral": "Mistral AI",
105-
"moonshot": "مونشوت الذكاء الاصطناعي",
106-
"ollama": "أولاما",
107-
"oneapi": "وان آبي آي",
108-
"openai": "أوبن إيه آي",
109-
"openrouter": "OpenRouter",
110-
"perplexity": "Perplexity",
111-
"togetherai": "TogetherAI",
112-
"zeroone": "01.AI الصفر والواحد",
113-
"zhipu": "Zhipu"
114-
},
11589
"noDescription": "لا توجد وصف",
11690
"oauth": "تسجيل الدخول SSO",
11791
"ok": "موافق",

locales/ar/components.json

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"ModelSelect": {
3+
"featureTag": {
4+
"custom": "نموذج مخصص، الإعداد الافتراضي يدعم الاستدعاء الوظيفي والتعرف البصري، يرجى التحقق من قدرة النموذج على القيام بذلك بناءً على الحالة الفعلية",
5+
"file": "يدعم هذا النموذج قراءة وتعرف الملفات المرفوعة",
6+
"functionCall": "يدعم هذا النموذج استدعاء الوظائف",
7+
"tokens": "يدعم هذا النموذج حتى {{tokens}} رمزًا في جلسة واحدة",
8+
"vision": "يدعم هذا النموذج التعرف البصري"
9+
}
10+
},
11+
"ModelSwitchPanel": {
12+
"emptyModel": "لا توجد نماذج ممكن تمكينها، يرجى الانتقال إلى الإعدادات لتمكينها",
13+
"provider": "مزود"
14+
}
15+
}

locales/ar/error.json

+1-52
Original file line numberDiff line numberDiff line change
@@ -85,58 +85,7 @@
8585
"responseError": "فشل طلب الخدمة، يرجى التحقق من الإعدادات أو إعادة المحاولة"
8686
},
8787
"unlock": {
88-
"apikey": {
89-
"Anthropic": {
90-
"description": "أدخل مفتاح Anthropic API الخاص بك للبدء في الجلسة. لن يقوم التطبيق بتسجيل مفتاح الواجهة البرمجية الخاص بك",
91-
"title": "استخدام مفتاح واجهة برمجة التطبيقات الخاص بـ Anthropic"
92-
},
93-
"Bedrock": {
94-
"customRegion": "منطقة خدمة مخصصة",
95-
"description": "أدخل مفتاح الوصول الخاص بك لـ AWS AccessKeyId / SecretAccessKey لبدء الجلسة. لن يقوم التطبيق بتسجيل تكوين المصادقة الخاص بك",
96-
"title": "استخدام معلومات مصادقة Bedrock المخصصة"
97-
},
98-
"Google": {
99-
"description": "أدخل مفتاح Google API الخاص بك لبدء الجلسة. لن يقوم التطبيق بتسجيل مفتاح الواجهة البرمجية الخاص بك",
100-
"title": "استخدام مفتاح Google API المخصص"
101-
},
102-
"Groq": {
103-
"description": "قم بإدخال مفتاح API الخاص بك لـ Groq للبدء في الجلسة. لن يتم تسجيل مفتاح الخاص بك من قبل التطبيق",
104-
"title": "استخدام مفتاح API الخاص بـ Groq المخصص"
105-
},
106-
"Mistral": {
107-
"description": "أدخل مفتاح Mistral AI API الخاص بك لبدء الجلسة. لن يتم تسجيل مفتاح الواجهة البرمجية الخاص بك من قبل التطبيق",
108-
"title": "استخدام مفتاح Mistral AI API المخصص"
109-
},
110-
"Moonshot": {
111-
"description": "قم بإدخال مفتاح API الخاص بك لـ Moonshot AI لبدء الجلسة. لن يتم تسجيل مفتاح الـ API الخاص بك من قبل التطبيق",
112-
"title": "استخدام مفتاح API مخصص لـ Moonshot AI"
113-
},
114-
"OpenAI": {
115-
"addProxyUrl": "إضافة عنوان وكيل OpenAI (اختياري)",
116-
"description": "أدخل مفتاح OpenAI API الخاص بك لبدء الجلسة. لن يقوم التطبيق بتسجيل مفتاح الواجهة البرمجية الخاص بك",
117-
"title": "استخدام مفتاح OpenAI API المخصص"
118-
},
119-
"OpenRouter": {
120-
"description": "أدخل مفتاح OpenRouter API الخاص بك للبدء في الجلسة. لن يتم تسجيل مفتاح الخاص بك من قبل التطبيق",
121-
"title": "استخدام مفتاح OpenRouter API المخصص"
122-
},
123-
"Perplexity": {
124-
"description": "أدخل مفتاح Perplexity API الخاص بك للبدء في الجلسة. لن يتم تسجيل مفتاح الواجهة البرمجية لتطبيقات الجلسة",
125-
"title": "استخدام مفتاح Perplexity API المخصص"
126-
},
127-
"TogetherAI": {
128-
"description": "أدخل مفتاح TogetherAI API الخاص بك للبدء في الجلسة. لن يتم تسجيل مفتاح الخاص بك من قبل التطبيق",
129-
"title": "استخدام مفتاح TogetherAI API المخصص"
130-
},
131-
"ZeroOne": {
132-
"description": "أدخل مفتاح ZeroOne API الخاص بك لبدء الجلسة. لن يتم تسجيل مفتاح الواجهة البرمجية لتطبيقك",
133-
"title": "استخدام مفتاح واجهة برمجة التطبيقات الخاص بك لـ ZeroOne"
134-
},
135-
"Zhipu": {
136-
"description": "أدخل مفتاح Zhipu API الخاص بك لبدء الجلسة. لن يقوم التطبيق بتسجيل مفتاح الواجهة البرمجية الخاص بك",
137-
"title": "استخدام مفتاح Zhipu API المخصص"
138-
}
139-
},
88+
"addProxyUrl": "إضافة عنوان وكيل OpenAI (اختياري)",
14089
"closeMessage": "إغلاق الرسالة",
14190
"confirm": "تأكيد وإعادة المحاولة",
14291
"model": {

0 commit comments

Comments
 (0)