190proof 1.0.29 → 1.0.31
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/index.js +9 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -31696,12 +31696,15 @@ async function callOpenAIStream(identifier, openAiPayload, openAiConfig, chunkTi
|
|
|
31696
31696
|
continue;
|
|
31697
31697
|
}
|
|
31698
31698
|
const toolCall = (_a3 = json.choices[0].tool_calls) == null ? void 0 : _a3[0];
|
|
31699
|
-
if (
|
|
31700
|
-
const
|
|
31701
|
-
if (
|
|
31702
|
-
|
|
31703
|
-
|
|
31704
|
-
|
|
31699
|
+
if (toolCall) {
|
|
31700
|
+
const toolCallIndex = toolCall.index || 0;
|
|
31701
|
+
if (toolCallIndex === 0) {
|
|
31702
|
+
const dFn = toolCall.function || {};
|
|
31703
|
+
if (dFn.name)
|
|
31704
|
+
functionCallName += dFn.name;
|
|
31705
|
+
if (dFn.arguments)
|
|
31706
|
+
functionCallArgs += dFn.arguments;
|
|
31707
|
+
}
|
|
31705
31708
|
}
|
|
31706
31709
|
const text = (_d = (_c = (_b = json.choices) == null ? void 0 : _b[0]) == null ? void 0 : _c.delta) == null ? void 0 : _d.content;
|
|
31707
31710
|
if (text) {
|