-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into storage-access-outputs
- Loading branch information
Showing
104 changed files
with
4,562 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@aws-amplify/backend-deployer': patch | ||
--- | ||
|
||
surface synth errors if the function declaration files have not been written yet. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Be very careful editing this file. It is crafted to work around [this issue](https://github.com/npm/npm/issues/4479) | ||
|
||
# First ignore everything | ||
**/* | ||
|
||
# Then add back in transpiled js and ts declaration files | ||
!lib/**/*.js | ||
!lib/**/*.d.ts | ||
|
||
# Then ignore test js and ts declaration files | ||
*.test.js | ||
*.test.d.ts | ||
|
||
# This leaves us with including only js and ts declaration files of functional code |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
## API Report File for "@aws-amplify/ai-constructs" | ||
|
||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). | ||
```ts | ||
|
||
/// <reference types="node" /> | ||
|
||
import * as bedrock from '@aws-sdk/client-bedrock-runtime'; | ||
import { Construct } from 'constructs'; | ||
import { FunctionResources } from '@aws-amplify/plugin-types'; | ||
import { ResourceProvider } from '@aws-amplify/plugin-types'; | ||
import * as smithy from '@smithy/types'; | ||
|
||
declare namespace __export__conversation { | ||
export { | ||
ConversationHandlerFunction, | ||
ConversationHandlerFunctionProps | ||
} | ||
} | ||
export { __export__conversation } | ||
|
||
declare namespace __export__conversation__runtime { | ||
export { | ||
ConversationMessage, | ||
ConversationMessageContentBlock, | ||
ConversationTurnEvent, | ||
ExecutableTool, | ||
handleConversationTurnEvent, | ||
ToolDefinition, | ||
ToolExecutionInput, | ||
ToolInputSchema, | ||
ToolResultContentBlock | ||
} | ||
} | ||
export { __export__conversation__runtime } | ||
|
||
// @public | ||
class ConversationHandlerFunction extends Construct implements ResourceProvider<FunctionResources> { | ||
constructor(scope: Construct, id: string, props: ConversationHandlerFunctionProps); | ||
// (undocumented) | ||
resources: FunctionResources; | ||
} | ||
|
||
// @public (undocumented) | ||
type ConversationHandlerFunctionProps = { | ||
entry?: string; | ||
models: Array<{ | ||
modelId: string; | ||
region?: string; | ||
}>; | ||
}; | ||
|
||
// @public (undocumented) | ||
type ConversationMessage = { | ||
role: 'user' | 'assistant'; | ||
content: Array<ConversationMessageContentBlock>; | ||
}; | ||
|
||
// @public (undocumented) | ||
type ConversationMessageContentBlock = bedrock.ContentBlock | { | ||
image: Omit<bedrock.ImageBlock, 'source'> & { | ||
source: { | ||
bytes: string; | ||
}; | ||
}; | ||
}; | ||
|
||
// @public (undocumented) | ||
type ConversationTurnEvent = { | ||
conversationId: string; | ||
currentMessageId: string; | ||
responseMutation: { | ||
name: string; | ||
inputTypeName: string; | ||
selectionSet: string; | ||
}; | ||
graphqlApiEndpoint: string; | ||
modelConfiguration: { | ||
modelId: string; | ||
systemPrompt: string; | ||
region?: string; | ||
inferenceConfiguration?: { | ||
maxTokens?: number; | ||
temperature?: number; | ||
topP?: number; | ||
}; | ||
}; | ||
request: { | ||
headers: { | ||
authorization: string; | ||
}; | ||
}; | ||
messages: Array<ConversationMessage>; | ||
toolsConfiguration?: { | ||
dataTools?: Array<ToolDefinition & { | ||
graphqlRequestInputDescriptor: { | ||
queryName: string; | ||
selectionSet: string; | ||
propertyTypes: Record<string, string>; | ||
}; | ||
}>; | ||
clientTools?: Array<ToolDefinition>; | ||
}; | ||
}; | ||
|
||
// @public (undocumented) | ||
type ExecutableTool = ToolDefinition & { | ||
execute: (input: ToolExecutionInput | undefined) => Promise<ToolResultContentBlock>; | ||
}; | ||
|
||
// @public | ||
const handleConversationTurnEvent: (event: ConversationTurnEvent, props?: { | ||
tools?: Array<ExecutableTool>; | ||
}) => Promise<void>; | ||
|
||
// @public (undocumented) | ||
type ToolDefinition = { | ||
name: string; | ||
description: string; | ||
inputSchema: ToolInputSchema; | ||
}; | ||
|
||
// @public (undocumented) | ||
type ToolExecutionInput = smithy.DocumentType; | ||
|
||
// @public (undocumented) | ||
type ToolInputSchema = bedrock.ToolInputSchema; | ||
|
||
// @public (undocumented) | ||
type ToolResultContentBlock = bedrock.ToolResultContentBlock; | ||
|
||
// (No @packageDocumentation comment for this package) | ||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# @aws-amplify/ai-constructs | ||
|
||
## 0.1.2 | ||
|
||
### Patch Changes | ||
|
||
- daac630: Remove runtime namespace from main exports | ||
|
||
## 0.1.1 | ||
|
||
### Patch Changes | ||
|
||
- 61669ff: Handle base64 images in conversation handler | ||
- da9c60c: Add main entry point in ai-constructs package | ||
- c17e397: Un-peer Bedrock dependencies | ||
|
||
## 0.1.0 | ||
|
||
### Minor Changes | ||
|
||
- 99c8b6a: Add new @aws-amplify/ai-constructs and @aws-amplify/backend-ai packages with a conversation handler. |
Oops, something went wrong.