Skip to content

Commit

Permalink
fix(ai): remove unnecessary use of Buffer (#5774)
Browse files Browse the repository at this point in the history
* fix(ai): remove unnecessary use of Buffer

* Create fluffy-fireants-doubt.md
  • Loading branch information
thaddmt authored Sep 10, 2024
1 parent 2aa639d commit 42e2d5d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/fluffy-fireants-doubt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@aws-amplify/ui-react-ai": patch
---

fix(ai): remove unnecessary use of Buffer
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export const FieldControl: FieldControl = () => {
const fileContent: ConversationMessageContent = {
image: {
format: getImageTypeFromMimeType(file.type),
source: { bytes: Uint8Array.from(Buffer.from(buffer)) },
source: { bytes: new Uint8Array(buffer) },
},
};
submittedContent.push(fileContent);
Expand Down

0 comments on commit 42e2d5d

Please sign in to comment.