Skip to content

Commit

Permalink
v2.5.26
Browse files Browse the repository at this point in the history
  • Loading branch information
ashpreetbedi committed Oct 30, 2024
1 parent 40ee429 commit 9bd3359
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 26 deletions.
13 changes: 3 additions & 10 deletions cookbook/tools/openbb_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,10 @@
agent = Agent(tools=[OpenBBTools()], debug_mode=True, show_tool_calls=True)

# Example usage showing stock analysis
agent.print_response(
"Get me the current stock price and key information for Apple (AAPL)"
)
agent.print_response("Get me the current stock price and key information for Apple (AAPL)")

# Example showing market analysis
agent.print_response(
"What are the top gainers in the market today?"
)
agent.print_response("What are the top gainers in the market today?")

# Example showing economic indicators
agent.print_response(
"Show me the latest GDP growth rate and inflation numbers for the US"
)

agent.print_response("Show me the latest GDP growth rate and inflation numbers for the US")
8 changes: 1 addition & 7 deletions cookbook/tools/postgres_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,7 @@
from phi.tools.postgres import PostgresTools

# Initialize PostgresTools with connection details
postgres_tools = PostgresTools(
host="localhost",
port=5532,
db_name="ai",
user="ai",
password="ai"
)
postgres_tools = PostgresTools(host="localhost", port=5532, db_name="ai", user="ai", password="ai")

# Create an agent with the PostgresTools
agent = Agent(tools=[postgres_tools])
Expand Down
8 changes: 1 addition & 7 deletions cookbook/tools/searxng_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,7 @@
from phi.tools.searxng import Searxng

# Initialize Searxng with your Searxng instance URL
searxng = Searxng(
host="http://localhost:53153",
engines=[],
fixed_max_results=5,
news=True,
science=True
)
searxng = Searxng(host="http://localhost:53153", engines=[], fixed_max_results=5, news=True, science=True)

# Create an agent with Searxng
agent = Agent(tools=[searxng])
Expand Down
4 changes: 3 additions & 1 deletion phi/tools/postgres.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
try:
import psycopg2
except ImportError:
raise ImportError("`psycopg2` not installed. Please install using `pip install psycopg2`. If you face issues, try `pip install psycopg2-binary`.")
raise ImportError(
"`psycopg2` not installed. Please install using `pip install psycopg2`. If you face issues, try `pip install psycopg2-binary`."
)

from phi.tools import Toolkit
from phi.utils.log import logger
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "phidata"
version = "2.5.25"
version = "2.5.26"
description = "Build AI Agents with memory, knowledge and tools."
requires-python = ">=3.7"
readme = "README.md"
Expand Down

0 comments on commit 9bd3359

Please sign in to comment.