adrianhajdin / project_openai_codex Goto Github PK
View Code? Open in Web Editor NEWBuild and Deploy Your Own ChatGPT AI Application That Will Help You Code
Home Page: https://jsmastery.pro
Build and Deploy Your Own ChatGPT AI Application That Will Help You Code
Home Page: https://jsmastery.pro
When the screen is full, I need to highlight the text to scroll down. How do I add a scroll bar or have the screen automatically scroll down as the text is typed?
I know you are a busy person. Thank you for all that you are doing to help the coding community Adrian!! I will ask the AI if it can help me fix the issue :)
My bot only gives one answer. FOR EVERYTHING, Help ME!!!
The prompt is asking for an opinion about the use of technology in the classroom.
My opinion is that technology can be a great tool for enhancing learning in the classroom. It can provide students with access to a wide range of resources, allow them to collaborate with peers, and help them develop important skills such as problem-solving and critical thinking. However, it is important to ensure that technology is used in a way that supports learning objectives and does not become a distraction.
script.js :
import bot from './assets/bot.svg'
import user from './assets/user.svg'
Error report in Google Chrome inspect :
I copied every file that adrianhajdin posted here in Github.
When I try to use the program the AI bot stays on "loading" mode as the three dots keep on showing up.
This is what console log looks like:
I've been trying to fix this with ChatGpt for over 2 hours and I tried everything but I just can't get it working. Please helppppp :)
Thank you Adrian! I hope its just a type-o but I need to stop for the night. I keep getting this error msg or the code will run and count the ... twice then stop with no error message: [nodemon] app crashed - waiting for file changes before starting...
{"message":"Request failed with status code 429","name":"Error","stack":"Error: Request failed with status code 429\n at createError (/opt/render/project/src/server/node_modules/axios/lib/core/createError.js:16:15)\n at settle (/opt/render/project/src/server/node_modules/axios/lib/core/settle.js:17:12)\n at IncomingMessage.handleStreamEnd (/opt/render/project/src/server/node_modules/axios/lib/adapters/http.js:322:11)\n at IncomingMessage.emit (events.js:388:22)\n at endReadableNT (internal/streams/readable.js:1336:12)\n at processTicksAndRejections (internal/process/task_queues.js:82:21)","config":{"transitional":{"silentJSONParsing":true,"forcedJSONParsing":true,"clarifyTimeoutError":false},"transformRequest":[null],"transformResponse":[null],"timeout":0,"xsrfCookieName":"XSRF-TOKEN","xsrfHeaderName":"X-XSRF-TOKEN","maxContentLength":-1,"maxBodyLength":-1,"headers":{"Accept":"application/json, text/plain, /","Content-Type":"application/json","User-Agent":"OpenAI/NodeJS/3.1.0","Authorization":"Bearer sk-","Content-Length":133},"method":"post","data":"{"model":"text-davinci-003","prompt":"hi\n","temperature":0,"max_tokens":3000,"top_p":1,"frequency_penalty":0.5,"presence_penalty":0}","url":"https://api.openai.com/v1/completions"},"status":429}
Error 401 in live deployment even after following each and every step if anyone knows why please reply.
Thanks Adrian for the wonderful tutorial. Am having an issue uploading the server files to render. Keep getting an error
see image attached. Any assistance or advice
git link: https://github.com/Skullomanic84/codex
Hi,
Is there any workaround to this error?
The package Jason was there but why does this still happen? Please advise! Thanks
Pls help I've been getting a 401 error. So i can't access the API
{"message":"Request failed with status code 429","name":"Error","stack":"Error: Request failed with status code 429\n at createError (/opt/render/project/src/server/node_modules/axios/lib/core/createError.js:16:15)\n at settle (/opt/render/project/src/server/node_modules/axios/lib/core/settle.js:17:12)\n at IncomingMessage.handleStreamEnd (/opt/render/project/src/server/node_modules/axios/lib/adapters/http.js:322:11)\n at IncomingMessage.emit (events.js:388:22)\n at endReadableNT (internal/streams/readable.js:1336:12)\n at processTicksAndRejections (internal/process/task_queues.js:82:21)","config":{"transitional":{"silentJSONParsing":true,"forcedJSONParsing":true,"clarifyTimeoutError":false},"transformRequest":[null],"transformResponse":[null],"timeout":0,"xsrfCookieName":"XSRF-TOKEN","xsrfHeaderName":"X-XSRF-TOKEN","maxContentLength":-1,"maxBodyLength":-1,"headers":{"Accept":"application/json, text/plain, /","Content-Type":"application/json","User-Agent":"OpenAI/NodeJS/3.1.0","Authorization":"Bearer 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","Content-Length":133},"method":"post","data":"{"model":"text-davinci-003","prompt":"hi\n","temperature":0,"max_tokens":3000,"top_p":1,"frequency_penalty":0.5,"presence_penalty":0}","url":"https://api.openai.com/v1/completions"},"status":429}
When trying to access this website "https://codex-im0y.onrender.com/", I'm getting the message: "page not found", what should I do ?
401 Issue Solved/ Render deploy Issue:
Make sure that your Server folder has no gitignore file the gitignore file should be on the root folder..
then deploy the server to render.com and add also your environment key in the Environment Variable.
Now Update your fetch URL on the client side by adding your back-end render deploy URL
then open your terminal and do this thing --
git init
git add .
git commit -m "fetch URL or something you want"
git push
That should be updated, your GitHub code .
Now go to the vercel select your GitHub repo
The root directory should be the client
then hit deploy
that's all ..
My code is perfectly working on the live deployment
POST http://localhost:5000/ 500 (Internal Server Error)
hey i am facing such issue please guide i tried changing the api generated api key, even the port no. as well as the making it work on localhost level but it is still not working properly help urgently
warning : DevTools failed to load source map: Could not load content for chrome-extension://nllcnknpjnininklegdoijpljgdjkijc/bundles/injectExtensionInstalled.js.map: System error: net::ERR_BLOCKED_BY_CLIENT
I keep getting this error while entering the question in textarea:
{"error":{"message":"Request failed with status code 429","name":"Error","stack":"Error: Request failed with status code 429\n at createError (\Vanilla\ai-ninja\server\node_modules\axios\lib\core\createError.js:16:15)\n at settle (\Vanilla\ai-ninja\server\node_modules\axios\lib\core\settle.js:17:12)\n at IncomingMessage.handleStreamEnd (\Vanilla\ai-ninja\server\node_modules\axios\lib\adapters\http.js:322:11)\n at IncomingMessage.emit (events.js:412:35)\n at endReadableNT (internal/streams/readable.js:1333:12)\n at processTicksAndRejections (internal/process/task_queues.js:82:21)","config":{"transitional":{"silentJSONParsing":true,"forcedJSONParsing":true,"clarifyTimeoutError":false},"transformRequest":[null],"transformResponse":[null],"timeout":0,"xsrfCookieName":"XSRF-TOKEN","xsrfHeaderName":"X-XSRF-TOKEN","maxContentLength":-1,"maxBodyLength":-1,"headers":{"Accept":"application/json, text/plain, /","Content-Type":"application/json","User-Agent":"OpenAI/NodeJS/3.2.1","Authorization":"Bearer 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","Content-Length":133},"method":"post","data":"{"model":"text-davinci-003","prompt":"Hi\n","temperature":0,"max_tokens":3000,"top_p":1,"frequency_penalty":0.5,"presence_penalty":0}","url":"https://api.openai.com/v1/completions"},"status":429}}
I get this error when trying to deploy. I checked and the package.json files are there. Please help
Run npm run server
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /home/runner/work/Codex/Codex/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/home/runner/work/Codex/Codex/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /home/runner/.npm/_logs/2023-01-01T21_35_33_998Z-debug-0.log
Error: Process completed with exit code 254.
I cant access the api and i dont have a phone number to sign up with a normal email address( like suggested in other issues) is there a way i can solve. please reach out for help if u can
Validated style.css file and references in client/script.js. Have not been to identify what is causing 'Ask Codex" search field to be at the bottom of the page and results to overwrite the previous entry.
"message":"Request failed with status code 401","name":"Error","stack":"Error: Request failed with status code 401\n
I followed each step, but I always get a server error. Please help
In the script.js
, why does the request fetch a POST from 'https://codex-im0y.onrender.com/'?
The server.js
hosts the server on port 5000 of localhost. It seems as though the default script.js is store the GitHub users' prompts on the onrender.com server without users that don't read the code knowing.
project_openai_codex/client/script.js
Line 89 in daacb1f
run script.js, everything ok but input displays as null .
Im getting the above issue how do i solve it?
I solve the issue of 429 getting an HTTP Error & Solve the Render Deployment Issue....
you have to sign up for OpenAI with your own email address (not sign up with google) and do phone verification then it will give you the free trial of $18 ..and then the code will perfectly work.
401 Render deploy Issue Solved:
Make sure that your Server folder has no gitignore file the gitignore file should be in the root folder..
then deploy the server to render.com and add also your environment key into the Environment variable
Now Update your fetch URL on the client side by adding your back-end render deploy URL
then open your terminal and do this thing --
git init
git add .
git commit -m "fetch URL or something you want"
git push
That should be updated, your GitHub code .
Now go to the vercel select your GitHub repo
The root directory should be client
then hit deploy
that's all ..
My code is perfectly working on the live deployment
Make sure that your Server folder has no gitignore file the gitignore file should be on the root folder..then it works..
Failed to load module script. Expected javascript module script but server responded with a mime type of image/svg+xml
Error
When I ask bot that what is your name? or related to itself its nomaly says, He is a human and his age in 26. but how can I change this promts?
When I start the app for the first time, I type a question and hit the enter key and I get back a response as expected.
Any subsequent questions I type, when I hit the enter key, I get a carriage return instead of a submit. If I click the submit button instead, the request is sent as a GET request which does not get processed.
Change this in project_openai_codex/blob/main/client/script.js
const response = await fetch('https://codex-im0y.onrender.com/', { method: 'POST', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify({ prompt: data.get('prompt') }) })
To this
// Change 'http://localhost:5000' to your host address
const response = await fetch('http://localhost:5000/', { method: 'POST', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify({ prompt: data.get('prompt') }) })
I was getting errors and noticed it was calling a wrong OpenAI API than my own.
After changing it to the localhost address it was working great.
Any reason why newer models not supported and crashes the server.
to fix the eslint warning we can use:
form.addEventListener("submit", handleSubmit); form.addEventListener("keyup", (e) => { if (e.key === "Enter") { handleSubmit(e); } });
instead of keyCode
Can someone help please?
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://codex-im0y.onrender.com/. (Reason: CORS header βAccess-Control-Allow-Originβ missing). Status code: 404.
Thansks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.