Code Monkey home page Code Monkey logo

project_openai_codex's Introduction

project_openai_codex's People

Contributors

adrianhajdin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

project_openai_codex's Issues

Trouble Deploying

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.

Cross origin Error

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

404 Error

"message":"Request failed with status code 401","name":"Error","stack":"Error: Request failed with status code 401\n

User. Svg expected js

Failed to load module script. Expected javascript module script but server responded with a mime type of image/svg+xml

Error

First submit works, then further submits happen as get requests

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.

I only get one response.

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.

Solution 401 & 429 Error

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

Urgent Error facing Localhost:5173 says ~~~~~

image

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

can you help me

{"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}

SVG file import error

script.js :
import bot from './assets/bot.svg'
import user from './assets/user.svg'

  • send.svg is shown correctly but bot.svg and user.svg cannot be read !

Error report in Google Chrome inspect :

  • Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "image/svg+xml". Strict MIME type checking is enforced for module scripts per HTML spec.

401 issue

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

Client and server successfully deployed but ERROR

{"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}

API KEY NOT GETTING RECOGNISED

hey there my api key is not being recognisedandshowing that undefined string tho i have put the ,env file inside server folder but still its showing pls help it out :((
image
image

Request failed with status code 429

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}}

Is it because of the low-tier or free plan?
image

Small edit in script.js

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.

401 error

Pls help I've been getting a 401 error. So i can't access the API

Program not working after copying the exact same code as in Github.

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:

image

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 :)

API key rolling/leaking

image

To clarify, I have followed instructions in the tutorial.

  • I have a .env file with node_modules and .env
  • I have a gitignore file in the root
  • on render i've completed the environment variables

My render deployment will not go through as my API key continually rolls when pushed to github. Any ideas?

Server Error

I followed each step, but I always get a server error. Please help

POST http://localhost:5173/ 404 (Not Found)

My code looks like the original though localhost is 5173 because when I run npm run dev it automatically gives me localhost5173.

But yeah the site is not working. This is what the console looks like.
image

KeyCode is deprecated

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

Conversation Is Not Saved

Does anyone have an idea why the chat doesn't save the previous prompts and their responses (see picture below)? Do I have to manually save the entire chat history? Thanks!
Screen Shot 2023-06-23 at 8 57 46 PM

Status Code 429 Error

Hello,

I am getting a Status code 429 error when I run the client. Attached is the issue.

Screenshot 2022-12-25 at 9 05 05 PM

Screenshot 2022-12-25 at 9 05 34 PM

Screenshot 2022-12-25 at 9 05 56 PM

I am using a Mac so I used server 5002.

Please advise

401 Issue solved / render issue solved

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

When the screen gets full it doesn't continue to scroll down as the AI responds.

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 :)

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.