I am in the process of developing my own chatbot using third-party software. In this context, I would like to know if it is possible to communicate directly with my assistant on platform.openai.com via a direct API call? (through a API UI wrapper)
You don’t need a “wrapper”. It is the web page that is the wrapper.
The API endpoints themselves use direct API calls to interact with models. The web UI is just a demonstration playground.
https://platform.openai.com/docs/assistants/overview
However “using third-party software” can have many meanings. Third party software like PyCharm for writing code, third-party chatbot code repository, or third-party software like Candy Crush for iPhone?
You can use the assistant “model” that you have created inside platform.openai.com.
There should be an unique ID below the the name of it - should start with “asst_”
I think you can use it like other models… e.g. like this:
curl https://api.openai.com/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "asst_therestofyourassistantid",
"messages": [{"role": "user", "content": "Hello, how are you?"}]
}'
No you cannot. Assistants requires a multi-turn API interaction of creating threads, placing messages, running, polling, extracting messages. Which the link above will demonstrate.
It uses its own endpoint, not chat completions, and also requires a special header to make the call.
Ah ok, I never even tried to do that. I tried the assistant in playground and thought it is not worth it…
I guess I build something like that then. An AI as a service portal where you can upload files like pdfs or other docs and add them to a RAG and implement a memory functionality…
I mean I can’t just post here and diss assistant and then not show how it is done…
So one should login and create a vector store (which I would build completely different… dynamic weights are needed)
then longterm (information graph in neo4j) and shortterm memory (redis)
then a document pipeline for pdfs and other stuff and an agent network that fills an information graph from the documents data…
and yeah why not add predictions by analysing nodes and edges and compare them with an outcome/report
I guess a week should be enough to build that - or do i miss anything?
Maybe someone wants to work on that with me? Could use someone who does the frontend for that. Maybe react flow would be nice? I’ll have the API ready by wednesday.