11#!/usr/bin/env python
22"""
3- Example demonstrating meta tools for dynamic tool discovery and execution.
3+ Example demonstrating meta search tools for dynamic tool discovery and execution.
44
5- Meta tools allow AI agents to search for relevant tools based on natural language queries
5+ Meta search tools allow AI agents to search for relevant tools based on natural language queries
66and execute them dynamically without hardcoding tool names.
77"""
88
1717
1818
1919def example_meta_tools_basic ():
20- """Basic example of using meta tools for tool discovery"""
20+ """Basic example of using meta search tools for tool discovery"""
2121 print ("🔍 Example 1: Dynamic tool discovery\n " )
2222
2323 # Initialize StackOne toolset
@@ -27,7 +27,7 @@ def example_meta_tools_basic():
2727 all_tools = toolset .get_tools ("hris_*" )
2828 print (f"Total HRIS tools available: { len (all_tools )} " )
2929
30- # Get meta tools for dynamic discovery
30+ # Get meta search tools for dynamic discovery
3131 meta_tools = all_tools .meta_search_tools ()
3232
3333 # Get the filter tool to search for relevant tools
@@ -113,8 +113,8 @@ def example_tool_calling():
113113
114114
115115def example_with_openai ():
116- """Example of using meta tools with OpenAI"""
117- print ("🤖 Example 4: Using meta tools with OpenAI\n " )
116+ """Example of using meta search tools with OpenAI"""
117+ print ("🤖 Example 4: Using meta search tools with OpenAI\n " )
118118
119119 try :
120120 from openai import OpenAI
@@ -125,14 +125,14 @@ def example_with_openai():
125125 # Initialize StackOne toolset
126126 toolset = StackOneToolSet ()
127127
128- # Get HRIS tools and their meta tools
128+ # Get HRIS tools and their meta search tools
129129 hris_tools = toolset .get_tools ("hris_*" )
130130 meta_tools = hris_tools .meta_search_tools ()
131131
132132 # Convert to OpenAI format
133133 openai_tools = meta_tools .to_openai ()
134134
135- # Create a chat completion with meta tools
135+ # Create a chat completion with meta search tools
136136 response = client .chat .completions .create (
137137 model = "gpt-4" ,
138138 messages = [
@@ -177,7 +177,7 @@ def example_with_langchain():
177177 tools = toolset .get_tools ("hris_list_*" )
178178 langchain_tools = tools .to_langchain ()
179179
180- # Get meta tools as well
180+ # Get meta search tools as well
181181 meta_tools = tools .meta_search_tools ()
182182 langchain_meta_tools = meta_tools .to_langchain ()
183183
@@ -195,7 +195,7 @@ def example_with_langchain():
195195 [
196196 (
197197 "system" ,
198- "You are an HR assistant. Use the meta tools to discover and execute relevant tools." ,
198+ "You are an HR assistant. Use the meta search tools to discover and execute relevant tools." ,
199199 ),
200200 ("human" , "{input}" ),
201201 ("placeholder" , "{agent_scratchpad}" ),
@@ -222,7 +222,7 @@ def example_with_langchain():
222222def main ():
223223 """Run all examples"""
224224 print ("=" * 60 )
225- print ("StackOne AI SDK - Meta Tools & Tool Calling Examples" )
225+ print ("StackOne AI SDK - Meta Search Tools & Tool Calling Examples" )
226226 print ("=" * 60 )
227227 print ()
228228
0 commit comments