@lobehub/chat 1.36.18 → 1.36.19
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 +25 -0
- package/changelog/v1.json +9 -0
- package/package.json +1 -1
- package/src/libs/agent-runtime/google/index.ts +6 -7
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,31 @@
|
|
2
2
|
|
3
3
|
# Changelog
|
4
4
|
|
5
|
+
### [Version 1.36.19](https://github.com/lobehub/lobe-chat/compare/v1.36.18...v1.36.19)
|
6
|
+
|
7
|
+
<sup>Released on **2024-12-13**</sup>
|
8
|
+
|
9
|
+
#### 🐛 Bug Fixes
|
10
|
+
|
11
|
+
- **misc**: One of Gemini functionCall error.
|
12
|
+
|
13
|
+
<br/>
|
14
|
+
|
15
|
+
<details>
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
17
|
+
|
18
|
+
#### What's fixed
|
19
|
+
|
20
|
+
- **misc**: One of Gemini functionCall error, closes [#5002](https://github.com/lobehub/lobe-chat/issues/5002) ([3c7f5ff](https://github.com/lobehub/lobe-chat/commit/3c7f5ff))
|
21
|
+
|
22
|
+
</details>
|
23
|
+
|
24
|
+
<div align="right">
|
25
|
+
|
26
|
+
[](#readme-top)
|
27
|
+
|
28
|
+
</div>
|
29
|
+
|
5
30
|
### [Version 1.36.18](https://github.com/lobehub/lobe-chat/compare/v1.36.17...v1.36.18)
|
6
31
|
|
7
32
|
<sup>Released on **2024-12-12**</sup>
|
package/changelog/v1.json
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@lobehub/chat",
|
3
|
-
"version": "1.36.
|
3
|
+
"version": "1.36.19",
|
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",
|
@@ -91,12 +91,7 @@ export class LobeGoogleAI implements LobeRuntimeAI {
|
|
91
91
|
.generateContentStream({
|
92
92
|
contents,
|
93
93
|
systemInstruction: payload.system as string,
|
94
|
-
tools: (
|
95
|
-
if (!payload.tools && model.startsWith('gemini-2.0')) {
|
96
|
-
return [{ googleSearch: {} } as GoogleFunctionCallTool];
|
97
|
-
}
|
98
|
-
return this.buildGoogleTools(payload.tools);
|
99
|
-
})(),
|
94
|
+
tools: this.buildGoogleTools(payload.tools),
|
100
95
|
});
|
101
96
|
|
102
97
|
const googleStream = convertIterableToStream(geminiStreamResult.stream);
|
@@ -293,13 +288,17 @@ export class LobeGoogleAI implements LobeRuntimeAI {
|
|
293
288
|
private convertToolToGoogleTool = (tool: ChatCompletionTool): FunctionDeclaration => {
|
294
289
|
const functionDeclaration = tool.function;
|
295
290
|
const parameters = functionDeclaration.parameters;
|
291
|
+
// refs: https://github.com/lobehub/lobe-chat/pull/5002
|
292
|
+
const properties = parameters?.properties && Object.keys(parameters.properties).length > 0
|
293
|
+
? parameters.properties
|
294
|
+
: { dummy: { type: 'string' } }; // dummy property to avoid empty object
|
296
295
|
|
297
296
|
return {
|
298
297
|
description: functionDeclaration.description,
|
299
298
|
name: functionDeclaration.name,
|
300
299
|
parameters: {
|
301
300
|
description: parameters?.description,
|
302
|
-
properties:
|
301
|
+
properties: properties,
|
303
302
|
required: parameters?.required,
|
304
303
|
type: SchemaType.OBJECT,
|
305
304
|
},
|