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.d.mts CHANGED
@@ -22,7 +22,7 @@ interface GenericMessage {
22
22
  functionCalls?: FunctionCall[];
23
23
  }
24
24
  interface File {
25
- mimetype: string;
25
+ mimeType: string;
26
26
  url?: string;
27
27
  data?: string;
28
28
  }
package/dist/index.d.ts CHANGED
@@ -22,7 +22,7 @@ interface GenericMessage {
22
22
  functionCalls?: FunctionCall[];
23
23
  }
24
24
  interface File {
25
- mimetype: string;
25
+ mimeType: string;
26
26
  url?: string;
27
27
  data?: string;
28
28
  }
package/dist/index.js CHANGED
@@ -31497,7 +31497,7 @@ async function callOpenAiWithRetries(identifier, openAiPayload, openAiConfig, re
31497
31497
  })
31498
31498
  );
31499
31499
  }
31500
- openAiPayload.model = "gpt-4-1106-preview" /* GPT4_1106_PREVIEW */;
31500
+ openAiPayload.model = "gpt-4-turbo-2024-04-09" /* GPT4_0409 */;
31501
31501
  openAiPayload.temperature = 0.8;
31502
31502
  if (i5 >= 2 && (openAiConfig == null ? void 0 : openAiConfig.service) === "azure" && errorCode === "content_filter") {
31503
31503
  console.log(
@@ -31916,7 +31916,7 @@ async function prepareAnthropicPayload(payload) {
31916
31916
  });
31917
31917
  }
31918
31918
  for (const file of message.files || []) {
31919
- if (!file.mimetype.startsWith("image")) {
31919
+ if (!file.mimeType.startsWith("image")) {
31920
31920
  console.warn(
31921
31921
  "Anthropic API does not support non-image file types. Skipping file."
31922
31922
  );
@@ -31928,22 +31928,22 @@ async function prepareAnthropicPayload(payload) {
31928
31928
  source: {
31929
31929
  type: "base64",
31930
31930
  media_type: "image/png",
31931
- data: await getNormalizedBase64PNG(file.url, file.mimetype)
31931
+ data: await getNormalizedBase64PNG(file.url, file.mimeType)
31932
31932
  }
31933
31933
  });
31934
31934
  } else if (file.data) {
31935
31935
  if (!["image/png", "image/jpeg", "image/gif", "image/webp"].includes(
31936
- file.mimetype
31936
+ file.mimeType
31937
31937
  )) {
31938
31938
  throw new Error(
31939
- "Invalid image mimetype. Supported types are: image/png, image/jpeg, image/gif, image/webp"
31939
+ "Invalid image mimeType. Supported types are: image/png, image/jpeg, image/gif, image/webp"
31940
31940
  );
31941
31941
  }
31942
31942
  anthropicContentBlocks.push({
31943
31943
  type: "image",
31944
31944
  source: {
31945
31945
  type: "base64",
31946
- media_type: file.mimetype,
31946
+ media_type: file.mimeType,
31947
31947
  data: file.data
31948
31948
  }
31949
31949
  });
@@ -31974,7 +31974,7 @@ async function prepareOpenAIPayload(payload) {
31974
31974
  });
31975
31975
  }
31976
31976
  for (const file of message.files || []) {
31977
- if (!file.mimetype.startsWith("image")) {
31977
+ if (!file.mimeType.startsWith("image")) {
31978
31978
  console.warn(
31979
31979
  "OpenAI API does not support non-image file types. Skipping file."
31980
31980
  );
@@ -31986,7 +31986,7 @@ async function prepareOpenAIPayload(payload) {
31986
31986
  image_url: {
31987
31987
  url: `data:image/png;base64,${await getNormalizedBase64PNG(
31988
31988
  file.url,
31989
- file.mimetype
31989
+ file.mimeType
31990
31990
  )}`
31991
31991
  }
31992
31992
  });
@@ -31994,7 +31994,7 @@ async function prepareOpenAIPayload(payload) {
31994
31994
  openAIContentBlocks.push({
31995
31995
  type: "image_url",
31996
31996
  image_url: {
31997
- url: `data:${file.mimetype};base64,${file.data}`
31997
+ url: `data:${file.mimeType};base64,${file.data}`
31998
31998
  }
31999
31999
  });
32000
32000
  }