190proof 1.0.21 → 1.0.23

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 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, _e, _f;
31546
+ var _a3, _b, _c, _d, _e, _f, _g, _h;
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,14 +31695,14 @@ async function callOpenAIStream(identifier, openAiPayload, openAiConfig, chunkTi
31695
31695
  );
31696
31696
  continue;
31697
31697
  }
31698
- const dFn = (_c = (_b = (_a3 = json.choices) == null ? void 0 : _a3[0]) == null ? void 0 : _b.delta) == null ? void 0 : _c.function_call;
31698
+ const dFn = (_e = (_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]) == null ? void 0 : _e.function;
31699
31699
  if (dFn) {
31700
31700
  if (dFn.name)
31701
31701
  functionCallName += dFn.name;
31702
31702
  if (dFn.arguments)
31703
31703
  functionCallArgs += dFn.arguments;
31704
31704
  }
31705
- const text = (_f = (_e = (_d = json.choices) == null ? void 0 : _d[0]) == null ? void 0 : _e.delta) == null ? void 0 : _f.content;
31705
+ const text = (_h = (_g = (_f = json.choices) == null ? void 0 : _f[0]) == null ? void 0 : _g.delta) == null ? void 0 : _h.content;
31706
31706
  if (text) {
31707
31707
  paragraph += text;
31708
31708
  }
@@ -32018,10 +32018,11 @@ async function prepareOpenAIPayload(payload) {
32018
32018
  openAIContentBlocks.push({
32019
32019
  type: "image_url",
32020
32020
  image_url: {
32021
- url: `data:image/png;base64,${await getNormalizedBase64PNG(
32022
- file.url,
32023
- file.mimeType
32024
- )}`
32021
+ url: file.url
32022
+ // url: `data:image/png;base64,${await getNormalizedBase64PNG(
32023
+ // file.url,
32024
+ // file.mimeType
32025
+ // )}`,
32025
32026
  }
32026
32027
  });
32027
32028
  } else if (file.data) {