-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
1 parent
90d9e30
commit 9c17691
Showing
8 changed files
with
159 additions
and
125 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
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,20 @@ | ||
from phi.assistant import Assistant | ||
from phi.llm.cohere import CohereChat | ||
from phi.tools.duckdb import DuckDbTools | ||
|
||
duckdb_tools = DuckDbTools(create_tables=False, export_tables=False, summarize_tables=False) | ||
duckdb_tools.create_table_from_path( | ||
path="https://phidata-public.s3.amazonaws.com/demo_data/IMDB-Movie-Data.csv", table="movies" | ||
) | ||
|
||
assistant = Assistant( | ||
llm=CohereChat(model="command-r-plus"), | ||
tools=[duckdb_tools], | ||
show_tool_calls=True, | ||
add_to_system_prompt=""" | ||
Here are the tables you have access to: | ||
- movies: Contains information about movies from IMDB. | ||
""", | ||
# debug_mode=True, | ||
) | ||
assistant.print_response("What is the average rating of movies?", markdown=True, stream=False) |
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,6 +1,12 @@ | ||
from phi.assistant import Assistant | ||
from phi.llm.cohere import CohereChat | ||
from phi.tools.exa import ExaTools | ||
from phi.tools.website import WebsiteTools | ||
from phi.llm.cohere import CohereChat | ||
|
||
assistant = Assistant(llm=CohereChat(model="command-r"), tools=[ExaTools()], show_tool_calls=True) | ||
assistant.cli_app(markdown=True) | ||
assistant = Assistant(llm=CohereChat(model="command-r-plus"), tools=[ExaTools(), WebsiteTools()], show_tool_calls=True) | ||
assistant.print_response( | ||
"Produce this table: research chromatic homotopy theory." | ||
"Access each link in the result outputting the summary for that article, its link, and keywords; " | ||
"After the table output make conceptual ascii art of the overarching themes and constructions", | ||
markdown=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
Oops, something went wrong.