GPT3 fallback skill?

I was thinking that a fallback skill using OpenAI’s GPT3 would be ideal for edge cases when Mycroft doesn’t have a response. The AIML chatbot is great, but GPT3 blows it out of the water with open-ended questions like “What things should I consider when buying a house?”

Is anyone working on a project like this?

1 Like

+1 Not working on that, but interested.

Does that not go against the idea of an offline voice assistant?

I guess you could as other will likely use websearch and things like spotify so the idea of offline for many is a hindrance but gpt-3 is an online api…

GitHub - EleutherAI/gpt-neox: An implementation of model parallel autoregressive transformers on GPUs, based on the DeepSpeed library. greatly reduces the original jaw dropping requirements to run gpt-3 but its still fairly hefty.

1 Like

Yes, you are correct in that it would not be useful for offline use, since it’s just an online api. GPT-J or GPT-NeoX are potential offline alternatives if you have the hardware.

YouTuber Zach Freedman has done something like this with GPT-NeoX, but he didn’t post any code. Meet Christopher, the EIGHT-GPU Robot Quagsire - YouTube

Software used:

Maybe something like

Is a better option for resource constrained devices offline

shared in a similar thread, but i started this

2 Likes

here it is GitHub - tomascardososerra/fallback-chatgpt3-skill

Nice @Tomascardososerra Tomas! I’d love to see your skill in action, but when I install your skill I get the following ‘error’.

mycroft-msm install https://github.com/tomascardososerra/fallback-chatgpt3-skill
INFO - building SkillEntry objects for all skills
INFO - Downloading skill: https://github.com/tomascardososerra/fallback-chatgpt3-skill
INFO - Reading from manifest.yml
WARNING - Invalid value type manifest.yml for fallback-chatgpt3-skill: <class 'list'>
INFO - Problem performing action. Restoring skill to previous state...
INFO - invalidating skills cache
SkillRequirementsException: 'list' object has no attribute 'get'

Looking at the manifest.yml, I see a file with commented stand-in text except for the line about ‘requests’. Is that maybe the problem?

I got the skill working now by installing it by hand (and I’ve edited the manifest.yml just in case).
Now I get a Fallback error in the cli-client after asking a fact like “who is the king of The Netherlands”. This is the only info

 FallbackChatgpt | error in ChatGPT fallback request

Any idea how to get it working? Thanks.

Hi Timon, please try the latest version I’ve just commited. I had to fine tune that initial version

1 Like

It works brilliantly now! Thanks!

Glad to hear that. Sometimes I’ve noticed what seems to be a timeout in a way Mycroft responds first “I don’t know what that means” and then GPT provides the answer. I’m thinking about adding timeout parameter but yes, it mostly works as it’s now

Does this skill work on a Mark2 running Neon?

True, I have that experience too. And sometimes the ChatGPT fallback is activated in other skills, when they prompt for an answer.

Not sure, if you can install it manually I guess it will

How you did that I am getting same error
mycroft-msm install GitHub - tomascardososerra/fallback-chatgpt3-skill
INFO - building SkillEntry objects for all skills
INFO - Downloading skill: GitHub - tomascardososerra/fallback-chatgpt3-skill
INFO - Reading from manifest.yml
WARNING - Invalid value type manifest.yml for fallback-chatgpt3-skill: <class ‘list’>
INFO - Problem performing action. Restoring skill to previous state…
INFO - invalidating skills cache
SkillRequirementsException: ‘list’ object has no attribute ‘get’

@Tomascardososerra did an update and it worked after that.
I’ve used the same command as you did:

mycroft-msm install https://github.com/tomascardososerra/fallback-chatgpt3-skill

Please supply an example settings.json file. I’m new to all this but am learning fast thanks to the forum.

Hi. I don’t know what you mean by “settings.json” file because it doesn’t add something to the config file or something. Do you have the ‘requests’ dependency installed? Maybe that’s the solution?

pip install requests

I am running Mycroft Classic Core sandbox image on the Mark II btw.

Sorry, Im a bit confused. In just installs like a skill? Im using picroft on a Rpi4.