@lobehub/chat 0.147.14 → 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,31 @@
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
+
5
30
  ### [Version 0.147.14](https://github.com/lobehub/lobe-chat/compare/v0.147.13...v0.147.14)
6
31
 
7
32
  <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.14",
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",
@@ -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',
@@ -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