Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LLM support #132

Open
Tcache-Nukes opened this issue Jan 1, 2023 · 24 comments
Open

LLM support #132

Tcache-Nukes opened this issue Jan 1, 2023 · 24 comments
Labels
discussion Discussions or plans for the future enhancement New feature or request skill Skill request or bug

Comments

@Tcache-Nukes
Copy link

Can we use opengptchat API to make it smarter than things like siri and google. That would be so cool with intergration of openai.

@Stypox Stypox transferred this issue from Stypox/dicio-skill Jan 1, 2023
@MXC48-zz
Copy link
Contributor

MXC48-zz commented Jan 2, 2023

Some time ago I had found a trick on GitHub which made it possible to "understand" the sentences for voice assistants
It could allow you to free yourself from keywords to have more natural conversations

@Stypox
Copy link
Owner

Stypox commented Jan 3, 2023

I find this suggestion pretty interesting. In Dicio everything's set up to support a fallback skill when a user intent could not be interpreted by any skill. Currently the fallback skill just says "Sorry I could not understand". If there is an API we can integrate into Dicio without asking users to get developer keys in order to access ChatGPT it would be great. I don't know what the policy of ChatGPT is with regards to third party clients.

@Stypox Stypox added enhancement New feature or request discussion Discussions or plans for the future skill Skill request or bug labels Jan 3, 2023
@MXC48-zz
Copy link
Contributor

MXC48-zz commented Jan 3, 2023

I find this suggestion pretty interesting. In Dicio everything's set up to support a fallback skill when a user intent could not be interpreted by any skill. Currently the fallback skill just says "Sorry I could not understand". If there is an API we can integrate into Dicio without asking users to get developer keys in order to access ChatGPT it would be great. I don't know what the policy of ChatGPT is with regards to third party clients.

https://openai.com/api/

@Stypox
Copy link
Owner

Stypox commented Jan 3, 2023

Yeah I know about that, the problem is I would need to obtain a developer key and then share it with everybody (since the app is FOSS), so people would easily steal it.

@BrightDV
Copy link
Contributor

BrightDV commented Jan 3, 2023

Maybe, you can create a file with your secrets which you uncheck from version control or use GitHub's secrets. However the build of F-Droid would not use it but you can specify it or do a separate build.

@MXC48-zz
Copy link
Contributor

MXC48-zz commented Jan 3, 2023

Otherwise there is a free and open source chatbot from which Dicio could draw inspiration to gain discussion skills
https://olivia-ai.org/

@Tcache-Nukes
Copy link
Author

Tcache-Nukes commented Jan 4, 2023

Yeah I know about that, the problem is I would need to obtain a developer key and then share it with everybody (since the app is FOSS), so people would easily steal it.

We can let user handle it and give them options, if they want it put the dev API key of him. That way you dont have to worry about it. So bascally if i want that feature ill add my API Key and get it working.

@Stypox
Copy link
Owner

Stypox commented Jan 11, 2023

However the build of F-Droid would not use it but you can specify it or do a separate build.

I don't want to limit the F-Droid build. I'd rather do what Tcache-Nukes said.

@Tcache-Nukes
Copy link
Author

However the build of F-Droid would not use it but you can specify it or do a separate build.

I don't want to limit the F-Droid build. I'd rather do what Tcache-Nukes said.

Sounds Good, i will look foward to test it. If you are gonna do that.

@MXC48
Copy link
Contributor

MXC48 commented Feb 9, 2023

Otherwise there is another option to counterbalance open GPT which wants to be free free and open source, it's called open assistant it's free open source and it's under construction currently it requires data but it can be a good idea to do later
https://github.com/LAION-AI/Open-Assistant

@agsoto
Copy link

agsoto commented Feb 19, 2023

Yeah I know about that, the problem is I would need to obtain a developer key and then share it with everybody (since the app is FOSS), so people would easily steal it.

What about allowing to the user to set the ChatGPT API token?, so everybody uses it's own account info.

@Vintic
Copy link

Vintic commented Mar 22, 2023

Hi,
Please take a look at https://github.com/antimatter15/alpaca.cpp
Would be cool to add support of it

@jswetzen
Copy link

I had an experiment with ChatGPT today, and used a starting prompt that gets it into a mode that I would find useful.
Prompt

You will act as an API for a digital assistant, responding only with a JSON body containing two parameters: text and intent. The text parameter is for the English language response, and the intent is for an optional Android intent if the user requests something that can be sent to an android phone. The available intents are:

