Giter Club home page Giter Club logo

Comments (9)

zsodur avatar zsodur commented on August 28, 2024

Please refresh the chatgpt webpage, then make a new request and check the browser console.

from chatgpt-api-by-browser-script.

abyrvalg666 avatar abyrvalg666 commented on August 28, 2024

Somehow, the script seems to be working now, partially. The NodeJS console says:
Browser connected, can process requests now.
I can connect to WebSocket at :8765 and if I POST http request, I am getting a response via WebSocket, but nothing comes via http.

At websocket when I post a test request like on your page, I am getting:

{
"text": "\n Now you must play the role of system and answer the user.\n\n [{"role":"system","content":"You are a helpful assistant."},{"role":"user","content":"Who are you?"}]\n\n Your answer:\n ",
"model": "gpt-4",
"newChat": true
}

So at least when I POST, the thing gets my input, however, the REST client is not getting anything back, but WS does... I am puzzled! :)

PS the Chrome JS console doesn't show anything at all.
Thank you!

from chatgpt-api-by-browser-script.

zsodur avatar zsodur commented on August 28, 2024

Have you correctly set up and run the Tampermonkey script?
If so, after refreshing the ChatGPT webpage, your browser's console will print: Server connected, can process requests now.

from chatgpt-api-by-browser-script.

abyrvalg666 avatar abyrvalg666 commented on August 28, 2024

I think I have correctly installed tampermonkey. What browser console are you talking about? I am afraid I misunderstand what exactly console you mean. I only know Devtools - Console but it is not showing anything.

And in the NodeJS server console I can see "Browser connected, can process requests now." So I guess, this also means that server is connected to browser too.

Sorry for asking stupid questions, I am really trying my best but I am just a user, not a programmer. :)

Thank you very much, I really appreciate any help! I feel I am getting closer, if only I get a valid reply from OpenAI - I will manage the rest! :)

from chatgpt-api-by-browser-script.

zsodur avatar zsodur commented on August 28, 2024

I have updated the tampermonkey-script.js file. Please copy it again.
I have added a status in the upper right corner of the page. Please check what your current status is.

image

from chatgpt-api-by-browser-script.

abyrvalg666 avatar abyrvalg666 commented on August 28, 2024

Thank you very much for yourt help! unfortunately it seems that the script is not working at all. No status. If I check the errors for tampermonkey I see 4 of them:

  1. Uncaught Error: Extension context invalidated.
    Context: https://chat.openai.com/
    Stack tracing: content.js:23 (anonymous functions)
    On line 23 there is this:
    Object.defineProperty(e,"short_id",{get:()=>e.id.replace(/[^0-9a-zA-Z]/g,"").substr(0,4),enumerable:!0}),e})(),wo=(()=>{const e={getURL:function(e){return _o.runtime.getURL(e)},sendMessage:function(e,t){return _o.runtime.sendMessage(e,t)},onMessage:{addListener:function(e){return _o.runtime.onMessage.addListener(e)}},connect:function(e){return _o.runtime.connect({name:e})}};let t;return Object.defineProperty(e,"inIncognitoContext",{get:()=>(void 0===t&&(t=_o.extension.inIncognitoContext),t),

  2. Access to fetch at 'https://www.google.com/s2/favicons?sz=64&domain=openai.com' from origin 'chrome-extension://dhdgffkkebhmkfjojejmpbldmpobfkfo' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

  3. and 4. are the same as above relating to CORS thingy whatever it is :)

Any way I could correct this?
Thank you very much for all your help and support!

from chatgpt-api-by-browser-script.

milan188 avatar milan188 commented on August 28, 2024

How do I execute step 4. Posting to localhost?

from chatgpt-api-by-browser-script.

abyrvalg666 avatar abyrvalg666 commented on August 28, 2024

OK I ended up creting my own way to work with web-chat-gpt :) Thank you very much for your help, I guess, we have too different systems so that your scripts are not working on mine :)

from chatgpt-api-by-browser-script.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.