Skip to content

Commit

Permalink
feat(conversation): per message items and lambda history retrieval pa…
Browse files Browse the repository at this point in the history
…ttern (#2914)
  • Loading branch information
atierian authored and tejas2008 committed Oct 29, 2024
1 parent 45a134b commit 4f22e64
Show file tree
Hide file tree
Showing 25 changed files with 262 additions and 206 deletions.
4 changes: 2 additions & 2 deletions packages/amplify-data-construct/.jsii
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
]
},
"bundled": {
"@aws-amplify/ai-constructs": "^0.1.4",
"@aws-amplify/ai-constructs": "^0.2.0",
"@aws-amplify/backend-output-schemas": "^1.0.0",
"@aws-amplify/backend-output-storage": "^1.0.0",
"@aws-amplify/graphql-auth-transformer": "4.1.2",
Expand Down Expand Up @@ -4027,5 +4027,5 @@
},
"types": {},
"version": "1.10.2",
"fingerprint": "naLvPjdr9z9wuDIK2e15PtMBvodNvsprfPj2tyr4FaA="
"fingerprint": "jyWXx9H104F/Z3YgGPhDKqRig51p9ImclAMN35IID8o="
}
2 changes: 1 addition & 1 deletion packages/amplify-data-construct/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
"semver"
],
"dependencies": {
"@aws-amplify/ai-constructs": "^0.1.4",
"@aws-amplify/ai-constructs": "^0.2.0",
"@aws-amplify/backend-output-schemas": "^1.0.0",
"@aws-amplify/backend-output-storage": "^1.0.0",
"@aws-amplify/graphql-api-construct": "1.14.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
export type ConversationMessagePirateChat = {
__typename: 'ConversationMessagePirateChat';
aiContext?: string | null;
assistantContent?: Array<ContentBlock | null> | null;
content?: Array<ContentBlock | null> | null;
conversation?: ConversationPirateChat | null;
conversationId: string;
Expand Down Expand Up @@ -285,7 +284,6 @@ export type ModelConversationMessagePirateChatConditionInput = {

export type CreateConversationMessagePirateChatInput = {
aiContext?: string | null;
assistantContent?: Array<ContentBlockInput | null> | null;
content?: Array<ContentBlockInput | null> | null;
conversationId: string;
id?: string | null;
Expand Down Expand Up @@ -386,10 +384,6 @@ export type GetConversationMessagePirateChatQuery = {
getConversationMessagePirateChat?: {
__typename: 'ConversationMessagePirateChat';
aiContext?: string | null;
assistantContent?: Array<{
__typename: 'ContentBlock';
text?: string | null;
} | null> | null;
content?: Array<{
__typename: 'ContentBlock';
text?: string | null;
Expand Down Expand Up @@ -488,10 +482,6 @@ export type CreateAssistantResponsePirateChatMutation = {
createAssistantResponsePirateChat?: {
__typename: 'ConversationMessagePirateChat';
aiContext?: string | null;
assistantContent?: Array<{
__typename: 'ContentBlock';
text?: string | null;
} | null> | null;
content?: Array<{
__typename: 'ContentBlock';
text?: string | null;
Expand Down Expand Up @@ -526,10 +516,6 @@ export type CreateConversationMessagePirateChatMutation = {
createConversationMessagePirateChat?: {
__typename: 'ConversationMessagePirateChat';
aiContext?: string | null;
assistantContent?: Array<{
__typename: 'ContentBlock';
text?: string | null;
} | null> | null;
content?: Array<{
__typename: 'ContentBlock';
text?: string | null;
Expand Down Expand Up @@ -585,10 +571,6 @@ export type DeleteConversationMessagePirateChatMutation = {
deleteConversationMessagePirateChat?: {
__typename: 'ConversationMessagePirateChat';
aiContext?: string | null;
assistantContent?: Array<{
__typename: 'ContentBlock';
text?: string | null;
} | null> | null;
content?: Array<{
__typename: 'ContentBlock';
text?: string | null;
Expand Down Expand Up @@ -659,10 +641,6 @@ export type PirateChatMutation = {
__typename: 'ToolConfiguration';
} | null;
updatedAt?: string | null;
assistantContent?: Array<{
__typename: 'ContentBlock';
text?: string | null;
} | null> | null;
conversation?: {
__typename: 'ConversationPirateChat';
createdAt: string;
Expand All @@ -683,10 +661,6 @@ export type OnCreateAssistantResponsePirateChatSubscription = {
onCreateAssistantResponsePirateChat?: {
__typename: 'ConversationMessagePirateChat';
aiContext?: string | null;
assistantContent?: Array<{
__typename: 'ContentBlock';
text?: string | null;
} | null> | null;
content?: Array<{
__typename: 'ContentBlock';
text?: string | null;
Expand Down Expand Up @@ -721,10 +695,6 @@ export type OnCreateConversationMessagePirateChatSubscription = {
onCreateConversationMessagePirateChat?: {
__typename: 'ConversationMessagePirateChat';
aiContext?: string | null;
assistantContent?: Array<{
__typename: 'ContentBlock';
text?: string | null;
} | null> | null;
content?: Array<{
__typename: 'ContentBlock';
text?: string | null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ export const createAssistantResponsePirateChat = /* GraphQL */ `mutation CreateA
) {
createAssistantResponsePirateChat(input: $input) {
aiContext
assistantContent {
text
__typename
}
content {
text
__typename
Expand Down Expand Up @@ -49,10 +45,6 @@ export const createConversationMessagePirateChat = /* GraphQL */ `mutation Creat
) {
createConversationMessagePirateChat(condition: $condition, input: $input) {
aiContext
assistantContent {
text
__typename
}
content {
text
__typename
Expand Down Expand Up @@ -104,10 +96,6 @@ export const deleteConversationMessagePirateChat = /* GraphQL */ `mutation Delet
) {
deleteConversationMessagePirateChat(condition: $condition, input: $input) {
aiContext
assistantContent {
text
__typename
}
content {
text
__typename
Expand Down Expand Up @@ -181,10 +169,6 @@ export const pirateChat = /* GraphQL */ `mutation PirateChat(
updatedAt
... on ConversationMessagePirateChat {
assistantContent {
text
__typename
}
conversation {
createdAt
id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ type GeneratedQuery<InputType, OutputType> = string & {
export const getConversationMessagePirateChat = /* GraphQL */ `query GetConversationMessagePirateChat($id: ID!) {
getConversationMessagePirateChat(id: $id) {
aiContext
assistantContent {
text
__typename
}
content {
text
__typename
Expand Down
4 changes: 2 additions & 2 deletions packages/amplify-graphql-api-construct/.jsii
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
]
},
"bundled": {
"@aws-amplify/ai-constructs": "^0.1.4",
"@aws-amplify/ai-constructs": "^0.2.0",
"@aws-amplify/backend-output-schemas": "^1.0.0",
"@aws-amplify/backend-output-storage": "^1.0.0",
"@aws-amplify/graphql-auth-transformer": "4.1.2",
Expand Down Expand Up @@ -8959,5 +8959,5 @@
}
},
"version": "1.14.0",
"fingerprint": "u4jHwzwBKRAlcky7o7NnOthEdgdtKR1CtWBsGA5tXq4="
"fingerprint": "BFQM638XQPsnf3jPECgT+5lULFJd0VyEXzkdPElCSAA="
}
2 changes: 1 addition & 1 deletion packages/amplify-graphql-api-construct/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
"semver"
],
"dependencies": {
"@aws-amplify/ai-constructs": "^0.1.4",
"@aws-amplify/ai-constructs": "^0.2.0",
"@aws-amplify/backend-output-schemas": "^1.0.0",
"@aws-amplify/backend-output-storage": "^1.0.0",
"@aws-amplify/graphql-auth-transformer": "4.1.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"extract-api": "ts-node ../../scripts/extract-api.ts"
},
"dependencies": {
"@aws-amplify/ai-constructs": "^0.1.4",
"@aws-amplify/ai-constructs": "^0.2.0",
"@aws-amplify/graphql-directives": "2.2.0",
"@aws-amplify/graphql-index-transformer": "3.0.4",
"@aws-amplify/graphql-model-transformer": "3.0.4",
Expand Down
Loading

0 comments on commit 4f22e64

Please sign in to comment.