Documentation Index
Fetch the complete documentation index at: https://docs.phidata.com/llms.txt
Use this file to discover all available pages before exploring further.
Example
from phi.agent import Agent, RunResponse
from phi.model.aws.claude import Claude
agent = Agent(
model=Claude(id="anthropic.claude-3-5-sonnet-20240620-v1:0")
)
# Get the response in a variable
# run: RunResponse = agent.run("Share a 2 sentence horror story.")
# print(run.content)
# Print the response on the terminal
agent.print_response("Share a 2 sentence horror story.")
Usage
Get your keys from here.
Create a virtual environment
Open the Terminal and create a python virtual environment.python3 -m venv ~/.venvs/aienv
source ~/.venvs/aienv/bin/activate
Install libraries
pip install -U boto3 phidata
Export Environment Variables
export AWS_ACCESS_KEY_ID=***
export AWS_SECRET_ACCESS_KEY=***
export AWS_DEFAULT_REGION=***
Run AWS Bedrock Agent
python cookbook/providers/bedrock/basic.py