Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates to set up ai page #8097

Merged
merged 1 commit into from
Nov 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/pages/[platform]/ai/set-up-ai/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ Before you begin, you will need:

You will also need an AWS account that is [setup for local development](/[platform]/start/account-setup) and has access to the Bedrock Foundation Model(s) you want to use. You can request access to Bedrock models by going in to the [Bedrock console and requesting access](https://console.aws.amazon.com/bedrock/home#/modelaccess).

<Callout>

Running inference on large language models (LLMs) can be costly. Amazon Bedrock is a serverless service so you only pay for what you use, but be mindful of the costs associated with building generative AI applications. [See Bedrock pricing for more information](https://aws.amazon.com/bedrock/pricing/).

</Callout>

## Create an Amplify backend

Run the create amplify script in your project directory:
Expand Down Expand Up @@ -107,6 +113,12 @@ const schema = a.schema({
});
```

<Callout>

Conversation routes currently ONLY support owner-based authorization and generation routes ONLY support non-owner-based authorization (`authenticated`, `guest`, `group`, `publicApiKey`).

</Callout>

If you have the Amplify sandbox running, when you save this file it will pick up the changes and redeploy the necessary resources for you.

## Connect your frontend
Expand Down Expand Up @@ -180,6 +192,7 @@ Call `Amplify.configure()` with the **amplify_outputs.json** file where the Reac

```tsx title="src/main.tsx"
import { Amplify } from 'aws-amplify';
import '@aws-amplify/ui-react/styles.css';
import outputs from '../amplify_outputs.json';

Amplify.configure(outputs);
Expand Down