Read the statement by Michael Teeuw here.
ChatGpt intergration
-
hey everyone. i think most of us have heard of ChatGpt the new revoulutionary ai engine available for free. however the chatgpt api doesnt seem too be free but in my opinion i dont mind. so what would be awsome is to make chatgpt like another voice module but instead of using google assistant or alexa it would use the chatgpt api to listen for input and then display the answer on the screen. this api is crazy i even got it too make a simple magicmirror module for me. i asked chatgpt on how it would create this module and here is its response:
if anyone is intrested in this here is the openai api documentation link: https://openai.com/api/
-
@SILLEN-0 that is create a module to send text to the API and get responses.
no voice
it doesn’t say node,_helper, but dependencies don’t work in the web side.
so, nothing really useful here.
u can use my working sample module,
https://github.com/sdetweil/SampleModule
add their API and get this far in less than an hour.no voice… THAT is the hard part…
-
@sdetweil yea i got no idea about coding but coudnt you make it so that you use a existing voice to text module and then put the text results as text in the api?
-
@SILLEN-0 sure, there are 2.
the pocketSphinx Carnegie Mellon all local , which for me is about 60% accurate, see MMM-Voice
and then there is the hosted language model
goggle and others, with some filter front end to NOT analyze EVERY sound, like
snowboy(deprecated)this latter is really important, as mm is intended to be keyboard/mouse less.
basically the Ga/Alexa hotword model
this would be easy with the smart-mirror mirror platform which I support too. as it is voice oriented, and does all the work to present the text to the plugin… SM uses snowboy.
-
@SILLEN-0 AND presentation is in the browser while the API is in the helper, so you have to design and implement the exchange process and the UI side… a module is just one little component.
mm is a user compostable information panel, w independent providers (modules).
-
@sdetweil ok but if i wanted to start with just a preconfigured text without voice input. how would i do that the simplest way. i have little too no coding and i could probobally make a script for displaying an answer in a command line but i have no idea on how to display anything on the magicmirror.
-
@SILLEN-0 simple is in the eye of the viewer…
you will have to write some code, some script or both
script could prompt, call code, and display,
code takes input from prompt and calls API, returns resultor do it all in code…
-
@sdetweil if for a start i use this super simple code:
import openaiopenai.Completion.create(
engine=“davinci”,
prompt=“Make a list of astronomical observatories:”
)how would i make the answer show up on the magicmirror
-
@SILLEN-0 see my samplemodule
it sends text from helper to browser side and calls the mm functions to get content presented
for MagicMirror, a module creates a small segment of html content (in a div), and gives that to mm when it asks (getDom() function) and mm places the content in the module’s defined position in the predefined web page (see index.html and main.css for the structure)
-
There are several TTS modules, so output would not be a big issue.(And text-only-displaying would not be the issue at all.)
The real issue might be how to ask/input.
One idea is using telegramBot. Hmmm… interesting.