mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-27 17:01:59 +00:00
fix: update zero_to_hero package and README
- update REAMDE.md format and python version - update package name: CustomTool was renamed to ClientTool Signed-off-by: Wen Zhou <wenzhou@redhat.com>
This commit is contained in:
parent
d165000bbc
commit
9a0b3b1ee3
2 changed files with 11 additions and 11 deletions
|
|
@ -36,7 +36,7 @@
|
|||
"from dotenv import load_dotenv\n",
|
||||
"from llama_stack_client import LlamaStackClient\n",
|
||||
"from llama_stack_client.lib.agents.agent import Agent\n",
|
||||
"from llama_stack_client.lib.agents.custom_tool import CustomTool\n",
|
||||
"from llama_stack_client.lib.agents.client_tool import ClientTool\n",
|
||||
"from llama_stack_client.lib.agents.event_logger import EventLogger\n",
|
||||
"from llama_stack_client.types import CompletionMessage\n",
|
||||
"from llama_stack_client.types.agent_create_params import AgentConfig\n",
|
||||
|
|
@ -129,7 +129,7 @@
|
|||
"source": [
|
||||
"## Step 3: Create a Custom Tool Class\n",
|
||||
"\n",
|
||||
"Here, we defines the `WebSearchTool` class, which extends `CustomTool` to integrate the Brave Search API with Llama Stack, enabling web search capabilities within AI workflows. The class handles incoming user queries, interacts with the `BraveSearch` class for data retrieval, and formats results for effective response generation."
|
||||
"Here, we defines the `WebSearchTool` class, which extends `ClientTool` to integrate the Brave Search API with Llama Stack, enabling web search capabilities within AI workflows. The class handles incoming user queries, interacts with the `BraveSearch` class for data retrieval, and formats results for effective response generation."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -139,7 +139,7 @@
|
|||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"class WebSearchTool(CustomTool):\n",
|
||||
"class WebSearchTool(ClientTool):\n",
|
||||
" def __init__(self, api_key: str):\n",
|
||||
" self.api_key = api_key\n",
|
||||
" self.engine = BraveSearch(api_key)\n",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue