What the difference between open ai assistant api and chat api

I am planning to use open ai api in my project, but i didn’t know which one should I use gpt assistant api or chat api

3 Likes

Assistants overview - OpenAI API
Text generation - OpenAI API

Here’s some of the API documentation I recommend reading.

If you could share much more detail about what your project entails we could help better.

1 Like

I am going to use on a AI powered counselor, just providing information and guidance.

1 Like

I have spent considerable time with both APIs. My observation is that the Assistants API is intended for a class of problems that are more complex than what is normally done through a Chat API. Problems that are best solved through a collaboration of specialized Assistants . It’s one thing to ask GPT to write a chapter in a book, or a code fragment for a program, it’s another thing to ask GPT to write a book or a software product. Chat Completion APIs are for the former, Assistants API are for the latter.

9 Likes

Agreed. I’d consider Assistants a framework, while Completion models are a tool

3 Likes

Yes, my experience as well. If it involves more complex problems/applications, the Assistant API may be the better fit. For just text generation, QA, the Chat API might suffice.

1 Like

How about performance or limitation of the two APIs? If you want to do the same task, for example, entity recognition, on millions of documents, do you expect to see a difference between the two?

1 Like

The Assistants API provides File Search (tool) capabilities. File Search parses and chunks your documents, creates and stores the embeddings, and use both vector and keyword search to retrieve relevant content to answer user queries. The Chat completion API does not.

My opinion is actually opposite to most other people. Assistants API in my opinion is for when you want to have a range of different functionality but without having to customise or tweak anything too much.

For example, you can add documents and have them automatically indexed in order to do embedding based retrievals.

However, the Chat API is more powerful if you are willing to implement some of the functionality yourself (or by using libraries like Langchain). You will have alot more control over the whole process. For instance, you can control how you want your documents to be chunked and the chunk length for the embeddings part, and so on.

1 Like