@lobehub/chat 1.9.0 → 1.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.env.example CHANGED
@@ -33,7 +33,7 @@ OPENAI_API_KEY=sk-xxxxxxxxx
33
33
  # AZURE_ENDPOINT=https://docs-test-001.openai.azure.com
34
34
 
35
35
  # Azure's API version, follows the YYYY-MM-DD format
36
- # AZURE_API_VERSION=2024-02-01
36
+ # AZURE_API_VERSION=2024-06-01
37
37
 
38
38
 
39
39
  ### Anthropic Service ####
package/CHANGELOG.md CHANGED
@@ -2,6 +2,56 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ### [Version 1.9.2](https://github.com/lobehub/lobe-chat/compare/v1.9.1...v1.9.2)
6
+
7
+ <sup>Released on **2024-08-05**</sup>
8
+
9
+ #### 💄 Styles
10
+
11
+ - **config**: Update Azure model and API versions.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### Styles
19
+
20
+ - **config**: Update Azure model and API versions, closes [#3405](https://github.com/lobehub/lobe-chat/issues/3405) ([a4938eb](https://github.com/lobehub/lobe-chat/commit/a4938eb))
21
+
22
+ </details>
23
+
24
+ <div align="right">
25
+
26
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
27
+
28
+ </div>
29
+
30
+ ### [Version 1.9.1](https://github.com/lobehub/lobe-chat/compare/v1.9.0...v1.9.1)
31
+
32
+ <sup>Released on **2024-08-05**</sup>
33
+
34
+ #### 🐛 Bug Fixes
35
+
36
+ - **misc**: Azure modelTag icon display.
37
+
38
+ <br/>
39
+
40
+ <details>
41
+ <summary><kbd>Improvements and Fixes</kbd></summary>
42
+
43
+ #### What's fixed
44
+
45
+ - **misc**: Azure modelTag icon display, closes [#3394](https://github.com/lobehub/lobe-chat/issues/3394) ([ee6baa8](https://github.com/lobehub/lobe-chat/commit/ee6baa8))
46
+
47
+ </details>
48
+
49
+ <div align="right">
50
+
51
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
52
+
53
+ </div>
54
+
5
55
  ## [Version 1.9.0](https://github.com/lobehub/lobe-chat/compare/v1.8.2...v1.9.0)
6
56
 
7
57
  <sup>Released on **2024-08-05**</sup>
@@ -28,7 +28,7 @@ LobeChat 支持使用 [Azure OpenAI](https://learn.microsoft.com/zh-cn/azure/ai-
28
28
 
29
29
  - **APIKey**:你在 Azure OpenAI 账户页面申请的 API 密钥,可在 “密钥和终结点” 部分中找到此值
30
30
  - **API 地址**:Azure API 地址,从 Azure 门户检查资源时,可在 “密钥和终结点” 部分中找到此值
31
- - **Azure Api Version**: Azure 的 API 版本,遵循 YYYY-MM-DD 格式,查阅[最新版本](https://learn.microsoft.com/zh-cn/azure/ai-services/openai/reference#chat-completions)
31
+ - **Azure API Version**: Azure 的 API 版本,遵循 YYYY-MM-DD 格式,查阅[最新版本](https://learn.microsoft.com/zh-cn/azure/ai-services/openai/reference#chat-completions)
32
32
  - **模型列表**: 用来控制模型列表,你可以自行配置你的部署模型。
33
33
 
34
34
  完成上述字段配置后,点击「检查」,如果提示「检查通过」,则说明配置成功。
@@ -3,7 +3,7 @@
3
3
  "azureApiVersion": {
4
4
  "desc": "نسخة API الخاصة بـ Azure، والتي تتبع تنسيق YYYY-MM-DD، راجع [الإصدارات الأحدث](https://learn.microsoft.com/zh-en/azure/ai-services/openai/reference#chat-completions)",
5
5
  "fetch": "جلب القائمة",
6
- "title": "Azure Api Version"
6
+ "title": "Azure API Version"
7
7
  },
8
8
  "empty": "الرجاء إدخال معرف النموذج لإضافة أول نموذج",
9
9
  "endpoint": {
@@ -3,7 +3,7 @@
3
3
  "azureApiVersion": {
4
4
  "desc": "Версия на Azure API, в формат YYYY-MM-DD, вижте [най-новата версия](https://learn.microsoft.com/zh-cn/azure/ai-services/openai/reference#chat-completions)",
5
5
  "fetch": "Извличане на списък",
6
- "title": "Версия на Azure Api"
6
+ "title": "Версия на Azure API"
7
7
  },
8
8
  "empty": "Моля, въведете идентификатор на модела, за да добавите първия модел",
9
9
  "endpoint": {
@@ -51,7 +51,7 @@
51
51
  },
52
52
  "checker": {
53
53
  "button": "Check",
54
- "desc": "Test if the Api Key and proxy address are filled in correctly",
54
+ "desc": "Test if the API Key and proxy address are filled in correctly",
55
55
  "pass": "Check Passed",
56
56
  "title": "Connectivity Check"
57
57
  },
@@ -3,7 +3,7 @@
3
3
  "azureApiVersion": {
4
4
  "desc": "Azure の API バージョン、YYYY-MM-DD 形式に従う、[最新バージョン](https://learn.microsoft.com/zh-cn/azure/ai-services/openai/reference#chat-completions)を参照",
5
5
  "fetch": "リストを取得",
6
- "title": "Azure Api Version"
6
+ "title": "Azure API Version"
7
7
  },
8
8
  "empty": "モデル ID を入力して最初のモデルを追加してください",
9
9
  "endpoint": {
@@ -3,7 +3,7 @@
3
3
  "azureApiVersion": {
4
4
  "desc": "De API-versie van Azure, volgt het formaat YYYY-MM-DD, raadpleeg [de nieuwste versie](https://learn.microsoft.com/nl-nl/azure/ai-services/openai/reference#chat-completions)",
5
5
  "fetch": "Lijst ophalen",
6
- "title": "Azure Api Versie"
6
+ "title": "Azure API Versie"
7
7
  },
8
8
  "empty": "Voer een model-ID in om het eerste model toe te voegen",
9
9
  "endpoint": {
@@ -3,7 +3,7 @@
3
3
  "azureApiVersion": {
4
4
  "desc": "Wersja API Azure, stosuj format YYYY-MM-DD, zobacz [najnowszą wersję](https://learn.microsoft.com/pl-pl/azure/ai-services/openai/reference#chat-completions)",
5
5
  "fetch": "Pobierz listę",
6
- "title": "Wersja Azure Api"
6
+ "title": "Wersja Azure API"
7
7
  },
8
8
  "empty": "Wprowadź identyfikator modelu, aby dodać pierwszy model",
9
9
  "endpoint": {
@@ -51,7 +51,7 @@
51
51
  },
52
52
  "checker": {
53
53
  "button": "Verificar",
54
- "desc": "Verifica se a Api Key e o endereço do proxy estão preenchidos corretamente",
54
+ "desc": "Verifica se a API Key e o endereço do proxy estão preenchidos corretamente",
55
55
  "pass": "Verificação aprovada",
56
56
  "title": "Verificação de Conectividade"
57
57
  },
@@ -3,7 +3,7 @@
3
3
  "azureApiVersion": {
4
4
  "desc": "Azure'un API versiyonu, YYYY-AA-GG formatına uygun, [en son versiyonu](https://learn.microsoft.com/zh-cn/azure/ai-services/openai/reference#chat-completions) kontrol edin",
5
5
  "fetch": "Listeyi al",
6
- "title": "Azure Api Versiyonu"
6
+ "title": "Azure API Versiyonu"
7
7
  },
8
8
  "empty": "İlk modeli eklemek için model kimliğini girin",
9
9
  "endpoint": {
@@ -51,7 +51,7 @@
51
51
  },
52
52
  "checker": {
53
53
  "button": "Kontrol Et",
54
- "desc": "Api Anahtarı ve vekil adresinin doğru şekilde doldurulup doldurulmadığını test eder",
54
+ "desc": "API Anahtarı ve vekil adresinin doğru şekilde doldurulup doldurulmadığını test eder",
55
55
  "pass": "Kontrol Başarılı",
56
56
  "title": "Bağlantı Kontrolü"
57
57
  },
@@ -51,7 +51,7 @@
51
51
  },
52
52
  "checker": {
53
53
  "button": "Kiểm tra",
54
- "desc": "Kiểm tra xem Api Key và địa chỉ proxy đã được điền đúng chưa",
54
+ "desc": "Kiểm tra xem API Key và địa chỉ proxy đã được điền đúng chưa",
55
55
  "pass": "Kiểm tra thành công",
56
56
  "title": "Kiểm tra kết nối"
57
57
  },
@@ -60,7 +60,7 @@
60
60
  "PluginManifestNotFound": "很抱歉,服务器没有找到该插件的描述清单 (manifest.json),请检查插件描述文件地址是否正确",
61
61
  "PluginManifestInvalid": "很抱歉,该插件的描述清单校验未通过,请检查描述清单格式是否规范",
62
62
  "PluginApiNotFound": "很抱歉,插件描述清单中不存在该 API ,请检查你的请求方法与插件清单 API 是否匹配",
63
- "PluginApiParamsError": "很抱歉,该插件请求的入参校验未通过,请检查入参与 Api 描述信息是否匹配",
63
+ "PluginApiParamsError": "很抱歉,该插件请求的入参校验未通过,请检查入参与 API 描述信息是否匹配",
64
64
  "PluginSettingsInvalid": "该插件需要正确配置后才可以使用,请检查你的配置是否正确",
65
65
  "PluginServerError": "插件服务端请求返回出错,请检查根据下面的报错信息检查你的插件描述文件、插件配置或服务端实现",
66
66
  "PluginGatewayError": "很抱歉,插件网关出现错误,请检查插件网关配置是否正确",
@@ -3,7 +3,7 @@
3
3
  "azureApiVersion": {
4
4
  "desc": "Azure 的 API 版本,遵循 YYYY-MM-DD 格式,查阅[最新版本](https://learn.microsoft.com/zh-cn/azure/ai-services/openai/reference#chat-completions)",
5
5
  "fetch": "获取列表",
6
- "title": "Azure Api Version"
6
+ "title": "Azure API Version"
7
7
  },
8
8
  "empty": "请输入模型 ID 添加第一个模型",
9
9
  "endpoint": {
@@ -51,7 +51,7 @@
51
51
  },
52
52
  "checker": {
53
53
  "button": "检查",
54
- "desc": "测试 Api Key 与代理地址是否正确填写",
54
+ "desc": "测试 API Key 与代理地址是否正确填写",
55
55
  "pass": "检查通过",
56
56
  "title": "连通性检查"
57
57
  },
@@ -3,7 +3,7 @@
3
3
  "azureApiVersion": {
4
4
  "desc": "Azure 的 API 版本,遵循 YYYY-MM-DD 格式,查閱[最新版本](https://learn.microsoft.com/zh-cn/azure/ai-services/openai/reference#chat-completions)",
5
5
  "fetch": "獲取列表",
6
- "title": "Azure Api 版本"
6
+ "title": "Azure API 版本"
7
7
  },
8
8
  "empty": "請輸入模型 ID 添加第一個模型",
9
9
  "endpoint": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "1.9.0",
3
+ "version": "1.9.2",
4
4
  "description": "Lobe Chat - an open-source, high-performance chatbot framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.",
5
5
  "keywords": [
6
6
  "framework",
@@ -115,9 +115,9 @@
115
115
  "@khmyznikov/pwa-install": "^0.3.9",
116
116
  "@lobehub/chat-plugin-sdk": "^1.32.4",
117
117
  "@lobehub/chat-plugins-gateway": "^1.9.0",
118
- "@lobehub/icons": "^1.27.0",
118
+ "@lobehub/icons": "^1.28.0",
119
119
  "@lobehub/tts": "^1.24.3",
120
- "@lobehub/ui": "^1.146.9",
120
+ "@lobehub/ui": "^1.147.0",
121
121
  "@microsoft/fetch-event-source": "^2.0.1",
122
122
  "@neondatabase/serverless": "^0.9.4",
123
123
  "@next/third-parties": "^14.2.4",
@@ -77,7 +77,10 @@ export const useAzureProvider = (): ProviderItem => {
77
77
  children: (
78
78
  <AutoComplete
79
79
  options={[
80
+ '2024-06-01',
80
81
  '2024-02-01',
82
+ '2024-05-01-preview',
83
+ '2024-04-01-preview',
81
84
  '2024-03-01-preview',
82
85
  '2024-02-15-preview',
83
86
  '2023-10-01-preview',
@@ -76,7 +76,7 @@ describe('initAgentRuntimeWithUserPayload method', () => {
76
76
  const jwtPayload: JWTPayload = {
77
77
  apiKey: 'user-azure-key',
78
78
  endpoint: 'user-azure-endpoint',
79
- azureApiVersion: '2024-02-01',
79
+ azureApiVersion: '2024-06-01',
80
80
  };
81
81
  const runtime = await initAgentRuntimeWithUserPayload(ModelProvider.Azure, jwtPayload);
82
82
  expect(runtime).toBeInstanceOf(AgentRuntime);
@@ -97,7 +97,7 @@ const ModelIcon = memo<ModelIconProps>(({ model: originModel, size = 12 }) => {
97
97
  )
98
98
  return <Stability size={size} />;
99
99
 
100
- if (model.includes('phi3') || model.includes('phi-3') || model.includes('wizardlm')) return <Azure.Avatar size={size} />;
100
+ if (model.includes('phi3') || model.includes('phi-3') || model.includes('wizardlm')) return <Azure size={size} />;
101
101
  if (model.includes('firefly')) return <AdobeFirefly size={size} />;
102
102
  if (model.includes('jamba') || model.includes('j2-')) return <Ai21 size={size} />;
103
103
  });
@@ -13,7 +13,6 @@ const Ai360: ModelProviderCard = {
13
13
  },
14
14
  {
15
15
  displayName: '360GPT Pro',
16
- enabled: false,
17
16
  functionCall: false,
18
17
  id: '360gpt-pro',
19
18
  maxOutput: 7000,
@@ -21,7 +20,6 @@ const Ai360: ModelProviderCard = {
21
20
  },
22
21
  {
23
22
  displayName: '360GPT Pro Perf',
24
- enabled: false,
25
23
  functionCall: false,
26
24
  id: '360gpt-pro-perf',
27
25
  maxOutput: 7000,
@@ -29,7 +27,6 @@ const Ai360: ModelProviderCard = {
29
27
  },
30
28
  {
31
29
  displayName: '360GPT Pro sc202401v3',
32
- enabled: false,
33
30
  functionCall: false,
34
31
  id: '360gpt-pro-sc202401v3',
35
32
  maxOutput: 2048,
@@ -37,7 +34,6 @@ const Ai360: ModelProviderCard = {
37
34
  },
38
35
  {
39
36
  displayName: '360GPT Pro sc202401v2',
40
- enabled: false,
41
37
  functionCall: false,
42
38
  id: '360gpt-pro-sc202401v2',
43
39
  maxOutput: 2048,
@@ -45,7 +41,6 @@ const Ai360: ModelProviderCard = {
45
41
  },
46
42
  {
47
43
  displayName: '360GPT Pro sc202401v1',
48
- enabled: false,
49
44
  functionCall: false,
50
45
  id: '360gpt-pro-sc202401v1',
51
46
  maxOutput: 2048,
@@ -53,7 +48,6 @@ const Ai360: ModelProviderCard = {
53
48
  },
54
49
  {
55
50
  displayName: '360GPT Pro v2.0.3',
56
- enabled: false,
57
51
  functionCall: false,
58
52
  id: '360gpt-pro-v2.0.3',
59
53
  maxOutput: 2048,
@@ -77,7 +71,6 @@ const Ai360: ModelProviderCard = {
77
71
  },
78
72
  {
79
73
  displayName: '360GPT Turbo 32K Responsibility 240530',
80
- enabled: false,
81
74
  functionCall: false,
82
75
  id: '360gpt-turbo-32k-responsibility-240530',
83
76
  maxOutput: 32_000,
@@ -85,7 +78,6 @@ const Ai360: ModelProviderCard = {
85
78
  },
86
79
  {
87
80
  displayName: '360GPT Turbo 32K Responsibility 240516',
88
- enabled: false,
89
81
  functionCall: false,
90
82
  id: '360gpt-turbo-32k-responsibility-240516',
91
83
  maxOutput: 32_000,
@@ -93,7 +85,6 @@ const Ai360: ModelProviderCard = {
93
85
  },
94
86
  {
95
87
  displayName: '360GPT_S1_QIYUAN',
96
- enabled: false,
97
88
  functionCall: false,
98
89
  id: '360GPT_S1_QIYUAN',
99
90
  maxOutput: 2048,
@@ -101,7 +92,6 @@ const Ai360: ModelProviderCard = {
101
92
  },
102
93
  {
103
94
  displayName: '360GPT_S2_V9',
104
- enabled: false,
105
95
  functionCall: false,
106
96
  id: '360GPT_S2_V9',
107
97
  maxOutput: 7000,
@@ -49,28 +49,25 @@ const Anthropic: ModelProviderCard = {
49
49
  },
50
50
  {
51
51
  displayName: 'Claude 2.1',
52
- enabled: false,
53
52
  id: 'claude-2.1',
54
53
  maxOutput: 4096,
55
54
  tokens: 200_000,
56
55
  },
57
56
  {
58
57
  displayName: 'Claude 2.0',
59
- enabled: false,
60
58
  id: 'claude-2.0',
61
59
  maxOutput: 4096,
62
60
  tokens: 100_000,
63
61
  },
64
62
  {
65
63
  displayName: 'Claude Instant 1.2',
66
- enabled: false,
67
64
  id: 'claude-instant-1.2',
68
65
  maxOutput: 4096,
69
66
  tokens: 100_000,
70
67
  },
71
68
  ],
72
69
  checkModel: 'claude-3-haiku-20240307',
73
- disableBrowserRequest: true,
70
+ disableBrowserRequest: true,
74
71
  id: 'anthropic',
75
72
  name: 'Anthropic',
76
73
  proxyUrl: {
@@ -6,7 +6,7 @@ const Azure: ModelProviderCard = {
6
6
  {
7
7
  deploymentName: 'gpt-35-turbo',
8
8
  description: 'GPT 3.5 Turbo,适用于各种文本生成和理解任务',
9
- displayName: 'GPT-3.5 Turbo',
9
+ displayName: 'GPT 3.5 Turbo',
10
10
  enabled: true,
11
11
  functionCall: true,
12
12
  id: 'gpt-35-turbo',
@@ -15,27 +15,46 @@ const Azure: ModelProviderCard = {
15
15
  },
16
16
  {
17
17
  deploymentName: 'gpt-35-turbo-16k',
18
- displayName: 'GPT-3.5 Turbo',
18
+ displayName: 'GPT 3.5 Turbo',
19
19
  functionCall: true,
20
20
  id: 'gpt-35-turbo-16k',
21
21
  tokens: 16_384,
22
22
  },
23
23
  {
24
24
  deploymentName: 'gpt-4-turbo',
25
- displayName: 'GPT-4 Turbo',
25
+ displayName: 'GPT 4 Turbo',
26
26
  enabled: true,
27
27
  functionCall: true,
28
28
  id: 'gpt-4',
29
29
  tokens: 128_000,
30
+ vision: true,
30
31
  },
31
32
  {
32
33
  deploymentName: 'gpt-4-vision',
33
34
  description: 'GPT-4 视觉预览版,支持视觉任务',
34
- displayName: 'GPT-4 Turbo with Vision Preview',
35
+ displayName: 'GPT 4 Turbo with Vision Preview',
35
36
  id: 'gpt-4-vision-preview',
36
37
  tokens: 128_000,
37
38
  vision: true,
38
39
  },
40
+ {
41
+ deploymentName: 'gpt-4o-mini',
42
+ displayName: 'GPT 4o Mini',
43
+ enabled: true,
44
+ functionCall: true,
45
+ id: 'gpt-4o-mini',
46
+ tokens: 128_000,
47
+ vision: true,
48
+ },
49
+ {
50
+ deploymentName: 'gpt-4o',
51
+ displayName: 'GPT 4o',
52
+ enabled: true,
53
+ functionCall: true,
54
+ id: 'gpt-4o',
55
+ tokens: 128_000,
56
+ vision: true,
57
+ },
39
58
  ],
40
59
  defaultShowBrowserRequest: true,
41
60
  id: 'azure',
@@ -5,7 +5,6 @@ const Groq: ModelProviderCard = {
5
5
  chatModels: [
6
6
  {
7
7
  displayName: 'LLaMA3.1 405B (Preview)',
8
- enabled: false,
9
8
  functionCall: true,
10
9
  id: 'llama-3.1-405b-reasoning',
11
10
  tokens: 16_000,
@@ -76,7 +76,7 @@ describe('AgentRuntime', () => {
76
76
  const jwtPayload = {
77
77
  apikey: 'user-azure-key',
78
78
  endpoint: 'user-azure-endpoint',
79
- apiVersion: '2024-02-01',
79
+ apiVersion: '2024-06-01',
80
80
  };
81
81
 
82
82
  const runtime = await AgentRuntime.initializeWithProviderOptions(ModelProvider.Azure, {
@@ -3,7 +3,7 @@ export default {
3
3
  azureApiVersion: {
4
4
  desc: 'Azure 的 API 版本,遵循 YYYY-MM-DD 格式,查阅[最新版本](https://learn.microsoft.com/zh-cn/azure/ai-services/openai/reference#chat-completions)',
5
5
  fetch: '获取列表',
6
- title: 'Azure Api Version',
6
+ title: 'Azure API Version',
7
7
  },
8
8
  empty: '请输入模型 ID 添加第一个模型',
9
9
  endpoint: {
@@ -838,7 +838,7 @@ describe('AgentRuntimeOnClient', () => {
838
838
  azure: {
839
839
  apiKey: 'user-azure-key',
840
840
  endpoint: 'user-azure-endpoint',
841
- apiVersion: '2024-02-01',
841
+ apiVersion: '2024-06-01',
842
842
  },
843
843
  },
844
844
  },