Assistants API and control over which functions can be called at the thread level

I’m trying to design a system where my users can have multiple “agents/assistants” (operational sense, not the OpenAI entity).

What I would like my users to do on the app is to create different “helpers” that will help them with specific tasks, which could be a few different functions.

I know that I can create assistants with many tools programmatically, but at the thread level, there doesn’t seem to be a way to limit which tool can be used? (specifically functions that can be called).

I don’t really want to create many assistants for each user, I just want the one assistant (actualy OpenAI entity) for each user with ALL possible tools but somehow “scope down” the functions that can be called.

Is the only way to somehow control this through the instructions/prompt?

1 Like

You can override the functions available to the model at the run level: https://platform.openai.com/docs/api-reference/runs/createRun#runs-createrun-tools

3 Likes

Deleted my previous post because the response from @nikunj answers the question correctly. I wasn’t aware that you could change the tools at the run level.

1 Like

exactly what i was looking for!
thanks a bunch

1 Like