From 289fca547269acf13758fec9336756c7588be8a0 Mon Sep 17 00:00:00 2001 From: ysolanky Date: Wed, 1 May 2024 10:17:21 -0400 Subject: [PATCH] add-tool-cookbooks-phi-732 --- cookbook/tools/email_tools.py | 11 +++++++++++ cookbook/tools/tavily_tools.py | 5 +++++ cookbook/tools/website_tools.py | 5 +++++ 3 files changed, 21 insertions(+) create mode 100644 cookbook/tools/email_tools.py create mode 100644 cookbook/tools/tavily_tools.py create mode 100644 cookbook/tools/website_tools.py diff --git a/cookbook/tools/email_tools.py b/cookbook/tools/email_tools.py new file mode 100644 index 000000000..95b4e022e --- /dev/null +++ b/cookbook/tools/email_tools.py @@ -0,0 +1,11 @@ +from phi.assistant import Assistant +from phi.tools.email import EmailTools + +receiver_email = "" +sender_email = "" +sender_name = "" +sender_passkey = "" + +assistant = Assistant(tools=[EmailTools(receiver_email=receiver_email, sender_email=sender_email, sender_name=sender_name, sender_passkey=sender_passkey)]) + +assistant.print_response("send an email to ") diff --git a/cookbook/tools/tavily_tools.py b/cookbook/tools/tavily_tools.py new file mode 100644 index 000000000..6db3a2983 --- /dev/null +++ b/cookbook/tools/tavily_tools.py @@ -0,0 +1,5 @@ +from phi.assistant import Assistant +from phi.tools.tavily import TavilyTools + +assistant = Assistant(tools=[TavilyTools()], show_tool_calls=True) +assistant.print_response("Search tavily for 'language models'", markdown=True) diff --git a/cookbook/tools/website_tools.py b/cookbook/tools/website_tools.py new file mode 100644 index 000000000..ae7b8ea47 --- /dev/null +++ b/cookbook/tools/website_tools.py @@ -0,0 +1,5 @@ +from phi.assistant import Assistant +from phi.tools.website import WebsiteTools + +assistant = Assistant(tools=[WebsiteTools()], show_tool_calls=True) +assistant.print_response("Search web page: 'https://docs.phidata.com/introduction'", markdown=True)