@alpic80/rivet-core 1.24.2-aidon.12 → 1.24.2-aidon.13

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.
@@ -2925,6 +2925,14 @@ async function chatMessageToOpenAIChatCompletionMessage(message, options2) {
2925
2925
  if (typeof part === "string") {
2926
2926
  return { type: "text", text: part };
2927
2927
  }
2928
+ if (part.type === "file") {
2929
+ return {
2930
+ type: "file",
2931
+ filename: part.filename || "file.pdf",
2932
+ mediaType: part.mediaType,
2933
+ data: part.data.toString()
2934
+ };
2935
+ }
2928
2936
  const url = part.type === "url" ? part.url : `data:${part.mediaType};base64,${await uint8ArrayToBase64(part.data)}`;
2929
2937
  return {
2930
2938
  type: "image_url",
@@ -18080,6 +18088,8 @@ async function chatMessageContentToClaude3ChatMessage(content) {
18080
18088
  };
18081
18089
  case "url":
18082
18090
  throw new Error("unable to convert urls for Claude");
18091
+ case "file":
18092
+ throw new Error("unable to convert files for Claude");
18083
18093
  case "document":
18084
18094
  return {
18085
18095
  type: "document",