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
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.
I am going to use on a AI powered counselor, just providing information and guidance.
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.
Agreed. I’d consider Assistants a framework, while Completion models are a tool
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.
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?
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.