-
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.
## Description This update introduces the Confluence tool for collaboration, improves tool compatibility, and resolves deep copy issues for Ollama chat agents. **New Features:** - Confluence Tool: Added a new tool using the Atlassian Confluence SDK, enabling operations such as listing pages in a space, creating and updating pages, retrieving page content by title, and getting space details. **Improvements:** - Tool Compatibility: Enhanced older custom functions with manually specified descriptions and parameters to align with the updated tool-building system. **Bug Fixes:** - Deep Copy for Ollama Chat Agents: Addressed an issue where manually set clients caused errors during agent model copying, ensuring all properties are properly handled. --------- Co-authored-by: Anurag <[email protected]>
- Loading branch information
Showing
10 changed files
with
61 additions
and
11 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
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