MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord

    MMM-OpenAI

    Productivity
    4
    24
    772
    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.
    • M
      MMRIZE last edited by MMRIZE

      MMM-OpenAI

      MagicMirror module for requesting OpenAI’s API

      DISCLAIMERS :

      1. This is not a ChatGPT module; (OpenAI has not released ChatGPT API yet.). This module uses OpenAI’s API for text completion and image generation.
      2. I will not implement any voice-related features into this module directly, but if you want, you can relay those kinds of modules for your own purpose. (This module has much preparation to cooperate with other modules.)

      Screenshot

      Text Completion

      Image generation

      Features

      • Request text completions or image generation from OpenAI with detailed options
      • Activation through TelegramBot (default behaviour)
      • Activation with notification (customizable - For developing a new module or For using the current module without modification, either possible.)
      • Customizable post-process (You might not need to build an external module to handle the response for your own purpose)

      For more details

      https://github.com/MMRIZE/MMM-OpenAI

      1 Reply Last reply Reply Quote 1
      • M
        MMRIZE last edited by

        1.1.0 (2023-03-02)

        Added : Chat API

        Chat

        1 Reply Last reply Reply Quote 1
        • R
          Rags last edited by

          Great. Installed it and it is up and running with absolutely no effort. Thanks for this module. However, i am facing an issue of an error message “Something is wrong see the log”. So this error pops up randomly when i initiate a /chatai or a /txtai or /imgai, and i am unsure why. Is the heavy traffic of ChatGPT the reason. Also where do i check the logs.?
          Thanks

          M 2 Replies Last reply Reply Quote 0
          • Referenced by  S sdetweil 
          • M
            MMRIZE @Rags last edited by

            @Rags
            I’ll update the modules with more kind error messages in 1-2days. Plz wait a little

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

              1.2.0 (2022-03-06)

              • ADDED : More kind error message (in the terminal console, the display, telegram, and the dev-console)
              • ADDED : Token usage on success in TEXT and CHAT.
              • FIXED : Reducing default max_token for chat. (Too many token limit may cause the error unexpected)

              120_1

              120_2

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

                @Rags
                I found it was token usage issue. I think I fixed it with the new update.

                R 1 Reply Last reply Reply Quote 0
                • R
                  Rags @MMRIZE last edited by Rags

                  @MMRIZE @MMRIZE
                  Thanks for the update. Yes now it works fine. I am not getting "something is wrong’ messages, but prompts about the token lengths whenever they exceed.
                  Thanks. I hope there will be voice integration soon.

                  M R 2 Replies Last reply Reply Quote 0
                  • M
                    MMRIZE @Rags last edited by

                    @Rags
                    I will not implement Voice-feature into this module directly by myself.
                    But I believe other existing voice-related modules could be used together already.

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

                      @Rags
                      Speech example: Conjunction with MMM-GoogleTTS, now it can speak.

                      https://youtu.be/daWuSfQc5Ns

                      postProcessing: (helper, resp) => {
                        let choice = resp.response?.choices[0]
                        if (choice) helper.sendNotification('TTS_SAY', choice?.message?.content ?? choice?.text)
                      }
                      
                      S R 2 Replies Last reply Reply Quote 0
                      • S
                        sdmydbr9 @MMRIZE last edited by

                        @MMRIZE a similar idea has crossed my mind. Using a Hotword detector like the one used in google assignment module to activate a listener for voice and ask for voice input and then using the input provided, get the transcript of the audio using the whisper api or something similar to get the transcript… pass on the transcript as a content in the OPENAI_REQUEST notification and then SHOW_ALERT or just read it out loud using the MMM-GoogleTTS. Just a rough sketch. I’m sure someone out here will come up with more convincing and better ideas.

                        S M 2 Replies Last reply Reply Quote 0
                        • 1
                        • 2
                        • 3
                        • 1 / 3
                        • First post
                          Last post
                        Enjoying MagicMirror? Please consider a donation!
                        MagicMirror created by Michael Teeuw.
                        Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
                        This forum is using NodeBB as its core | Contributors
                        Contact | Privacy Policy