190proof 1.0.9 → 1.0.11

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.mjs CHANGED
@@ -31492,7 +31492,7 @@ async function callOpenAiWithRetries(identifier, openAiPayload, openAiConfig, re
31492
31492
  })
31493
31493
  );
31494
31494
  }
31495
- openAiPayload.model = "gpt-4-1106-preview" /* GPT4_1106_PREVIEW */;
31495
+ openAiPayload.model = "gpt-4-turbo-2024-04-09" /* GPT4_0409 */;
31496
31496
  openAiPayload.temperature = 0.8;
31497
31497
  if (i5 >= 2 && (openAiConfig == null ? void 0 : openAiConfig.service) === "azure" && errorCode === "content_filter") {
31498
31498
  console.log(
@@ -31911,7 +31911,7 @@ async function prepareAnthropicPayload(payload) {
31911
31911
  });
31912
31912
  }
31913
31913
  for (const file of message.files || []) {
31914
- if (!file.mimetype.startsWith("image")) {
31914
+ if (!file.mimeType.startsWith("image")) {
31915
31915
  console.warn(
31916
31916
  "Anthropic API does not support non-image file types. Skipping file."
31917
31917
  );
@@ -31923,22 +31923,22 @@ async function prepareAnthropicPayload(payload) {
31923
31923
  source: {
31924
31924
  type: "base64",
31925
31925
  media_type: "image/png",
31926
- data: await getNormalizedBase64PNG(file.url, file.mimetype)
31926
+ data: await getNormalizedBase64PNG(file.url, file.mimeType)
31927
31927
  }
31928
31928
  });
31929
31929
  } else if (file.data) {
31930
31930
  if (!["image/png", "image/jpeg", "image/gif", "image/webp"].includes(
31931
- file.mimetype
31931
+ file.mimeType
31932
31932
  )) {
31933
31933
  throw new Error(
31934
- "Invalid image mimetype. Supported types are: image/png, image/jpeg, image/gif, image/webp"
31934
+ "Invalid image mimeType. Supported types are: image/png, image/jpeg, image/gif, image/webp"
31935
31935
  );
31936
31936
  }
31937
31937
  anthropicContentBlocks.push({
31938
31938
  type: "image",
31939
31939
  source: {
31940
31940
  type: "base64",
31941
- media_type: file.mimetype,
31941
+ media_type: file.mimeType,
31942
31942
  data: file.data
31943
31943
  }
31944
31944
  });
@@ -31969,7 +31969,7 @@ async function prepareOpenAIPayload(payload) {
31969
31969
  });
31970
31970
  }
31971
31971
  for (const file of message.files || []) {
31972
- if (!file.mimetype.startsWith("image")) {
31972
+ if (!file.mimeType.startsWith("image")) {
31973
31973
  console.warn(
31974
31974
  "OpenAI API does not support non-image file types. Skipping file."
31975
31975
  );
@@ -31981,7 +31981,7 @@ async function prepareOpenAIPayload(payload) {
31981
31981
  image_url: {
31982
31982
  url: `data:image/png;base64,${await getNormalizedBase64PNG(
31983
31983
  file.url,
31984
- file.mimetype
31984
+ file.mimeType
31985
31985
  )}`
31986
31986
  }
31987
31987
  });
@@ -31989,7 +31989,7 @@ async function prepareOpenAIPayload(payload) {
31989
31989
  openAIContentBlocks.push({
31990
31990
  type: "image_url",
31991
31991
  image_url: {
31992
- url: `data:${file.mimetype};base64,${file.data}`
31992
+ url: `data:${file.mimeType};base64,${file.data}`
31993
31993
  }
31994
31994
  });
31995
31995
  }