Assistants is currently a beta API and allows one to incorporate OpenAI’s LLM functionality within one’s application.1
It takes instructions, and leverages models and tools to respond to a user’s query.
Integrating an Assistant
There are two ways to do so:
- Use the Assistants playground for a low-code approach
- Build it out manually using stack of choice
Manual integration
- Create an assistant, specifying the model, tools and instructions available to the assistant.
- Create a Thread, that holds history of a conversation.
- Convert a user query into a Message and attach it to the Thread.
- Invoke the LLM by creating a run for the given Thread.2
Pros and Cons
This approach abstracts away the complexity of handling the context window. In other words, users don’t have to worry nor do they have control over the context window, which may be more costly in long run since OpenAI will try to find as much context as possible into the window.
Concretely, this is handled by Threads.
Note
A existing assistant’s file association is always reset.