|
51 | 51 | "\n",
|
52 | 52 | "### Credentials\n",
|
53 | 53 | "\n",
|
54 |
| - "Head to the [AWS docs](https://docs.aws.amazon.com/bedrock/latest/userguide/setting-up.html) to sign up to AWS and setup your credentials. You'll also need to turn on model access for your account, which you can do by following [these instructions](https://docs.aws.amazon.com/bedrock/latest/userguide/model-access.html)." |
| 54 | + "Head to the [AWS docs](https://docs.aws.amazon.com/bedrock/latest/userguide/setting-up.html) to sign up to AWS and setup your credentials.\n", |
| 55 | + "\n", |
| 56 | + "Alternatively, `ChatBedrockConverse` will read from the following environment variables by default:" |
| 57 | + ] |
| 58 | + }, |
| 59 | + { |
| 60 | + "cell_type": "code", |
| 61 | + "execution_count": null, |
| 62 | + "id": "0f65be92", |
| 63 | + "metadata": {}, |
| 64 | + "outputs": [], |
| 65 | + "source": [ |
| 66 | + "# os.environ[\"AWS_ACCESS_KEY_ID\"] = \"...\"\n", |
| 67 | + "# os.environ[\"AWS_SECRET_ACCESS_KEY\"] = \"...\"\n", |
| 68 | + "\n", |
| 69 | + "# Not required unless using temporary credentials.\n", |
| 70 | + "# os.environ[\"AWS_SESSION_TOKEN\"] = \"...\"" |
| 71 | + ] |
| 72 | + }, |
| 73 | + { |
| 74 | + "cell_type": "markdown", |
| 75 | + "id": "3baad5a9", |
| 76 | + "metadata": {}, |
| 77 | + "source": [ |
| 78 | + "You'll also need to turn on model access for your account, which you can do by following [these instructions](https://docs.aws.amazon.com/bedrock/latest/userguide/model-access.html)." |
55 | 79 | ]
|
56 | 80 | },
|
57 | 81 | {
|
|
114 | 138 | "\n",
|
115 | 139 | "llm = ChatBedrockConverse(\n",
|
116 | 140 | " model_id=\"anthropic.claude-3-5-sonnet-20240620-v1:0\",\n",
|
| 141 | + " # region_name=...,\n", |
| 142 | + " # aws_access_key_id=...,\n", |
| 143 | + " # aws_secret_access_key=...,\n", |
| 144 | + " # aws_session_token=...,\n", |
117 | 145 | " # temperature=...,\n",
|
118 | 146 | " # max_tokens=...,\n",
|
119 | 147 | " # other params...\n",
|
|
0 commit comments