MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    ChatGpt intergration

    Scheduled Pinned Locked Moved Unsolved Requests
    59 Posts 7 Posters 25.4k Views 8 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S Offline
      SILLEN 0
      last edited by

      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:

      d16ed205-6f31-4b11-99b8-099050577728-image.png

      if anyone is intrested in this here is the openai api documentation link: https://openai.com/api/

      S N 2 Replies Last reply Reply Quote 1
      • S Offline
        sdetweil @SILLEN 0
        last edited by sdetweil

        @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…

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        S 1 Reply Last reply Reply Quote 0
        • S Offline
          SILLEN 0 @sdetweil
          last edited by

          @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?

          S 2 Replies Last reply Reply Quote 0
          • S Offline
            sdetweil @SILLEN 0
            last edited by

            @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.

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            1 Reply Last reply Reply Quote 0
            • S Offline
              sdetweil @SILLEN 0
              last edited by

              @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).

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              S 1 Reply Last reply Reply Quote 0
              • S Offline
                SILLEN 0 @sdetweil
                last edited by

                @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.

                S 1 Reply Last reply Reply Quote 0
                • S Offline
                  sdetweil @SILLEN 0
                  last edited by

                  @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 result

                  or do it all in code…

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  S 1 Reply Last reply Reply Quote 0
                  • S Offline
                    SILLEN 0 @sdetweil
                    last edited by

                    @sdetweil if for a start i use this super simple code:
                    import openai

                    openai.Completion.create(
                    engine=“davinci”,
                    prompt=“Make a list of astronomical observatories:”
                    )

                    how would i make the answer show up on the magicmirror

                    S 1 Reply Last reply Reply Quote 0
                    • S Offline
                      sdetweil @SILLEN 0
                      last edited by sdetweil

                      @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)

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      M 1 Reply Last reply Reply Quote 0
                      • M Offline
                        MMRIZE @sdetweil
                        last edited by

                        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.

                        1 Reply Last reply Reply Quote 1
                        • 1
                        • 2
                        • 3
                        • 4
                        • 5
                        • 6
                        • 1 / 6
                        • First post
                          Last post
                        Enjoying MagicMirror? Please consider a donation!
                        MagicMirror created by Michael Teeuw.
                        Forum managed by Sam, technical setup by Karsten.
                        This forum is using NodeBB as its core | Contributors
                        Contact | Privacy Policy