The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
docs: Specify environment variables for BedrockConverse (#32194)
Jacob Lee0f39155f6274
diff --git a/docs/docs/integrations/chat/bedrock.ipynb b/docs/docs/integrations/chat/bedrock.ipynbindex 3dcc31e788..504ea2564c 100644--- a/docs/docs/integrations/chat/bedrock.ipynb+++ b/docs/docs/integrations/chat/bedrock.ipynb@@ -51,7 +51,31 @@"\n","### Credentials\n","\n",- "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)."+ "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",+ "\n",+ "Alternatively, `ChatBedrockConverse` will read from the following environment variables by default:"+ ]+ },+ {+ "cell_type": "code",+ "execution_count": null,+ "id": "0f65be92",+ "metadata": {},+ "outputs": [],+ "source": [+ "# os.environ[\"AWS_ACCESS_KEY_ID\"] = \"...\"\n",+ "# os.environ[\"AWS_SECRET_ACCESS_KEY\"] = \"...\"\n",+ "\n",+ "# Not required unless using temporary credentials.\n",+ "# os.environ[\"AWS_SESSION_TOKEN\"] = \"...\""+ ]+ },+ {+ "cell_type": "markdown",+ "id": "3baad5a9",+ "metadata": {},+ "source": [+ "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)."]},{@@ -114,6 +138,10 @@"\n","llm = ChatBedrockConverse(\n"," model_id=\"anthropic.claude-3-5-sonnet-20240620-v1:0\",\n",+ " # region_name=...,\n",+ " # aws_access_key_id=...,\n",+ " # aws_secret_access_key=...,\n",+ " # aws_session_token=...,\n"," # temperature=...,\n"," # max_tokens=...,\n"," # other params...\n",