Skip to content

Commit

Permalink
v2.3.75
Browse files Browse the repository at this point in the history
  • Loading branch information
ashpreetbedi committed Apr 18, 2024
1 parent 888b0c3 commit 8cab67e
Show file tree
Hide file tree
Showing 5 changed files with 484 additions and 3 deletions.
11 changes: 11 additions & 0 deletions cookbook/llms/ollama/finance.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from phi.assistant import Assistant
from phi.tools.yfinance import YFinanceTools
from phi.llm.ollama import OllamaTools

print("============= llama3 finance assistant =============")
assistant = Assistant(
llm=OllamaTools(model="llama3"),
tools=[YFinanceTools(stock_price=True, analyst_recommendations=True, stock_fundamentals=True)],
show_tool_calls=True,
)
assistant.cli_app(markdown=True)
4 changes: 2 additions & 2 deletions cookbook/llms/ollama/tool_call.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import typer
from phi.assistant import Assistant
from phi.tools.duckduckgo import DuckDuckGo
from phi.llm.ollama import Ollama
from phi.llm.ollama import OllamaTools


def tool_call(model: str = "openhermes", debug: bool = False):
print(f"============= Running: {model} =============")
Assistant(
llm=Ollama(model=model),
llm=OllamaTools(model=model),
tools=[DuckDuckGo()],
show_tool_calls=True,
debug_mode=debug,
Expand Down
1 change: 1 addition & 0 deletions phi/llm/ollama/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
from phi.llm.ollama.chat import Ollama
from phi.llm.ollama.hermes import Hermes
from phi.llm.ollama.tools import OllamaTools
Loading

0 comments on commit 8cab67e

Please sign in to comment.