@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.
- package/dist/Generated.d.ts +4045 -4037
- package/dist/Generated.d.ts.map +1 -1
- package/dist/Generated.js +1 -1
- package/dist/Generated.js.map +1 -1
- package/dist/OpenAiLanguageModel.js +3 -3
- package/dist/OpenAiLanguageModel.js.map +1 -1
- package/dist/OpenAiTool.d.ts +24 -24
- package/package.json +3 -3
- package/src/Generated.ts +105 -121
- package/src/OpenAiLanguageModel.ts +3 -3
|
@@ -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
|
|
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 =
|
|
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 =
|
|
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 })
|