1st use of Assistants API, what am I missing?

1st use of the Assistants API, I figured out threads and runs and all of that. :slight_smile:

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 :slight_smile:

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)