What does "Submit output" mean in the Playground function call?

The official documentation is really lacking. Confusing at best, misleading at worst.

I’m trying to learn how to do function calls in the Playground, and it says “Submit output”

For the life of me I cannot find ANYTHING that explains what that does. It’s unintuitive and I can’t seem to understand WHAT it’s doing or WHY.

This is awful UX for developers. I get that this is all new and in beta but come on man. Put some more thought into your docs. Not all of us are AI experts, some of us are just hobbyists trying to learn.

Can anyone please help me understand what this is asking?

Screenshot 2023-11-07 093430

1 Like

I discovered there is a subsection of the Assistants/Tools section of the official docs (really poor design)

If I’m understanding correctly, the intent is for you to provide syntax to the bot about how your functions IN your code work, then you take the parameters it gives you, paste them in your code, run it, then give the bot the output.

I’m NOT sure I’m understanding correctly, as it’s INCREDIBLY UNCLEAR what I’m supposed to be doing or how I’m supposed to be using these tools.

3 Likes

The documentation requires a bit of bouncing back and forth to fully absorb.

If you take a look at the API reference you’ll see this function:

import OpenAI from "openai";

const openai = new OpenAI();

async function main() {
  const run = await openai.beta.threads.runs.submitToolOutputs(
    "thread_EdR8UvCDJ035LFEJZMt3AxCd",
    "run_PHLyHQYIQn4F7JrSXslEYWwh",
    {
      tool_outputs: [
        {
          tool_call_id: "call_MbELIQcB72cq35Yzo2MRw5qs",
          output: "28C",
        },
      ],
    }
  );

  console.log(run);
}

https://platform.openai.com/docs/api-reference/runs/submitToolOutputs

So GPT creates the function request and sets the thread/run status to “requires_action”. You take the request, run it through your service, and then return the output back using the above example code.

So yes, you understand correctly.

This is opinion zone, beware: Don’t use the playground. As of now it’s very buggy and probably overloaded. The API is much easier to work with. Harmonizing the assistant with the thread with the message with the files with the services (lol) is actually a lot easier than I expected.

2 Likes

Thanks for the tip about the Assistants Playground. I ran into the ‘Submit output’ and other issues. Don’t think it was ready for release. I would have thought that the playground was a good place to start with assistants but I’m moving on to the API.

2 Likes