@molecule/api-ai-zhipu 1.2.0 → 1.2.1
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/dist/provider.d.ts.map +1 -1
- package/dist/provider.js +5 -0
- package/package.json +1 -1
package/dist/provider.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EACV,UAAU,EAQX,MAAM,kBAAkB,CAAA;AASzB,OAAO,cAAc,CAAA;AAErB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EACV,UAAU,EAQX,MAAM,kBAAkB,CAAA;AASzB,OAAO,cAAc,CAAA;AAErB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAkpB7C;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,MAAM,CAAC,EAAE,WAAW,GAAG,UAAU,CAE/D"}
|
package/dist/provider.js
CHANGED
|
@@ -303,6 +303,11 @@ class ZhipuAIProvider {
|
|
|
303
303
|
for (const tr of toolResults) {
|
|
304
304
|
formatted.push(tr);
|
|
305
305
|
}
|
|
306
|
+
// Non-tool parts of the SAME message (an image riding a tool result — the
|
|
307
|
+
// screenshot tool) must not be dropped: Chat Completions accepts a user
|
|
308
|
+
// message after the tool messages, so emit them instead of losing them.
|
|
309
|
+
if (parts.length > 0)
|
|
310
|
+
formatted.push({ role: m.role, content: parts });
|
|
306
311
|
}
|
|
307
312
|
else if (toolCalls.length > 0) {
|
|
308
313
|
// Assistant message with tool calls
|