Skip to content

Commit a445370

Browse files
committed
fix(ai): make stream part - contentBlockIndex optional
1 parent bbb936d commit a445370

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

.changeset/many-dots-invite.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@aws-amplify/data-schema": patch
3+
---
4+
5+
make ConversationMessageStreamPart.contentBlockIndex optional for error events

packages/data-schema/__tests__/__snapshots__/ClientSchema.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ type ConversationMessageStreamPart @aws_cognito_user_pools {
214214
owner: String
215215
conversationId: ID!
216216
associatedUserMessageId: ID!
217-
contentBlockIndex: Int!
217+
contentBlockIndex: Int
218218
contentBlockText: String
219219
contentBlockDeltaIndex: Int
220220
contentBlockToolUse: ToolUseBlock

packages/data-schema/src/ai/ConversationSchemaTypes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ const ConversationMessageStreamEvent = `type ConversationMessageStreamPart @aws_
235235
owner: String
236236
conversationId: ID!
237237
associatedUserMessageId: ID!
238-
contentBlockIndex: Int!
238+
contentBlockIndex: Int
239239
contentBlockText: String
240240
contentBlockDeltaIndex: Int
241241
contentBlockToolUse: ToolUseBlock

packages/integration-tests/__tests__/defined-behavior/2-expected-use/__snapshots__/ai-conversation.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ type ConversationMessageStreamPart @aws_cognito_user_pools {
562562
owner: String
563563
conversationId: ID!
564564
associatedUserMessageId: ID!
565-
contentBlockIndex: Int!
565+
contentBlockIndex: Int
566566
contentBlockText: String
567567
contentBlockDeltaIndex: Int
568568
contentBlockToolUse: ToolUseBlock

0 commit comments

Comments
 (0)