190proof 1.0.34 → 1.0.36
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 +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -31543,7 +31543,7 @@ async function callOpenAiWithRetries(identifier, openAiPayload, openAiConfig, re
|
|
|
31543
31543
|
);
|
|
31544
31544
|
}
|
|
31545
31545
|
async function callOpenAIStream(identifier, openAiPayload, openAiConfig, chunkTimeoutMs) {
|
|
31546
|
-
var _a3, _b, _c, _d;
|
|
31546
|
+
var _a3, _b, _c, _d, _e, _f, _g;
|
|
31547
31547
|
const functionNames = openAiPayload.tools ? new Set(openAiPayload.tools.map((fn) => fn.function.name)) : null;
|
|
31548
31548
|
if (!openAiConfig) {
|
|
31549
31549
|
const defaultOpenAIBaseUrl = (
|
|
@@ -31695,7 +31695,7 @@ async function callOpenAIStream(identifier, openAiPayload, openAiConfig, chunkTi
|
|
|
31695
31695
|
);
|
|
31696
31696
|
continue;
|
|
31697
31697
|
}
|
|
31698
|
-
const toolCall = (_a3 = json.choices[0].tool_calls) == null ? void 0 :
|
|
31698
|
+
const toolCall = (_d = (_c = (_b = (_a3 = json.choices) == null ? void 0 : _a3[0]) == null ? void 0 : _b.delta) == null ? void 0 : _c.tool_calls) == null ? void 0 : _d[0];
|
|
31699
31699
|
if (toolCall) {
|
|
31700
31700
|
const toolCallIndex = toolCall.index || 0;
|
|
31701
31701
|
if (toolCallIndex === 0) {
|
|
@@ -31706,7 +31706,7 @@ async function callOpenAIStream(identifier, openAiPayload, openAiConfig, chunkTi
|
|
|
31706
31706
|
functionCallArgs += dFn.arguments;
|
|
31707
31707
|
}
|
|
31708
31708
|
}
|
|
31709
|
-
const text = (
|
|
31709
|
+
const text = (_g = (_f = (_e = json.choices) == null ? void 0 : _e[0]) == null ? void 0 : _f.delta) == null ? void 0 : _g.content;
|
|
31710
31710
|
if (text) {
|
|
31711
31711
|
paragraph += text;
|
|
31712
31712
|
}
|