DevEmperor / WristAssist

A powerful ChatGPT and DALL-E app for all WearOS devices
https://play.google.com/store/apps/details?id=net.devemperor.wristassist
Apache License 2.0
93 stars 14 forks source link

Support Assistants API Beta #15

Open muehlt opened 10 months ago

muehlt commented 10 months ago

I figured it would be best to create a separate issue for this (from #12 side discussion). Adding support to use a custom OpenAI Assistant instead of using the normal model endpoints might be less work than the complications, depending on the current setup (didn't have a detailed look yet :)). The Java API wrapper seems to already support Threads and Assistants or they are working on it.

DevEmperor commented 10 months ago

Hey again, thanks for the separate thread. I've already checked, and yes, the Java library has been supporting the assistants for a few days now. I'll get round to adding the feature in the next few days. Probably as an extra menu item, so that everything stays a bit more organised (also in the code ;) ).

muehlt commented 10 months ago

Sounds good. However, I just read a few lines of the function calling docs and tools section of the Assistants API and at first glance it looks to work quite differently to the GPT implemented in ChatGPT that can call API endpoints directly. So in this generic use case of an assistant that should work out of the box without custom code in the watch app, it seems we might be stuck with Code Interpreter and Retrieval for now. We could circumvent this with a hacky custom function that makes the API call from the watch, though, but that would be more work. Maybe there is still a way to make the API call from OpenAI's side and I didn't find it. On the other hand, the API call from the watch might also bring advantages (calling local Home Assistant instance) (and a handful of severe security risks :)).