@gammatech/aijsx 0.2.0-vision.1 → 0.2.0-vision.2
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.js +8 -1
- package/dist/index.mjs +8 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -673,8 +673,15 @@ async function* OpenAIChatCompletion(props, { logger, render, getContext }) {
|
|
|
673
673
|
if (c.type === "text") {
|
|
674
674
|
return c.text;
|
|
675
675
|
}
|
|
676
|
+
if (c.type === "image_url") {
|
|
677
|
+
return `<ContentTypeImage url="${c.image_url.url.slice(
|
|
678
|
+
0,
|
|
679
|
+
256
|
|
680
|
+
// in case of base64
|
|
681
|
+
)}" detail="${c.image_url.detail}" />`;
|
|
682
|
+
}
|
|
676
683
|
return "";
|
|
677
|
-
}).join("");
|
|
684
|
+
}).join("\n");
|
|
678
685
|
return {
|
|
679
686
|
type: chatMessage.role,
|
|
680
687
|
element: chatMessage.element,
|
package/dist/index.mjs
CHANGED
|
@@ -585,8 +585,15 @@ async function* OpenAIChatCompletion(props, { logger, render, getContext }) {
|
|
|
585
585
|
if (c.type === "text") {
|
|
586
586
|
return c.text;
|
|
587
587
|
}
|
|
588
|
+
if (c.type === "image_url") {
|
|
589
|
+
return `<ContentTypeImage url="${c.image_url.url.slice(
|
|
590
|
+
0,
|
|
591
|
+
256
|
|
592
|
+
// in case of base64
|
|
593
|
+
)}" detail="${c.image_url.detail}" />`;
|
|
594
|
+
}
|
|
588
595
|
return "";
|
|
589
|
-
}).join("");
|
|
596
|
+
}).join("\n");
|
|
590
597
|
return {
|
|
591
598
|
type: chatMessage.role,
|
|
592
599
|
element: chatMessage.element,
|