Setting a timer:
{
  "action": "android.intent.action.SET_TIMER",
  "extras": "android.intent.extra.alarm.LENGTH:{seconds},android.intent.extra.alarm.SKIP_UI:true"
}
where {seconds} shall be replaced with the requested time, converted to seconds.

Setting an alarm of some kind:
{
  "action": "android.intent.action.SET_ALARM",
  "extras": "android.intent.extra.alarm.HOUR:{hour},android.intent.extra.alarm.MINUTE:{minute},android.intent.extra.alarm.SKIP_UI:true"
}
where {hour} and {minute} shall be replaced with the hour and minute requested.

Begin. Your first request is "set a timer for five minutes"

Reply

{
"text": "Setting a timer for 5 minutes.",
"intent": {
"action": "android.intent.action.SET_TIMER",
"extras": "android.intent.extra.alarm.LENGTH:300,android.intent.extra.alarm.SKIP_UI:true"
}
}

Of course, I came to Dicio for the open source, so using the ChatGPT API would go against that. Interesting nonetheless.

@Stypox
Copy link
Owner

Stypox commented Apr 20, 2023

Yeah I also thought it would work with those kind of prompts

@jswetzen
Copy link

jswetzen commented Apr 21, 2023

Open Assistant does well too!
Reply (same prompt)

{"text":"Okay, I have set a timer for 5 minutes","intent":{"action":"android.intent.action.SET_TIMER",
"extras":"android.intent.extra.alarm.LENGTH:300,"android.intent.extra.alarm.SKIP_UI:true"}}

It's not perfect though, spot the error given the prompt "Wake me up at five fifteen tomorrow":

{"text":"I have scheduled an alarm for you to wake up at 5:15 AM tomorrow.",
"intent":{"action":"android.intent.action.SET_ALARM",
"extras":"android.intent.extra.alarm.HOUR:6,"android.intent.extra.alarm.MINUTE:15,"android.intent.extra.alarm.SKIP_UI:true"}}

@pixincreate
Copy link

pixincreate commented May 10, 2023

With the developments that has happened in the last 3 - 4 weeks, I believe, we can make use of privateGPT which is based on LangChainAI or directly use GPT4All or Huggingface.co/chat and etc., This would greatly improve usage.

Forgot to mention this: https://open-assistant.io

@RokeJulianLockhart

This comment was marked as resolved.

@paolo-caroni
Copy link

I would like very much that, but gpt is closed source and honestly I would prefer an open alternative. So thanks to @pixincreate, also I have read on FAQ that open assistant can run on locale, so no problem for privacy.

@Stypox Stypox changed the title Opengptchat support LLM support Aug 21, 2024
@Stypox Stypox mentioned this issue Aug 21, 2024
@lmaddox
Copy link

lmaddox commented Oct 9, 2024

It would be really useful to have an easy way to configure it to fallback to a chatgpt-compatible LLM, specifically localai. Multiple fallbacks would be even better. Still looking for a way to set everything up to use the llama-index vectorstores

@fraschm1998
Copy link

why not just have a setting for people to set an openai compatible endpoint with an api token? Or use something like litellm. Will allow for people to use their own selfhosted LLM servers or public ones.

@jswetzen
Copy link

jswetzen commented Jan 6, 2025 via email

@Stypox
Copy link
Owner

Stypox commented Jan 6, 2025

This app I built during an internship last year runs llama.cpp on-device, and a fine-tuned phi-2 model turned out to be enough to build an assistant. Unfortunately it is slow though. https://gitlab.e.foundation/e/os/open-source-llm-assistant

@phirestalker
Copy link

I also want to replace google with something local and open-source. I run a home-assistant server, and I was going to use their home-llm plugin to get the functionality. That is great, but I realized that it would not be able to forward requests back to the phone such as open some app, or set a timer.

At this point, Dicio appears to be the most promising solution, but I'd like to explore the possibility of having a compact LLM (Large Language Model) that can handle intents locally on-device. This would allow us to offload some work from individual skills and create more streamlined functionality without needing a separate skill for each minor task.

@Stypox Stypox marked this as a duplicate of #273 Feb 26, 2025
@Vintic
Copy link

Vintic commented Mar 19, 2025

Can we just add new skill like "ASK GPT {your qustion}"?
Same skill is used on ios

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Discussions or plans for the future enhancement New feature or request skill Skill request or bug
Projects
None yet
Development

No branches or pull requests