File tree Expand file tree Collapse file tree 1 file changed +3
-16
lines changed
Expand file tree Collapse file tree 1 file changed +3
-16
lines changed Original file line number Diff line number Diff line change 4141 }
4242}
4343
44- # Tool definition - describes the get_user_info function available to the model
45- tools = [{
46- "type" : "function" ,
47- "function" : {
48- "name" : "get_user_info" ,
49- "description" : "Access the employee database" ,
50- "parameters" : {
51- "type" : "object" ,
52- "properties" : {
53- "name" : {"type" : "string" , "description" : "Full name of the employee to look up" }
54- },
55- "required" : ["name" ]
56- }
57- }
58- }]
59-
6044# Function implementation - retrieves user data from our database
6145def get_user_info (name ):
6246 """Fetch user information from the database by name (case-insensitive)"""
6347 return user_database .get (name .strip ().lower (), "User not found in database" )
6448
49+ # Tool definition - describes the get_user_info function available to the model
50+ tools = T .functions_to_tools ([get_user_info ])
51+
6552client = T .clients .openrouter ("API_KEY" )
6653prompt = """Give me the information you have access to on the following users :
6754- jean dupont
You can’t perform that action at this time.
0 commit comments