when the status becomes “requires_action” I execute the functions and then “https://api.openai.com/v1/threads/$thread_id/runs/$run_id/submit_tool_outputs” at this point the status becomes “queued” and then becomes and remain"in_progress", it’s as if “submit_tool_outputs” had failed.
How can I find out if submit tools output was successful?
I still solved it (but the problem remains of understanding whether submit tools output worked). Now I have another problem.
This is my function:
{
"name": "runSql",
"description": "the function executes a sql command and returns html",
"parameters": {
"type": "object",
"properties": {
"sql": {
"type": "string",
"description": "sql command, example: select * from customers where province = 'bologna'"
}
},
"required": [
"sql"
]
}
}
and this is my output in html (for example:"<table class=\"table\"><thead><tr><th>name</th><th>age</th></tr>< /thead><tbody><tr><td>Dario Grassi</td><td>23</tbody></table>"
)
$toolOutputsArray = [
"tool_outputs" => [
[
"tool_call_id" => $call_id,
"output" => $html
]
]
];
but when I read the messages the html content was transformed by the assistant into text:
name | age |
---|---|
Dario Grassi | 23 |
Even though I wrote: | |
“the function executes a sql command and returns html” |