enricoros / big-AGI

Generative AI suite powered by state-of-the-art models and providing advanced AI/AGI functions. It features AI personas, AGI functions, multi-model chats, text-to-image, voice, response streaming, code highlighting and execution, PDF import, presets for developers, much more. Deploy on-prem or in the cloud.
https://big-agi.com
MIT License
5.21k stars 1.18k forks source link

Integrate OpenAI Assistants into Personas #261

Open RMGhub opened 9 months ago

RMGhub commented 9 months ago

Why It would be great if we could link our personas to assistant IDs in the openai developer section. Not sure if this is available already.

Concise description Modify personas. Link persona to assistant ID. Chat with assistants through the interface.

Requirements Just functionality really!

enricoros commented 9 months ago

Architecturally this is not the best for big-AGI. The App is designed for abstracting different LLM Vendors and providing different functionality.

The Assistant API in OpenAI is not optimal at the moment: no streaming of response, no editing of past messages, history is stored in the OpenAI servers rather than the User PC, etc.

As such, I'll add this to the roadmap, but won't be a task I prioritize: would take ~1 month of development for an implementation that clashes with abstractions.

Alternatives:

enricoros commented 9 months ago

Feel free to expand more on the request in case I did not interpret this correctly.

RMGhub commented 9 months ago

No thats fine. I wasn't aware of the constraints of the Assistants API.

agdfoster commented 8 months ago

I've been fiddling with an implementation of the assistants API which wraps it essentially back into the chat completions format, as I have a feeling they'll implement more of the features they'll add to chatGPT there first. (e.g., before the big update a couple months ago chatGPT was so much better at reasoning through complex topics in a thread than the API was).

Quick fix is essentially just to create a new assistant on each edit but I have a feeling wiping the message history of the old one would be faster. You can initialise an assistant with any message history.

Their code executor is my main motivation, each cell is like a jupyter notebook cell so you can have it iterate without redefining every method each time.

enricoros commented 8 months ago

@agdfoster good feedback. can you sketch a quick architecture of how you are implementing it?

I see the benefit that you mention, but I'm worried about the vendor lock-in mostly. I don't dislike OpenAI, but always worried about becoming too dependent on 1 supplier. Having data in your control and interchangeable model vendors will become more and more an advantage of big-AGI.

However, if the code can be isolated enough and the UI integration is seamless (e.g. maybe Assistants are appended to the models in the Model Dropdown), then I can also help with this. If you can sketch an initial architecture (I love excalidraw for this), then we can think at how to "abstract" it enough to make it a superset of openai capabilities.