@effect/ai-openai 4.0.0-beta.1 → 4.0.0-beta.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.
@@ -8,7 +8,7 @@
8
8
  */
9
9
  import * as DateTime from "effect/DateTime"
10
10
  import * as Effect from "effect/Effect"
11
- import * as Base64 from "effect/encoding/Base64"
11
+ import * as Encoding from "effect/Encoding"
12
12
  import { dual } from "effect/Function"
13
13
  import * as Layer from "effect/Layer"
14
14
  import * as Predicate from "effect/Predicate"
@@ -592,7 +592,7 @@ const prepareMessages = Effect.fnUntraced(
592
592
  }
593
593
 
594
594
  if (part.data instanceof Uint8Array) {
595
- const base64 = Base64.encode(part.data)
595
+ const base64 = Encoding.encodeBase64(part.data)
596
596
  const imageUrl = `data:${mediaType};base64,${base64}`
597
597
  content.push({ type: "input_image", image_url: imageUrl, detail })
598
598
  }
@@ -606,7 +606,7 @@ const prepareMessages = Effect.fnUntraced(
606
606
  }
607
607
 
608
608
  if (part.data instanceof Uint8Array) {
609
- const base64 = Base64.encode(part.data)
609
+ const base64 = Encoding.encodeBase64(part.data)
610
610
  const fileName = part.fileName ?? `part-${index}.pdf`
611
611
  const fileData = `data:application/pdf;base64,${base64}`
612
612
  content.push({ type: "input_file", filename: fileName, file_data: fileData })