Do While-Loop Necessary for OpenAI Assistants! Feature Request

Hello everybody.

Anyone working with OpenAI APIs should be familiar with the new Assistants API and Endpoints

  • Assistants
  • Threads
  • Messages
  • Runs

Even though we already have a “Message an Assistants” module, it’s missing function calling.

To achieve this we need to use those endpoints to chat with assistants.

However, something common that occurs in this flow is the need to check whether the Thread is complete. For this, a Do-While Loop module would be important to be able to perform an effective call with OpenAI.

I’ve had the need for this function at different times, something that Make should act on.

Example of use:

Do such action until such condition (within these actions) is met then continue the flow.

I’m sure it would benefit many.

1 Like

Is this what you are trying to do? A repeater could work.

3 Likes

Hello Samliew, thanks for your reply.

Theoretically, this would basically be what was shown in the image.
But how is your repeater configured? I imagine it will run X times and this X is not dynamic. So it will repeat X times, even if the status is what you want.

The problem is that today the repeater does not accept parameters from modules that are after it (in the loop). The ideal scenario would be:
If the function status is “Z”, it should stop running, that’s what I mean by While-loop.

The solution I’m using is to create a “commit” route. Works fine, but not elegant.

Thanks for your reply :pray:

1 Like

How is that commit router @netocamarano ? Im looking for the while-loop :frowning:

This is what the “not yet” filter as shown in my screenshot, should be doing.

While the status is not Z, continue.

3 Likes

But can you use a parameter that is after the repeater as a filter?

How does this not yet work? Could you share this flow?

This article here explain how to use commit for this use case.

This is what my while loop looks like.

I use a mix of repeater, filters and the commit module.

Hope it helps :rocket::facepunch:

2 Likes

Thanks a lot!! I’ll take a look, i like it! :slight_smile:

Hello @samliew

Could you share this flow?

Check out the new Assistant API module from Makemarket which automatically handles the loop and it provides functions support as well.

Check this post for more details: Open AI Assistant Module with GPT-4o and functions

I just had a look at this and seems like a good solution.

What’s the Commit route like?
Do you create an error on purpose and default to commit ??

Would love to have a better understanding of that

Hello @samliew

Can you share this Scenário with me?

I want to deep dive on it to understand it better.