[APP][Pro] OpenAI ChatGPT

Hey Frodeheg,
the error always happens. So far no message has come through although everything is actually always available in the app log. Thank you in any case for the input i will try it with the partial version

I’m really curious to see what else can be realized with chatgpt api :slight_smile:

@frodeheg As a Homey newbie I am interested in the steps to be executed before the webhook:

  • how to let send Google home an email
  • how to get the email message in an advanced flow

Short: how can I give the flow input? What settings or apps do I need?

I don’t understand this question, this doesn’t seem related to OpenAI at all, did you post this message in the wrong forum?

@Amersfoort:
The method I used by sending emails that are processed by a script that forwards it to the webhook is not the most intuitive way of doing it, but it works, If you find a better way to do it then please go ahead. What I did is not a solution that works for everyone as it require you to have access to an email-server that can forward the incoming emails to a script. Now, I use “this service”, which is insanely cheap, if you’re interested. Alternatively, if you make a donation to my github account I can probably create an email-address for you on my server that forwards it to your homey if you don’t want to have a domain of your own, but in general I’m not very happy with this solution as I’m sure there are better ways to do this, I’m just not aware of them at the moment.

For all I know the service at https://ifttt.com/ may be able to send a text string directly from google assistant to a webhook without going through the email. You can see if that free service is sufficient to do the job, I don’t know.

I created a contact in my address-book called “The Oracle” which had an email-address I created on my mail-server. Then I talked to Google Assistant (on the phone, as google nest devices can’t send emails) and said the phrase “Send e-mail to The Oracle”. Google assistant will now ask you to list the content of that email. You can then say the content and say send when Google assistant has confirmed that it understood what you said correctly.

This is where you need to configure the mail server to forward all emails to the webhook that is noted in the OpenAi app. If you get the onnet.no service mentioned above I can help you configure it, but if you have another email service then I am sorry that I cannot help you as I don’t know to configure other services that way.

1 Like

Sorry it was in the wrong thread :joy:
I was sure I posted it somewhere but I couldn’t find it. Now I did - sorry for the confusion :joy:

I have been looking for a while for a way to have an interactive conversation with ChatGPT via a smart speaker. So not on a smartphone, but preferably via the Homey. And so not 1 question, but a conversation with multiple interactions. I now have the Google Nest smart speakers, but am willing to buy another one if that helps. Is this even possible (speech-to-text etc?) and is there a general description of how you could do that (apps, example flows etc)? Any help is welcome!

1 Like

The conversation you have with the OpenAI app is stored and included in the next query so the context is not lost for the next query…

The context is reset when it takes more than 10 minutes (or so… I don’t remember the exact value), so as long as you ask within that time window you should be able to continue the conversation.

Now, for the speech-to-text part, this is how I do it:

Hi! I know it’s been a while since this post, but only now found it. Great work! I’ve set up something similar based on your approach, and it works, but not necessarily via the OpenAI app here - I’ve resorted to using a HomeyScript that requests the OpenAI APK, specifically via the 3.5-1106-turbo model (since I indeed needed the large prompt space, which is not in the 3.5-turbo in the OpenAI Homey-App as far as I understand). Do you have any cool ideas on minimizing promps? I’ve tried some ‘replacement’ methods (i.e. telling openAI that I replaced words A B C with letters X Y Z), but with very limited success. Even with the large prompt, it’s only like 1cent per 3-5 questions, but still.

Hi all, I have this app working fine since november last year. Now Homey suddenly stopped talking since jan 9. I thought I was out of credits, but that was not the case:
afbeelding

“Request failed with status code 404”

Is there something wrong or changed with the app / api? Or do I need to change some settings to get it working again?

@Vincent_Verbon also got 404 messages earlier, described in this link:

He solved it by doing this:

2 Likes

But I still have a credit balance of $4.38


I have never used my free credits. they where already expired when I want to used them. So I added my own credit. It was working fine until jan 9 :thinking:

Is it 404 both when you use GPT 3.5 and 4?

1 Like

I have exactly the same problem. Mine stopped working on January 8th

both GPT 3.5 and 4 give this error:
Request failed with status code 404

1 Like

I just figured out that the error does not occur when I use the “OpenAI” card. If I use the completionBot it does.

Ah, thanks, that is good info. I never used the completionbot myself which is probably why I haven’t seen this issue myself. The completionBot was contributed by @tokreutz.
I’ll try it out and see if I can reproduce it once I get my new homey. (the old one died over a week ago and I have been waiting for a replacement, it’s expected to arrive within a few days)

Hi, this is because OpenAI deprecated their Completion APIs on JAnuary 4th in favor of only supporting the Chat Completion APIs.
The completion bot should probably be deprecated as well as a consequence.
OpenAI Deprecation Summary - API / Deprecations - OpenAI Developer Forum.

There are a few updates on the dropdown for model selection for the bots that needs to be updated to be more up to date and allow latest OpenAI advancements like the gtp-4-turbo-preview model.
I’ll see if I can have a look at that soon™.

1 Like

I have gotten my new Homey now so I tested both the Completionbot and Chatbot and neither worked for me, only the flows for the app itself.

I understand from your comment that it’s fine if I just mark the CompletionBot as deprecated, so that is what I will do…

Regarding the ChatBot, I will check if it’s easy to fix the problem there.

I have a fix ready that i will create a pull request for very soon. Just need to test that all works well :slight_smile:

1 Like

There is a PullRequest out now for the fixes to the bots.

Thanks @tokreutz, I have included the Pull request and done some other fixes as well, there is a new version available for testing now.