1st use of the Assistants API, I figured out threads and runs and all of that. 
My Assistant reads a file and does a Function.
But when I do it in the Playground, the AI pauses on the function and I have to type âtrueâ and click âsubmitâ before it does itâs thing.
I donât think Iâm doing the equivalent of that in my API code, which would explain why it starts the run, and then just times out.
I have the feeling I just have to set something to âtrueâ what am I missing?
AHA TIA
That is for submitting the tool outputs since there is no way that you can add your own tool handler in the playground.
Thanks!
my Q is how do I " add your own tool handler" in API code?
my API code just times out, it uploads the file, starts the thread/run, but I get zero token in or out and nothing happens.
when you do polling for the run status, check when the status becomes requires_action
and required_action.type is submit_tool_outputs
then that is where youâll call submitToolOutputs and continue the run.
in the playground, show the logs panel and check the output and youâll see what is happening when you get up to requires_action
.
is there a way to add that to my âCreate thread and runâ commands?
this is really a 1-shot thing
Not sure what do you mean. How do you get the response from the Assistant? It should be in the same place.
well thank you very much 
Iâll go have GPT read the docs again when it comes to requires_action
and weâll take it from there.
(that does sound like âwhat I was missingâ)
Just a follow up. That was it.
I have to âsubmit a tool outputâ of "true " to trigger the function, even though the AI doesnât need any additional information.
(the competions API was a lot simpler)