• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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
57 Posts 5 Posters 21.4k Views 6 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 @sdetweil
    last edited by Jan 29, 2023, 12:49 AM

    @sdetweil hey. I’m sorry for not being able too answer but i have other stuff going on and a math test coming up. The text is sent over as a string and the module does recieved the string and gets a response from the API it is after that the issue is caused. I Google the error and people say that there is probably a loop in the code somewhere. I will try with the debug module when i have time. I really want too get this too work.

    S 1 Reply Last reply Jan 30, 2023, 12:05 AM Reply Quote 0
    • S Away
      sdetweil @SILLEN 0
      last edited by Jan 30, 2023, 12:05 AM

      @SILLEN-0 the data back from the api looks like this

          status: 200,
          statusText: 'OK',
          headers: {
            date: 'Sun, 29 Jan 2023 23:56:49 GMT',
            'content-type': 'application/json',
            'content-length': '343',
            connection: 'close',
            'access-control-allow-origin': '*',
            'cache-control': 'no-cache, must-revalidate',
            'openai-model': 'text-davinci-003',
            'openai-organization': 'user-ieyrbalt3azhd9sd82splktg',
            'openai-processing-ms': '2790',
            'openai-version': '2020-10-01',
            'strict-transport-security': 'max-age=15724800; includeSubDomains',
            'x-request-id': 'd341b29147db89ee20886107e22b41a4'
          },
          config: {
            transitional: [Object],
            adapter: [Function: httpAdapter],
            transformRequest: [Array],
            transformResponse: [Array],
            timeout: 0,
            xsrfCookieName: 'XSRF-TOKEN',
            xsrfHeaderName: 'X-XSRF-TOKEN',
            maxContentLength: -1,
            maxBodyLength: -1,
            validateStatus: [Function: validateStatus],
            headers: [Object],
            method: 'post',
            data: '{"model":"text-davinci-003","prompt":"What is the weather like today?","temperature":0.7}',
            url: 'https://api.openai.com/v1/completions'
          },
          request: ClientRequest {
            _events: [Object: null prototype],
            _eventsCount: 7,
            _maxListeners: undefined,
            outputData: [],
            outputSize: 0,
            writable: true,
            destroyed: false,
            _last: true,
            chunkedEncoding: false,
            shouldKeepAlive: false,
            maxRequestsOnConnectionReached: false,
            _defaultKeepAlive: true,
            useChunkedEncodingByDefault: true,
            sendDate: false,
            _removedConnection: false,
            _removedContLen: false,
            _removedTE: false,
            _contentLength: null,
            _hasBody: true,
            _trailer: '',
            finished: true,
            _headerSent: true,
            _closed: false,
            socket: [TLSSocket],
            _header: 'POST /v1/completions HTTP/1.1\r\n' +
              'Accept: application/json, text/plain, */*\r\n' +
              'Content-Type: application/json\r\n' +
              'User-Agent: OpenAI/NodeJS/3.1.0\r\n' +
              'Authorization: Bearer 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\r\n' +
              'Content-Length: 89\r\n' +
              'Host: api.openai.com\r\n' +
              'Connection: close\r\n' +
              '\r\n',
            _keepAliveTimeout: 0,
            _onPendingData: [Function: nop],
            agent: [Agent],
            socketPath: undefined,
            method: 'POST',
            maxHeaderSize: undefined,
            insecureHTTPParser: undefined,
            path: '/v1/completions',
            _ended: true,
            res: [IncomingMessage],
            aborted: false,
            timeoutCb: null,
            upgradeOrConnect: false,
            parser: null,
            maxHeadersCount: null,
            reusedSocket: false,
            host: 'api.openai.com',
            protocol: 'https:',
            _redirectable: [Writable],
            [Symbol(kCapture)]: false,
            [Symbol(kNeedDrain)]: false,
            [Symbol(corked)]: 0,
            [Symbol(kOutHeaders)]: [Object: null prototype],
            [Symbol(kUniqueHeaders)]: null
          },
          data: {
            id: 'cmpl-6eBpQkPEmW4z1PoxRTTprs8Lhoqn4',
            object: 'text_completion',
            created: 1675036608,
            model: 'text-davinci-003',
            choices: [Array],
            usage: [Object]
          }
        }
      
        answer: {
          status: 200,
          statusText: 'OK',
          headers: {
            date: 'Sun, 29 Jan 2023 23:56:49 GMT',
            'content-type': 'application/json',
            'content-length': '343',
            connection: 'close',
            'access-control-allow-origin': '*',
            'cache-control': 'no-cache, must-revalidate',
            'openai-model': 'text-davinci-003',
            'openai-organization': 'user-ieyrbalt3azhd9sd82splktg',
            'openai-processing-ms': '2790',
            'openai-version': '2020-10-01',
            'strict-transport-security': 'max-age=15724800; includeSubDomains',
            'x-request-id': 'd341b29147db89ee20886107e22b41a4'
          },
          config: {
            transitional: [Object],
            adapter: [Function: httpAdapter],
            transformRequest: [Array],
            transformResponse: [Array],
            timeout: 0,
            xsrfCookieName: 'XSRF-TOKEN',
            xsrfHeaderName: 'X-XSRF-TOKEN',
            maxContentLength: -1,
            maxBodyLength: -1,
            validateStatus: [Function: validateStatus],
            headers: [Object],
            method: 'post',
            data: '{"model":"text-davinci-003","prompt":"What is the weather like today?","temperature":0.7}',
            url: 'https://api.openai.com/v1/completions'
          },
          request: ClientRequest {
            _events: [Object: null prototype],
            _eventsCount: 7,
            _maxListeners: undefined,
            outputData: [],
            outputSize: 0,
            writable: true,
            destroyed: false,
            _last: true,
            chunkedEncoding: false,
            shouldKeepAlive: false,
            maxRequestsOnConnectionReached: false,
            _defaultKeepAlive: true,
            useChunkedEncodingByDefault: true,
            sendDate: false,
            _removedConnection: false,
            _removedContLen: false,
            _removedTE: false,
            _contentLength: null,
            _hasBody: true,
            _trailer: '',
            finished: true,
            _headerSent: true,
            _closed: false,
            socket: [TLSSocket],
            _header: 'POST /v1/completions HTTP/1.1\r\n' +
              'Accept: application/json, text/plain, */*\r\n' +
              'Content-Type: application/json\r\n' +
              'User-Agent: OpenAI/NodeJS/3.1.0\r\n' +
              'Authorization: Bearer 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\r\n' +
              'Content-Length: 89\r\n' +
              'Host: api.openai.com\r\n' +
              'Connection: close\r\n' +
              '\r\n',
            _keepAliveTimeout: 0,
            _onPendingData: [Function: nop],
            agent: [Agent],
            socketPath: undefined,
            method: 'POST',
            maxHeaderSize: undefined,
            insecureHTTPParser: undefined,
            path: '/v1/completions',
            _ended: true,
            res: [IncomingMessage],
            aborted: false,
            timeoutCb: null,
            upgradeOrConnect: false,
            parser: null,
            maxHeadersCount: null,
            reusedSocket: false,
            host: 'api.openai.com',
            protocol: 'https:',
            _redirectable: [Writable],
            [Symbol(kCapture)]: false,
            [Symbol(kNeedDrain)]: false,
            [Symbol(corked)]: 0,
            [Symbol(kOutHeaders)]: [Object: null prototype],
            [Symbol(kUniqueHeaders)]: null
          },
          data: {
            id: 'cmpl-6eBpQkPEmW4z1PoxRTTprs8Lhoqn4',
            object: 'text_completion',
            created: 1675036608,
            model: 'text-davinci-003',
            choices: [Array],
            usage: [Object]
          }
        }
      

      i don’t see the text of the answer

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      P S 3 Replies Last reply Feb 20, 2023, 1:57 AM Reply Quote 0
      • P Offline
        PraiseU Module Developer @sdetweil
        last edited by Feb 20, 2023, 1:57 AM

        @sdetweil Hey any updates on this?

        1 Reply Last reply Reply Quote 0
        • P Offline
          PraiseU Module Developer @sdetweil
          last edited by Feb 20, 2023, 1:59 AM

          @sdetweil Do you have any updates regarding the speech capture process?

          S 1 Reply Last reply Feb 20, 2023, 2:32 AM Reply Quote 0
          • S Away
            sdetweil @PraiseU
            last edited by Feb 20, 2023, 2:32 AM

            @PraiseU I wasn’t working on any speech capture integration.

            I outlined the possibilities

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            P 1 Reply Last reply Feb 20, 2023, 2:42 AM Reply Quote 0
            • P Offline
              PraiseU Module Developer @sdetweil
              last edited by Feb 20, 2023, 2:42 AM

              @sdetweil Oh okay! I found this Module https://github.com/TheStigh/MMM-VoiceCommander. Do you think it can be useful? or does it still have the problem with accuracy?

              S 1 Reply Last reply Feb 20, 2023, 2:48 AM Reply Quote 0
              • S Away
                sdetweil @PraiseU
                last edited by Feb 20, 2023, 2:48 AM

                @PraiseU said in ChatGpt intergration:

                @sdetweil Oh okay! I found this Module https://github.com/TheStigh/MMM-VoiceCommander. Do you think it can be useful? or does it still have the problem with accuracy?

                yes, it is built on mmm-voice

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                1 Reply Last reply Reply Quote 0
                • P Offline
                  PraiseU Module Developer @sdetweil
                  last edited by Feb 20, 2023, 2:53 AM

                  @sdetweil Can you shed some light on what you mean by this “this is why the MMM-GoogleAssistant provides mechanisms (recipe) to use the captured text for non- google uses” And how can i approach this? Thanks a lot

                  S 1 Reply Last reply Feb 20, 2023, 3:06 AM Reply Quote 0
                  • S Away
                    sdetweil @PraiseU
                    last edited by Feb 20, 2023, 3:06 AM

                    @PraiseU it’s exactly what it says.

                    GoogleAssistant collects text from voice.
                    but many voice commands are not directed at Google itself. ($search, play, turn on/off lights…)

                    so, if you write a recipe you can direct the text to other purposes

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    P 1 Reply Last reply Feb 20, 2023, 3:10 AM Reply Quote 0
                    • P Offline
                      PraiseU Module Developer @sdetweil
                      last edited by Feb 20, 2023, 3:10 AM

                      @sdetweil Oh Okay so If I was to say “GPT Explain software engineering” It will get the text and I can forward it to the module it needs to go to? Do you ahave an examples that can help?

                      S 1 Reply Last reply Feb 20, 2023, 3:11 AM Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 4
                      • 5
                      • 6
                      • 5 / 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