-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change to anthropic claude client for bedrock
- Loading branch information
Showing
32 changed files
with
154 additions
and
365 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,15 @@ | ||
import asyncio | ||
|
||
from agno.agent import Agent, RunResponse # noqa | ||
from agno.models.aws.claude import Claude | ||
|
||
agent = Agent( | ||
model=Claude(id="anthropic.claude-3-5-sonnet-20240620-v1:0"), markdown=True | ||
) | ||
|
||
# Get the response in a variable | ||
# run: RunResponse = agent.run("Share a 2 sentence horror story") | ||
# print(run.content) | ||
|
||
# Print the response in the terminal | ||
asyncio.run(agent.aprint_response("Share a 2 sentence horror story")) |
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,16 @@ | ||
import asyncio | ||
from typing import Iterator # noqa | ||
from agno.agent import Agent, RunResponse # noqa | ||
from agno.models.aws.claude import Claude | ||
|
||
agent = Agent( | ||
model=Claude(id="anthropic.claude-3-5-sonnet-20240620-v1:0"), markdown=True | ||
) | ||
|
||
# Get the response in a variable | ||
# run_response: Iterator[RunResponse] = agent.run("Share a 2 sentence horror story", stream=True) | ||
# for chunk in run_response: | ||
# print(chunk.content) | ||
|
||
# Print the response in the terminal | ||
asyncio.run(agent.aprint_response("Share a 2 sentence horror story", stream=True)) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
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
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import asyncio | ||
|
||
from agno.agent import Agent, RunResponse # noqa | ||
from agno.models.openai import OpenAIChat | ||
|
||
|
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
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
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
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
Oops, something went wrong.