-
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.
Merge branch 'release/2.7.5' into fix/composio-tools-not-working
- Loading branch information
Showing
8 changed files
with
51 additions
and
7 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
Empty file.
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,16 @@ | ||
-- Create 'users' table | ||
CREATE TABLE IF NOT EXISTS users ( | ||
id INT AUTO_INCREMENT PRIMARY KEY, | ||
username VARCHAR(50) NOT NULL UNIQUE, | ||
email VARCHAR(100) NOT NULL UNIQUE, | ||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP | ||
); | ||
|
||
-- Create 'products' table | ||
CREATE TABLE IF NOT EXISTS products ( | ||
id INT AUTO_INCREMENT PRIMARY KEY, | ||
name VARCHAR(100) NOT NULL, | ||
description TEXT, | ||
price DECIMAL(10,2) NOT NULL, | ||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP | ||
); |
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,18 @@ | ||
"""Run `pip install yfinance` to install dependencies.""" | ||
|
||
from ollama import Client as OllamaClient | ||
from phi.agent import Agent, RunResponse # noqa | ||
from phi.model.ollama import Ollama | ||
from phi.playground import Playground, serve_playground_app | ||
from phi.tools.yfinance import YFinanceTools | ||
|
||
agent = Agent( | ||
model=Ollama(id="llama3.1:8b", client=OllamaClient()), | ||
tools=[YFinanceTools(stock_price=True)], | ||
markdown=True, | ||
) | ||
|
||
app = Playground(agents=[agent]).get_app() | ||
|
||
if __name__ == "__main__": | ||
serve_playground_app("agent_set_client:app", reload=True) |
Empty file.
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,10 @@ | ||
docker run -d \ | ||
-e MYSQL_ROOT_PASSWORD=phi \ | ||
-e MYSQL_DATABASE=phi \ | ||
-e MYSQL_USER=phi \ | ||
-e MYSQL_PASSWORD=phi \ | ||
-p 3306:3306 \ | ||
-v mysql_data:/var/lib/mysql \ | ||
-v $(pwd)/cookbook/mysql-init:/docker-entrypoint-initdb.d \ | ||
--name mysql \ | ||
mysql:8.0 |
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