-
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.
- Loading branch information
Showing
16 changed files
with
158 additions
and
492 deletions.
There are no files selected for viewing
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,12 @@ | ||
import asyncio | ||
from agno.agent import Agent | ||
from agno.models.huggingface import HuggingFace | ||
|
||
agent = Agent( | ||
model=HuggingFace( | ||
id="mistralai/Mistral-7B-Instruct-v0.2", max_tokens=4096, temperature=0 | ||
), | ||
) | ||
asyncio.run(agent.aprint_response( | ||
"What is meaning of life and then recommend 5 best books to read about it" | ||
)) |
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,13 @@ | ||
import asyncio | ||
from agno.agent import Agent | ||
from agno.models.huggingface import HuggingFace | ||
|
||
agent = Agent( | ||
model=HuggingFace( | ||
id="mistralai/Mistral-7B-Instruct-v0.2", max_tokens=4096, temperature=0 | ||
), | ||
) | ||
asyncio.run(agent.aprint_response( | ||
"What is meaning of life and then recommend 5 best books to read about it", | ||
stream=True, | ||
)) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import asyncio | ||
from agno.agent import Agent, RunResponse # noqa | ||
from agno.models.openai import OpenAIChat | ||
|
||
agent = Agent(model=OpenAIChat(id="gpt-4o"), 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,14 @@ | ||
import asyncio | ||
from typing import Iterator # noqa | ||
from agno.agent import Agent, RunResponse # noqa | ||
from agno.models.openai import OpenAIChat | ||
|
||
agent = Agent(model=OpenAIChat(id="gpt-4o"), 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)) |
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
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.