Hi Yash,
Thanks for your reply.
I’m indeed using OpenAI as the model.
Please find below the result of the tool calls:
Thanks in advanced for your help.
DEBUG Debug logs enabled
😎 User : Whats the phone number of Lisa Cain?
DEBUG *********** Agent Run Start: c7c509ad-9e68-4a0e-ac04-a95e38d93d49 ***********
DEBUG Function read_csv_file from csv_tools added to model.
DEBUG Function list_csv_files from csv_tools added to model.
DEBUG Function get_columns from csv_tools added to model.
DEBUG Function query_csv_file from csv_tools added to model.
DEBUG ---------- OpenAI Response Start ----------
DEBUG ============== system ==============
DEBUG ## Instructions
- First always get the list of files
- Then check the columns in the file
- Then run the query to answer the question
- Use markdown to format your answers.
DEBUG ============== user ==============
DEBUG Whats the phone number of Lisa Cain?
DEBUG ============== assistant ==============
DEBUG Tool Calls: [
{
"id": "call_uKrJmMyUGktsIMYSX4cMhCES",
"function": {
"arguments": "{}",
"name": "list_csv_files"
},
"type": "function"
}
]
DEBUG **************** METRICS START ****************
DEBUG * Time to generate response: 0.7512s
DEBUG * Tokens per second: 15.9734 tokens/s
DEBUG * Input tokens: 388
DEBUG * Output tokens: 12
DEBUG * Total tokens: 400
DEBUG * Prompt tokens details: {'audio_tokens': 0, 'cached_tokens': 0}
DEBUG * Completion tokens details: {'accepted_prediction_tokens': 0, 'audio_tokens': 0, 'reasoning_tokens':
0, 'rejected_prediction_tokens': 0}
DEBUG **************** METRICS END ******************
DEBUG Getting function list_csv_files
DEBUG Running: list_csv_files()
DEBUG ---------- OpenAI Response Start ----------
DEBUG ============== system ==============
DEBUG ## Instructions
- First always get the list of files
- Then check the columns in the file
- Then run the query to answer the question
- Use markdown to format your answers.
DEBUG ============== user ==============
DEBUG Whats the phone number of Lisa Cain?
DEBUG ============== assistant ==============
DEBUG Tool Calls: [
{
"id": "call_uKrJmMyUGktsIMYSX4cMhCES",
"function": {
"arguments": "{}",
"name": "list_csv_files"
},
"type": "function"
}
]
DEBUG ============== tool ==============
DEBUG Tool call Id: call_uKrJmMyUGktsIMYSX4cMhCES
DEBUG ["clients"]
DEBUG ============== assistant ==============
DEBUG Tool Calls: [
{
"id": "call_YUxln9LSLYNCnaJVXEQ3jl17",
"function": {
"arguments": "{\"csv_name\":\"clients\"}",
"name": "get_columns"
},
"type": "function"
}
]
DEBUG **************** METRICS START ****************
DEBUG * Time to generate response: 0.7334s
DEBUG * Tokens per second: 21.8176 tokens/s
DEBUG * Input tokens: 411
DEBUG * Output tokens: 16
DEBUG * Total tokens: 427
DEBUG * Prompt tokens details: {'audio_tokens': 0, 'cached_tokens': 0}
DEBUG * Completion tokens details: {'accepted_prediction_tokens': 0, 'audio_tokens': 0, 'reasoning_tokens':
0, 'rejected_prediction_tokens': 0}
DEBUG **************** METRICS END ******************
DEBUG Getting function get_columns
DEBUG Running: get_columns(csv_name=clients)
INFO Reading columns from file: clients
DEBUG ---------- OpenAI Response Start ----------
DEBUG ============== system ==============
DEBUG ## Instructions
- First always get the list of files
- Then check the columns in the file
- Then run the query to answer the question
- Use markdown to format your answers.
DEBUG ============== user ==============
DEBUG Whats the phone number of Lisa Cain?
DEBUG ============== assistant ==============
DEBUG Tool Calls: [
{
"id": "call_uKrJmMyUGktsIMYSX4cMhCES",
"function": {
"arguments": "{}",
"name": "list_csv_files"
},
"type": "function"
}
]
DEBUG ============== tool ==============
DEBUG Tool call Id: call_uKrJmMyUGktsIMYSX4cMhCES
DEBUG ["clients"]
DEBUG ============== assistant ==============
DEBUG Tool Calls: [
{
"id": "call_YUxln9LSLYNCnaJVXEQ3jl17",
"function": {
"arguments": "{\"csv_name\":\"clients\"}",
"name": "get_columns"
},
"type": "function"
}
]
DEBUG ============== tool ==============
DEBUG Tool call Id: call_YUxln9LSLYNCnaJVXEQ3jl17
DEBUG ["Customer ID", "First name", "Last name", "Address", "Zipcode", "City", "Country", "Phone number"]
DEBUG ============== assistant ==============
DEBUG Tool Calls: [
{
"id": "call_yHHAis0YURluwhpscdZCd3PA",
"function": {
"arguments": "{\"csv_name\":\"clients\",\"sql_query\":\"SELECT \\\"Phone number\\\" FROM clients
WHERE \\\"First name\\\" = 'Lisa' AND \\\"Last name\\\" = 'Cain'\"}",
"name": "query_csv_file"
},
"type": "function"
}
]
DEBUG **************** METRICS START ****************
DEBUG * Time to generate response: 0.9566s
DEBUG * Tokens per second: 48.0873 tokens/s
DEBUG * Input tokens: 463
DEBUG * Output tokens: 46
DEBUG * Total tokens: 509
DEBUG * Prompt tokens details: {'audio_tokens': 0, 'cached_tokens': 0}
DEBUG * Completion tokens details: {'accepted_prediction_tokens': 0, 'audio_tokens': 0, 'reasoning_tokens':
0, 'rejected_prediction_tokens': 0}
DEBUG **************** METRICS END ******************
DEBUG Getting function query_csv_file
DEBUG Running: query_csv_file(csv_name=clients, sql_query=SELECT "Phone number" FROM clients WHERE "First
name" = 'Lisa' AND "Last name" = 'Cain')
INFO Loading csv file: clients
ERROR Error querying csv: Parser Error: syntax error at or near "s"
DEBUG ---------- OpenAI Response Start ----------
DEBUG ============== system ==============
DEBUG ## Instructions
- First always get the list of files
- Then check the columns in the file
- Then run the query to answer the question
- Use markdown to format your answers.
DEBUG ============== user ==============
DEBUG Whats the phone number of Lisa Cain?
DEBUG ============== assistant ==============
DEBUG Tool Calls: [
{
"id": "call_uKrJmMyUGktsIMYSX4cMhCES",
"function": {
"arguments": "{}",
"name": "list_csv_files"
},
"type": "function"
}
]
DEBUG ============== tool ==============
DEBUG Tool call Id: call_uKrJmMyUGktsIMYSX4cMhCES
DEBUG ["clients"]
DEBUG ============== assistant ==============
DEBUG Tool Calls: [
{
"id": "call_YUxln9LSLYNCnaJVXEQ3jl17",
"function": {
"arguments": "{\"csv_name\":\"clients\"}",
"name": "get_columns"
},
"type": "function"
}
]
DEBUG ============== tool ==============
DEBUG Tool call Id: call_YUxln9LSLYNCnaJVXEQ3jl17
DEBUG ["Customer ID", "First name", "Last name", "Address", "Zipcode", "City", "Country", "Phone number"]
DEBUG ============== assistant ==============
DEBUG Tool Calls: [
{
"id": "call_yHHAis0YURluwhpscdZCd3PA",
"function": {
"arguments": "{\"csv_name\":\"clients\",\"sql_query\":\"SELECT \\\"Phone number\\\" FROM clients
WHERE \\\"First name\\\" = 'Lisa' AND \\\"Last name\\\" = 'Cain'\"}",
"name": "query_csv_file"
},
"type": "function"
}
]
DEBUG ============== tool ==============
DEBUG Tool call Id: call_yHHAis0YURluwhpscdZCd3PA
DEBUG Error querying csv: Parser Error: syntax error at or near "s"
DEBUG ============== assistant ==============
DEBUG Tool Calls: [
{
"id": "call_7kyuZLSrMJ0ronz5Q2KK141P",
"function": {
"arguments": "{\"csv_name\":\"clients\",\"sql_query\":\"SELECT \\\"Phone number\\\" FROM
\\\"clients\\\" WHERE \\\"First name\\\" = 'Lisa' AND \\\"Last name\\\" = 'Cain'\"}",
"name": "query_csv_file"
},
"type": "function"
}
]
DEBUG **************** METRICS START ****************
DEBUG * Time to generate response: 1.1083s
DEBUG * Tokens per second: 43.3100 tokens/s
DEBUG * Input tokens: 532
DEBUG * Output tokens: 48
DEBUG * Total tokens: 580
DEBUG * Prompt tokens details: {'audio_tokens': 0, 'cached_tokens': 0}
DEBUG * Completion tokens details: {'accepted_prediction_tokens': 0, 'audio_tokens': 0, 'reasoning_tokens':
0, 'rejected_prediction_tokens': 0}
DEBUG **************** METRICS END ******************
DEBUG Getting function query_csv_file
DEBUG Running: query_csv_file(csv_name=clients, sql_query=SELECT "Phone number" FROM "clients" WHERE "First
name" = 'Lisa' AND "Last name" = 'Cain')
INFO Loading csv file: clients
ERROR Error querying csv: Parser Error: syntax error at or near "s"
DEBUG ---------- OpenAI Response Start ----------
DEBUG ============== system ==============
DEBUG ## Instructions
- First always get the list of files
- Then check the columns in the file
- Then run the query to answer the question
- Use markdown to format your answers.
DEBUG ============== user ==============
DEBUG Whats the phone number of Lisa Cain?
DEBUG ============== assistant ==============
DEBUG Tool Calls: [
{
"id": "call_uKrJmMyUGktsIMYSX4cMhCES",
"function": {
"arguments": "{}",
"name": "list_csv_files"
},
"type": "function"
}
]
DEBUG ============== tool ==============
DEBUG Tool call Id: call_uKrJmMyUGktsIMYSX4cMhCES
DEBUG ["clients"]
DEBUG ============== assistant ==============
DEBUG Tool Calls: [
{
"id": "call_YUxln9LSLYNCnaJVXEQ3jl17",
"function": {
"arguments": "{\"csv_name\":\"clients\"}",
"name": "get_columns"
},
"type": "function"
}
]
DEBUG ============== tool ==============
DEBUG Tool call Id: call_YUxln9LSLYNCnaJVXEQ3jl17
DEBUG ["Customer ID", "First name", "Last name", "Address", "Zipcode", "City", "Country", "Phone number"]
DEBUG ============== assistant ==============
DEBUG Tool Calls: [
{
"id": "call_yHHAis0YURluwhpscdZCd3PA",
"function": {
"arguments": "{\"csv_name\":\"clients\",\"sql_query\":\"SELECT \\\"Phone number\\\" FROM clients
WHERE \\\"First name\\\" = 'Lisa' AND \\\"Last name\\\" = 'Cain'\"}",
"name": "query_csv_file"
},
"type": "function"
}
]
DEBUG ============== tool ==============
DEBUG Tool call Id: call_yHHAis0YURluwhpscdZCd3PA
DEBUG Error querying csv: Parser Error: syntax error at or near "s"
DEBUG ============== assistant ==============
DEBUG Tool Calls: [
{
"id": "call_7kyuZLSrMJ0ronz5Q2KK141P",
"function": {
"arguments": "{\"csv_name\":\"clients\",\"sql_query\":\"SELECT \\\"Phone number\\\" FROM
\\\"clients\\\" WHERE \\\"First name\\\" = 'Lisa' AND \\\"Last name\\\" = 'Cain'\"}",
"name": "query_csv_file"
},
"type": "function"
}
]
DEBUG ============== tool ==============
DEBUG Tool call Id: call_7kyuZLSrMJ0ronz5Q2KK141P
DEBUG Error querying csv: Parser Error: syntax error at or near "s"
DEBUG ============== assistant ==============
DEBUG Tool Calls: [
{
"id": "call_vvB4f3wxXUti8t5y87JX8t3C",
"function": {
"arguments": "{\"csv_name\":\"clients\",\"sql_query\":\"SELECT \\\"Phone number\\\" FROM clients
WHERE \\\"First name\\\" = 'Lisa' AND \\\"Last name\\\" = 'Cain'\"}",
"name": "query_csv_file"
},
"type": "function"
}
]
Apologies, I had to cut a part off, as the number of characters I can share is restricted.