Comments (9)
Please refresh the chatgpt webpage, then make a new request and check the browser console.
from chatgpt-api-by-browser-script.
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.
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.
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.
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.
from chatgpt-api-by-browser-script.
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:
-
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), -
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.
-
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.
How do I execute step 4. Posting to localhost?
from chatgpt-api-by-browser-script.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chatgpt-api-by-browser-script.