@lobehub/chat 0.147.13 → 0.147.15

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/CHANGELOG.md CHANGED
@@ -2,6 +2,56 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ### [Version 0.147.15](https://github.com/lobehub/lobe-chat/compare/v0.147.14...v0.147.15)
6
+
7
+ <sup>Released on **2024-04-14**</sup>
8
+
9
+ #### 🐛 Bug Fixes
10
+
11
+ - **misc**: Fix tool call error with gpt-4-turbo.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### What's fixed
19
+
20
+ - **misc**: Fix tool call error with gpt-4-turbo, closes [#2042](https://github.com/lobehub/lobe-chat/issues/2042) ([63d91b8](https://github.com/lobehub/lobe-chat/commit/63d91b8))
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 0.147.14](https://github.com/lobehub/lobe-chat/compare/v0.147.13...v0.147.14)
31
+
32
+ <sup>Released on **2024-04-14**</sup>
33
+
34
+ #### 💄 Styles
35
+
36
+ - **misc**: Enable `gemini-1.5-pro-latest` model by default.
37
+
38
+ <br/>
39
+
40
+ <details>
41
+ <summary><kbd>Improvements and Fixes</kbd></summary>
42
+
43
+ #### Styles
44
+
45
+ - **misc**: Enable `gemini-1.5-pro-latest` model by default, closes [#2034](https://github.com/lobehub/lobe-chat/issues/2034) ([e8c65a9](https://github.com/lobehub/lobe-chat/commit/e8c65a9))
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 0.147.13](https://github.com/lobehub/lobe-chat/compare/v0.147.12...v0.147.13)
6
56
 
7
57
  <sup>Released on **2024-04-14**</sup>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "0.147.13",
3
+ "version": "0.147.15",
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",
@@ -26,7 +26,6 @@ const Google: ModelProviderCard = {
26
26
  {
27
27
  description: 'The best image understanding model to handle a broad range of applications',
28
28
  displayName: 'Gemini 1.0 Pro Vision',
29
- enabled: true,
30
29
  id: 'gemini-1.0-pro-vision-latest',
31
30
  maxOutput: 4096,
32
31
  tokens: 16_384,
@@ -35,6 +34,7 @@ const Google: ModelProviderCard = {
35
34
  {
36
35
  description: 'The best image understanding model to handle a broad range of applications',
37
36
  displayName: 'Gemini 1.0 Pro Vision',
37
+ enabled: true,
38
38
  id: 'gemini-pro-vision',
39
39
  maxOutput: 4096,
40
40
  tokens: 16_384,
@@ -59,6 +59,7 @@ const Google: ModelProviderCard = {
59
59
  {
60
60
  description: 'Mid-size multimodal model that supports up to 1 million tokens',
61
61
  displayName: 'Gemini 1.5 Pro',
62
+ enabled: true,
62
63
  id: 'gemini-1.5-pro-latest',
63
64
  maxOutput: 8192,
64
65
  tokens: 1_056_768,
@@ -102,7 +102,7 @@ const OpenAI: ModelProviderCard = {
102
102
  },
103
103
  {
104
104
  description: 'GPT-4 Turbo 视觉版',
105
- displayName: 'GPT-4 Turbo Vision',
105
+ displayName: 'GPT-4 Turbo',
106
106
  enabled: true,
107
107
  functionCall: true,
108
108
  id: 'gpt-4-turbo',
@@ -1,6 +1,6 @@
1
1
  import { API_ENDPOINTS } from '@/services/_url';
2
2
  import { useGlobalStore } from '@/store/global';
3
- import { preferenceSelectors } from '@/store/global/slices/preference/selectors';
3
+ import { preferenceSelectors } from '@/store/global/selectors';
4
4
  import { TraceEventBasePayload, TraceEventPayloads } from '@/types/trace';
5
5
 
6
6
  class TraceService {
@@ -8,9 +8,7 @@ class TraceService {
8
8
  try {
9
9
  return fetch(API_ENDPOINTS.trace, {
10
10
  body: JSON.stringify(data),
11
- headers: {
12
- 'Content-Type': 'application/json',
13
- },
11
+ headers: { 'Content-Type': 'application/json' },
14
12
  method: 'POST',
15
13
  });
16
14
  } catch (e) {
@@ -34,7 +34,14 @@ const mockState = {
34
34
  identifier: 'plugin-3',
35
35
  manifest: {
36
36
  identifier: 'plugin-3',
37
- api: [{ name: 'api-3' }],
37
+ api: [
38
+ {
39
+ name: 'api-3',
40
+ url: 'bac',
41
+ description: '123123',
42
+ parameters: { type: 'object', properties: { a: { type: 'string' } } },
43
+ },
44
+ ],
38
45
  },
39
46
  type: 'customPlugin',
40
47
  },
@@ -132,6 +139,25 @@ describe('toolSelectors', () => {
132
139
  const result = toolSelectors.enabledSchema([])(mockState);
133
140
  expect(result).toEqual([]);
134
141
  });
142
+
143
+ // fix https://github.com/lobehub/lobe-chat/issues/2036
144
+ it('should not contain url', () => {
145
+ const result = toolSelectors.enabledSchema(['plugin-3'])(mockState);
146
+ expect(result[0].function).toEqual({
147
+ description: '123123',
148
+ name: 'plugin-3____api-3',
149
+ parameters: {
150
+ properties: {
151
+ a: {
152
+ type: 'string',
153
+ },
154
+ },
155
+ type: 'object',
156
+ },
157
+ });
158
+
159
+ expect(result[0].function).not.toHaveProperty('url');
160
+ });
135
161
  });
136
162
 
137
163
  describe('getPluginManifestLoadingStatus', () => {
@@ -40,8 +40,9 @@ const enabledSchema =
40
40
  .filter((m) => tools.includes(m?.identifier))
41
41
  .flatMap((manifest) =>
42
42
  manifest.api.map((m) => ({
43
- ...m,
43
+ description: m.description,
44
44
  name: getAPIName(manifest.identifier, m.name, manifest.type),
45
+ parameters: m.parameters,
45
46
  })),
46
47
  );
47
48