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

Better input methods #12

Closed muehlt closed 10 months ago

muehlt commented 10 months ago

Hi,

I know one cannot spend too much time on those hobby projects, but do you find the time to add a simple complication for direct voice input or at least a better method to input spoken text? Currently, you are using a text input, but the best practice would be to have the menu to choose between input methods as in other apps (see documentation). Currently, it's at least 4 clicks to access a new chat and speech input, which is unhandy if used as an assistant, which is the primary purpose since you cannot provide long text for more elaborate tasks.

As a side note, did you have a look at Assistants API? This could be a powerful tool to have on the wrist.

Cheers!

DevEmperor commented 10 months ago

Hey, thanks for drawing attention to this problem. You definitely have a point there, I've already noticed the many clicks and the idea with the complications sounds very promising. I'll make sure that I can implement this in the next few days despite all the current stress. :)

I've heard the news about the Assistants API, but as I said, I haven't had time to find out more about it yet. I'll put that on the top of my to-do list and see if I can integrate something helpful. I'll keep you up to date. :)

muehlt commented 10 months ago

Thanks! Some apps also have separate activities in the app launcher that perform different actions. I think this is because they not only work as complication (App-Shortcut) but also with customizable buttons that some watches have.

I'm also really interested in the Assistants API, as it enables many devices to access a Langchain-like framework. Although I currently don't really have the time to develop, let me know if you want to brainstorm together on something.

DevEmperor commented 10 months ago

Hey, I've been doing some research over the last few days, but unfortunately I haven't found a way to create a complication in Java. (There was an outdated documentation on the Android developer page, but as I said, it should no longer be used). I'm still working on the feature because I think it makes a lot of sense. In the meantime, I have at least added a setting that automatically activates voice recognition when you want to create a new chat. That saves at least one click. :)

Regarding the Assistants API, I don't yet have any concrete ideas on how to integrate it. Do you have any ideas? :)

DevEmperor commented 10 months ago

Hey, I just added the feature. You can now start the app via a complication that opens the input directly. :)

muehlt commented 10 months ago

Thank you! Is the update pending on the Play Store? Otherwise I'll build it real quick.

Sorry for the late response, the last weeks were pretty exhausting. I didn't have much time to look into the Assistants API in detail, but I could imagine that implementing it is mostly a matter of how you send data to the server and also the notion of "Threads" (as OpenAI has unconfusingly called them). We could then build the rest of our systems (adding custom functions such as a Weather API, Zapier, Home Assistant, custom backends or enabling Search, the Code Interpreter, DALL-E) on OpenAI's platform. So I'd add an option to add different Assistants, choose between them and the pure model selection, maybe also have an option to choose an Assistant for each complication used. Since this is quite unhandy to implement in WearOS a default model would also be a good first option to not make the input slow again. What do you think?

DevEmperor commented 10 months ago

I will push the update to the PlayStore today, then it will probably be out by Wednesday at the latest.

I haven't fully learnt about the assistants yet either. That's definitely next on the agenda. Your description sounds good, so I'll work my way through it until I've implemented it. :)

muehlt commented 10 months ago

Works good so far, thank you! I like the toggle to always have voice input directly.

muehlt commented 10 months ago

One enhancement related to the new input method would be to enable TTS conditionally depending on how the input was provided, since most of the time you'll want it to talk back if you talked (e.g. at home) or write back if you wrote (e.g. in the bus). I am not sure, but I assume it is provided how the input was given. Maybe we could change the TTS toggle to a selection of "Always on", "Always off", "On voice input" or something similar, but I'd give this feature a rather low priority, since pressing a message works fine too (although a better feedback could be provided there since the audio takes some time loading).

DevEmperor commented 10 months ago

Hey, I just changed the TTS settings to a list, where you can choose exactly the option that you suggested. :) See 73efddf