{"_id":"@actuallydan/chatgpt","_rev":"3-f28a490a96e3497ba316647d3618fa57","name":"@actuallydan/chatgpt","dist-tags":{"latest":"1.4.4"},"versions":{"1.4.1":{"name":"@actuallydan/chatgpt","version":"1.4.1","description":"Node.js client for the unofficial ChatGPT API.","author":{"name":"Travis Fischer","email":"travis@transitivebullsh.it"},"repository":{"type":"git","url":"git+https://github.com/transitive-bullshit/chatgpt-api.git"},"license":"MIT","type":"module","source":"./src/index.ts","types":"./build/index.d.ts","exports":{".":{"import":"./build/index.js","types":"./build/index.d.ts","default":"./build/index.js"}},"engines":{"node":">=14"},"scripts":{"build":"tsup","dev":"tsup --watch","clean":"del build","prebuild":"run-s clean","predev":"run-s clean","pretest":"run-s build","docs":"typedoc","prepare":"husky install","pre-commit":"lint-staged","test":"run-p test:*","test:unit":"ava","test:prettier":"prettier '**/*.{js,jsx,ts,tsx}' --check"},"dependencies":{"eventsource-parser":"^0.0.5","expiry-map":"^2.0.0","node-fetch":"2","remark":"^14.0.2","strip-markdown":"^5.0.0","uuid":"^9.0.0"},"devDependencies":{"@trivago/prettier-plugin-sort-imports":"^4.0.0","@types/node":"^18.11.9","@types/node-fetch":"2","@types/uuid":"^9.0.0","ava":"^5.1.0","del-cli":"^5.0.0","dotenv-safe":"^8.2.0","husky":"^8.0.2","lint-staged":"^13.0.3","npm-run-all":"^4.1.5","ora":"^6.1.2","prettier":"^2.8.0","tsup":"^6.5.0","tsx":"^3.12.1","typedoc":"^0.23.21","typedoc-plugin-markdown":"^3.13.6","typescript":"^4.9.3"},"lint-staged":{"*.{ts,tsx}":["prettier --write"]},"ava":{"extensions":{"ts":"module"},"nodeArguments":["--loader=tsx"]},"keywords":["openai","chatgpt","gpt","gpt3","gpt4","chatbot","chat","machine learning","conversation","conversational ai","ai","ml","bot"],"bugs":{"url":"https://github.com/transitive-bullshit/chatgpt-api/issues"},"homepage":"https://github.com/transitive-bullshit/chatgpt-api#readme","main":"index.js","directories":{"doc":"docs"},"gitHead":"472db7b240eb9c0f1d16eb7625d4135932c7c75e","_id":"@actuallydan/chatgpt@1.4.1","_nodeVersion":"16.17.0","_npmVersion":"8.15.0","dist":{"integrity":"sha512-EC+r3XkByjZjn2Lgi//WO4kKWyKyUL5ubaGDHZIoP7smKgbhSd+31tLlmxFFpWY8r7NBEdDH01qCMxeEqxwHhw==","shasum":"9b57a791d4c5d88b2593a93e9244691791862ebd","tarball":"https://registry.npmjs.org/@actuallydan/chatgpt/-/chatgpt-1.4.1.tgz","fileCount":3,"unpackedSize":8650,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDSIevMWqHnI4Lv7+Be/kSg/dJ/TTpbh4M2/ayuUJJRygIhAPCMuZr7VpW60a1dUyhi/TRC/4jzfpKs6xN5uQPQz9VJ"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjj7SCACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrS/g//aUQwKlO9ALfkYuBqk1+UCp0wTGxp1v1PuDqQbBDkmMObybE5\r\nvFKQeINKrvcIo4D/lhcIANH3tx7P6BKSpatlRTIMcrXr+80q6ULJe8B2fHrN\r\nLGBgObzlIQU/WsSqndlt2+ppAaZqcYLsMApwt+QifFQgmlpkwEGdbmylUaak\r\ni3XBYaIMI2EaDiq+XsF1yIjNK01kGdWArKCr5ni4AgVwBzJrQO6yQI7vaVrA\r\nQcwpu9L6TUZLb4RE/3obbxqTPSZIffDR/fN2BOPNA84HDviHLp6O9we1o2m7\r\nLPWgTHH+wWwpsvYP2xiut4e+qRG7jWtLhGll6PQTHQA7uf/pTuKmjBO6kgiu\r\n/nuNCC0dvE02UDmhrQe4XhfwZmQ4ofvBVWY1Gpd8EBQLgrxRBkG3box8ShlL\r\nvhvUuMNftNovcEMjNfGuJh49TCb3fmftSeC/hgnbbJCLqLNXLE5AKGoAeT5y\r\nsKzg6OdeDnrMY5+BsFguukl0W06MKlc8/90ysY6Q0roiTekC3H4NT2ucwXDa\r\nplhvPZNX0H4K/NiHkN9MJV58kfpcqANGKWgkdky5nFEFBWn2vH1JvdbA0hsN\r\nBzNmz0OGIAgUQ1mHg0+ju8kElp8Ou/uCfOaA6DRN59XP3GFuoyPIBqQCiUQG\r\nnvTVF3iQnmTB1oxXtWm0M4GcOVboFbAzpT8=\r\n=7MiI\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"danknotdank","email":"dankral01@gmail.com"},"maintainers":[{"name":"danknotdank","email":"dankral01@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/chatgpt_1.4.1_1670362242754_0.16061550474901343"},"_hasShrinkwrap":false},"1.4.2":{"name":"@actuallydan/chatgpt","version":"1.4.2","description":"Node.js client for the unofficial ChatGPT API.","author":{"name":"Travis Fischer","email":"travis@transitivebullsh.it"},"repository":{"type":"git","url":"git+https://github.com/transitive-bullshit/chatgpt-api.git"},"license":"MIT","type":"module","source":"./src/index.ts","types":"./build/index.d.ts","exports":{".":{"import":"./build/index.js","types":"./build/index.d.ts","default":"./build/index.js"}},"engines":{"node":">=14"},"scripts":{"build":"tsup","dev":"tsup --watch","clean":"del build","predev":"run-s clean","pretest":"run-s build","docs":"typedoc","prepare":"husky install","pre-commit":"lint-staged","test":"run-p test:*","test:unit":"ava","test:prettier":"prettier '**/*.{js,jsx,ts,tsx}' --check"},"dependencies":{"eventsource-parser":"^0.0.5","expiry-map":"^2.0.0","node-fetch":"2","remark":"^14.0.2","strip-markdown":"^5.0.0","uuid":"^9.0.0"},"devDependencies":{"@trivago/prettier-plugin-sort-imports":"^4.0.0","@types/node":"^18.11.9","@types/node-fetch":"2","@types/uuid":"^9.0.0","ava":"^5.1.0","del-cli":"^5.0.0","dotenv-safe":"^8.2.0","husky":"^8.0.2","lint-staged":"^13.0.3","npm-run-all":"^4.1.5","ora":"^6.1.2","prettier":"^2.8.0","tsup":"^6.5.0","tsx":"^3.12.1","typedoc":"^0.23.21","typedoc-plugin-markdown":"^3.13.6","typescript":"^4.9.3"},"lint-staged":{"*.{ts,tsx}":["prettier --write"]},"ava":{"extensions":{"ts":"module"},"nodeArguments":["--loader=tsx"]},"keywords":["openai","chatgpt","gpt","gpt3","gpt4","chatbot","chat","machine learning","conversation","conversational ai","ai","ml","bot"],"bugs":{"url":"https://github.com/transitive-bullshit/chatgpt-api/issues"},"homepage":"https://github.com/transitive-bullshit/chatgpt-api#readme","main":"index.js","directories":{"doc":"docs"},"gitHead":"472db7b240eb9c0f1d16eb7625d4135932c7c75e","_id":"@actuallydan/chatgpt@1.4.2","_nodeVersion":"16.17.0","_npmVersion":"8.15.0","dist":{"integrity":"sha512-Zb3ULPPI13gLeSTnf9DzgnpzUIIzUvVRTW2pX6QyOuAHm87X8dWF+mZhHAgIjl6nrj4byMzyOdA919DMztKSDg==","shasum":"c77c2f05c3af21a872332da0fe2157959e80d3da","tarball":"https://registry.npmjs.org/@actuallydan/chatgpt/-/chatgpt-1.4.2.tgz","fileCount":7,"unpackedSize":4920296,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHJ7oI82IxNUC/Z6My4ld46aa3utXGtUj4EogVf/AotyAiEAjKbM/63Qwzi9H9SIuOtApVPJ87v+dAS8D/z372ZSAow="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjj7V2ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmot9w//d59vbUPkVDO/nwVMJ12V4FxAZhQGxdPJ79IRsxEp3Aqqf+55\r\nVt3q1fimJ6Sv0MYblv1QILPdGP6CCnckGyYyyxSUKMjZpvVlqfoSX91pzjcP\r\nryt9ykHGVinZopCREvuAgQ+YxdbhBdwmsGWYTZl6nqrL14wOU3LYWRtSEWS1\r\n2qK4GgPvQ0HysiPI5006fC/ApPQntph2dPQs3zOX/Dp4CCXzPblTvYR0nzo5\r\nt1fmR6C5jdDahOmHaeEmr69fTuG8k+TEK5IF5nERp4SYgwdclUbMNQw/MtJy\r\nGDx9Uq8MBh5f1jyY2/P5lKTCvnr+W6+cGzYzrJq6HWAXRpngsOK206rTDdEl\r\nzF/zd2kZ7J16HjmbjtDUoCevV6eZvSYx40F3mPsFZlPn4E+b0B7P0+D8XruN\r\nC0mpsbc1oecGM0S2U+/I4w0GlfpFT/7BhYfUftMmlUsTOo/Y6yYZEA4OuJS2\r\n+QCKD3NW/jFxs1zuiQb/ujTmfaSGmFBUIHd8f3VbTN1l+AJCkjz9gnbgwQY3\r\n96UpDQUZXMWrpRkgnpw/2s4BRpdvLAqisFyVZxNpBUj77ZzFCbfz2iB4eki0\r\nEMauD1g5GD9qlPWEu7Tucxvj+ImDfmJO5Q8Ysq/QKzY/mNW9a6NYQtzzvla8\r\nbJPZyX3AQlg1DL9kV5llbgI4TmmyVvkufjo=\r\n=nbLZ\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"danknotdank","email":"dankral01@gmail.com"},"maintainers":[{"name":"danknotdank","email":"dankral01@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/chatgpt_1.4.2_1670362486063_0.9318451785970037"},"_hasShrinkwrap":false},"1.4.3":{"name":"@actuallydan/chatgpt","version":"1.4.3","description":"Node.js client for the unofficial ChatGPT API.","author":{"name":"Travis Fischer","email":"travis@transitivebullsh.it"},"repository":{"type":"git","url":"git+https://github.com/transitive-bullshit/chatgpt-api.git"},"license":"MIT","type":"module","source":"./src/index.ts","types":"./build/index.d.ts","exports":{".":{"import":"./build/index.js","types":"./build/index.d.ts","default":"./build/index.js"}},"engines":{"node":">=14"},"scripts":{"build":"tsup","dev":"tsup --watch","clean":"del build","predev":"run-s clean","pretest":"run-s build","docs":"typedoc","prepare":"husky install","pre-commit":"lint-staged","test":"run-p test:*","test:unit":"ava","test:prettier":"prettier '**/*.{js,jsx,ts,tsx}' --check"},"dependencies":{"eventsource-parser":"^0.0.5","expiry-map":"^2.0.0","node-fetch":"2","remark":"^14.0.2","strip-markdown":"^5.0.0","uuid":"^9.0.0"},"devDependencies":{"@trivago/prettier-plugin-sort-imports":"^4.0.0","@types/node":"^18.11.9","@types/node-fetch":"2","@types/uuid":"^9.0.0","ava":"^5.1.0","del-cli":"^5.0.0","dotenv-safe":"^8.2.0","husky":"^8.0.2","lint-staged":"^13.0.3","npm-run-all":"^4.1.5","ora":"^6.1.2","prettier":"^2.8.0","tsup":"^6.5.0","tsx":"^3.12.1","typedoc":"^0.23.21","typedoc-plugin-markdown":"^3.13.6","typescript":"^4.9.3"},"lint-staged":{"*.{ts,tsx}":["prettier --write"]},"ava":{"extensions":{"ts":"module"},"nodeArguments":["--loader=tsx"]},"keywords":["openai","chatgpt","gpt","gpt3","gpt4","chatbot","chat","machine learning","conversation","conversational ai","ai","ml","bot"],"bugs":{"url":"https://github.com/transitive-bullshit/chatgpt-api/issues"},"homepage":"https://github.com/transitive-bullshit/chatgpt-api#readme","main":"index.js","directories":{"doc":"docs"},"gitHead":"b41f21219831ef74cebc9890aaa170497eff83ff","_id":"@actuallydan/chatgpt@1.4.3","_nodeVersion":"16.17.0","_npmVersion":"8.15.0","dist":{"integrity":"sha512-VKTHcLe83jwDTUwfBr3FIYP+eXNIMyQUYfS8yC1+il8IaXCMbJMCgfrAjsq+Ff9Riv8hnI/TaDB1atcepkMcOA==","shasum":"7242a16196270d56a5a1a71b1824f80c657e22b0","tarball":"https://registry.npmjs.org/@actuallydan/chatgpt/-/chatgpt-1.4.3.tgz","fileCount":33,"unpackedSize":990742,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCPPkzbML5UNmrRP7bmWoUXWyyK7CeziLcs/XZ/phC//QIgfDdrMEdVGDnk7j9MsCapsvUZbtOctY+c7b9bD9FfyyE="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjj7bYACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrgLw//TnJn32cc78qqombMg/jDrvmd9BqCvLwFn9oYQ7Of4QSx4wnP\r\nPPZt9GIKTcdleZFoKPe0Jm1Xd5aZLnkhmeJykvjk32jN2IjjXnDtyd5xQA8C\r\nKrfCPleW0vCKVWWH35nqTzW2a1ZJV9uhnaKoqPzPRbJVIhzzH/6cmETQRtql\r\n8pqebcG4tQuSlz8cPB4TXyVB+rAMiPVIQFIDILIvZixdeE/Muje6G3e1Izi5\r\n9Tyo/GTz+VlzBzucWDiIjorkdRf6Y5zHs+TN2nWWd+BiqVMi01yyjddXDCNm\r\nbAJV8TzKkzCrjK2sn+QBRJ7xRa5O9XUQZ/XifXYEWfb+GnPqAruOCNO46iUH\r\nJuv0ajCGo9BEJbXokByBpmG1Na+f5ab0LFi6faCsA2Lg4YSUOnsYkbdVteDh\r\nTjiINVmOWj4lqSAIdEBruY/zK6At7qU3yqooFGiknyCG/qUHRg471PfbIWF8\r\ncA4eB/JrFGo27ivAGjXtUWn5oIBzj6ytkeVFPec93EjsG25lpw5oWL5xbPLn\r\nq1CuuG3CPCQk4Ehvyo+HRbM0fHUaOGh5PFEBuSmqfOlYYXfRIWCfK1sAIAXn\r\nxFzxsYKRnCEnEzt0R67Tnlp+XTqWPhFkRQ4gExFoH1PsXvbPZ2Wgl40/w17R\r\n7GhNEH0TP2d8GCY3bzy69xDoVjImcF2YAmA=\r\n=khPa\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"danknotdank","email":"dankral01@gmail.com"},"maintainers":[{"name":"danknotdank","email":"dankral01@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/chatgpt_1.4.3_1670362840381_0.8037645716616719"},"_hasShrinkwrap":false},"1.4.4":{"name":"@actuallydan/chatgpt","version":"1.4.4","description":"Node.js client for the unofficial ChatGPT API.","author":{"name":"Travis Fischer","email":"travis@transitivebullsh.it"},"repository":{"type":"git","url":"git+https://github.com/transitive-bullshit/chatgpt-api.git"},"license":"MIT","type":"module","source":"./src/index.ts","types":"./build/index.d.ts","exports":{".":{"import":"./build/index.js","types":"./build/index.d.ts","default":"./build/index.js"}},"engines":{"node":">=14"},"scripts":{"build":"tsup","dev":"tsup --watch","clean":"del build","predev":"run-s clean","pretest":"run-s build","docs":"typedoc","prepare":"husky install","pre-commit":"lint-staged","test":"run-p test:*","test:unit":"ava","test:prettier":"prettier '**/*.{js,jsx,ts,tsx}' --check"},"dependencies":{"eventsource-parser":"^0.0.5","expiry-map":"^2.0.0","node-fetch":"2","remark":"^14.0.2","strip-markdown":"^5.0.0","uuid":"^9.0.0"},"devDependencies":{"@trivago/prettier-plugin-sort-imports":"^4.0.0","@types/node":"^18.11.9","@types/node-fetch":"2","@types/uuid":"^9.0.0","ava":"^5.1.0","del-cli":"^5.0.0","dotenv-safe":"^8.2.0","husky":"^8.0.2","lint-staged":"^13.0.3","npm-run-all":"^4.1.5","ora":"^6.1.2","prettier":"^2.8.0","tsup":"^6.5.0","tsx":"^3.12.1","typedoc":"^0.23.21","typedoc-plugin-markdown":"^3.13.6","typescript":"^4.9.3"},"lint-staged":{"*.{ts,tsx}":["prettier --write"]},"ava":{"extensions":{"ts":"module"},"nodeArguments":["--loader=tsx"]},"keywords":["openai","chatgpt","gpt","gpt3","gpt4","chatbot","chat","machine learning","conversation","conversational ai","ai","ml","bot"],"bugs":{"url":"https://github.com/transitive-bullshit/chatgpt-api/issues"},"homepage":"https://github.com/transitive-bullshit/chatgpt-api#readme","main":"index.js","directories":{"doc":"docs"},"gitHead":"944fe61848d7752f4014fa8eeb82651c0fb41f87","_id":"@actuallydan/chatgpt@1.4.4","_nodeVersion":"16.17.0","_npmVersion":"8.15.0","dist":{"integrity":"sha512-mFqZON6+b/r2KyBwmKH3dIqqJy9+1dLNPXuttcHwUQONoXf4m/JZasXEL7uSXspqye9UXmJNKg/zyWNZFF7/sg==","shasum":"3c9340fdab3a78fb500c560fd7b8adce87e98e52","tarball":"https://registry.npmjs.org/@actuallydan/chatgpt/-/chatgpt-1.4.4.tgz","fileCount":33,"unpackedSize":990742,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGF7ySINF/7fH0U6JDv4v6UapVXynz/BQ92CO3B4kfXmAiAiltARFioLnY4UfKK96v86b1bxywkpq/QQGf8/OAvKEg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjj7gSACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqdIg//Xuwqjshdt3BBC13CoU7IgScbsOZPqVyJrSNQRET8PvdlUPFW\r\n2KI3gdHz8ubBnLcESJc/7+LgkpCUL3dwY6APhjOTWg49QLo6FMR8ZBBg9hTU\r\nQXG1lfjXbfVgl5fObCrF9J9HeTi+XjaxP4NarKluToQThNmQNbWFdcSeldu4\r\nl0Hfk40awaJQ83VXajQX9YbIhIE0NXc0TMWoxb2VKXRP+Z6Caro0QroEt6Da\r\nGGaFFUlUhJTREjuVazbwUrBpQnmM73FpT+QBeGvFiVV46q0BniHSBN8bmxYX\r\nYYF5LQBUKGn5g/MLryWqkfFKl/dH9VznjiLiVNQ1A0fd+ONilQcMmJVLGIsL\r\n4pkaJGwDKl4q+7EMReCN5f8PU41QGVGrG8FUO2na778S7GZupFEsYmvuyrwo\r\nwEcwTK7UFETX73cB06oIFqY0QLbDTQnx+ZItDKGoqjNQGwePF/cJSev+oMLi\r\nMmOFJigo1X2R8RupiClRfd/KPJxdo66ok395hryszVgCymT0HPXMsOAVl0Cg\r\n/DSHBtJ4eqI2FuwKoXgQFspAC7hzPA9nxsPsszYbPttF7h2VzIAvdlHdFcOV\r\ngoqO+UXT6N5Nn2oABCN5avQZQVb7w2LaBiF3wyjtC25VlAlobV2fQRI0QEr0\r\nb9QkjF3ChzFWyxAZnzqBA/tLlEnsKN6bHp4=\r\n=c5uj\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"danknotdank","email":"dankral01@gmail.com"},"maintainers":[{"name":"danknotdank","email":"dankral01@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/chatgpt_1.4.4_1670363154454_0.8224623708233529"},"_hasShrinkwrap":false}},"time":{"created":"2022-12-06T21:30:42.683Z","1.4.1":"2022-12-06T21:30:42.935Z","modified":"2022-12-06T21:45:54.898Z","1.4.2":"2022-12-06T21:34:46.334Z","1.4.3":"2022-12-06T21:40:40.586Z","1.4.4":"2022-12-06T21:45:54.813Z"},"maintainers":[{"name":"danknotdank","email":"dankral01@gmail.com"}],"description":"Node.js client for the unofficial ChatGPT API.","homepage":"https://github.com/transitive-bullshit/chatgpt-api#readme","keywords":["openai","chatgpt","gpt","gpt3","gpt4","chatbot","chat","machine learning","conversation","conversational ai","ai","ml","bot"],"repository":{"type":"git","url":"git+https://github.com/transitive-bullshit/chatgpt-api.git"},"author":{"name":"Travis Fischer","email":"travis@transitivebullsh.it"},"bugs":{"url":"https://github.com/transitive-bullshit/chatgpt-api/issues"},"license":"MIT","readme":"<p align=\"center\">\n  <img alt=\"Example usage\" src=\"/media/demo.gif\">\n</p>\n\n# ChatGPT API <!-- omit in toc -->\n\n> Node.js client for the unofficial [ChatGPT](https://openai.com/blog/chatgpt/) API.\n\n[![NPM](https://img.shields.io/npm/v/chatgpt.svg)](https://www.npmjs.com/package/chatgpt) [![Build Status](https://github.com/transitive-bullshit/chatgpt-api/actions/workflows/test.yml/badge.svg)](https://github.com/transitive-bullshit/chatgpt-api/actions/workflows/test.yml) [![MIT License](https://img.shields.io/badge/license-MIT-blue)](https://github.com/transitive-bullshit/chatgpt-api/blob/main/license) [![Prettier Code Formatting](https://img.shields.io/badge/code_style-prettier-brightgreen.svg)](https://prettier.io)\n\n- [Intro](#intro)\n- [Install](#install)\n- [Usage](#usage)\n- [Docs](#docs)\n- [How it works](#how-it-works)\n- [Examples](#examples)\n- [Credit](#credit)\n- [License](#license)\n\n## Intro\n\nThis package is a Node.js wrapper around [ChatGPT](https://openai.com/blog/chatgpt) by [OpenAI](https://openai.com). TS batteries included. ✨\n\nYou can use it to start building projects powered by ChatGPT like chatbots, websites, etc...\n\n## Install\n\n```bash\nnpm install chatgpt\n```\n\n## Usage\n\n```ts\nimport { ChatGPTAPI } from 'chatgpt'\n\nasync function example() {\n  // sessionToken is required; see below for details\n  const api = new ChatGPTAPI({ sessionToken: process.env.SESSION_TOKEN })\n\n  // ensure the API is properly authenticated\n  await api.ensureAuth()\n\n  // send a message and wait for the response\n  const response = await api.sendMessage(\n    'Write a python version of bubble sort. Do not include example usage.'\n  )\n\n  // response is a markdown-formatted string\n  console.log(response)\n}\n```\n\nBy default, the response will be formatted as markdown. If you want to work with plaintext only, you can use:\n\n```ts\nconst api = new ChatGPTAPI({\n  sessionToken: process.env.SESSION_TOKEN,\n  markdown: false\n})\n```\n\nA full [demo](./src/demo.ts) is included for testing purposes:\n\n```bash\n# 1. clone repo\n# 2. install node deps\n# 3. set `SESSION_TOKEN` in .env\n# 4. run:\nnpx tsx src/demo.ts\n```\n\n## Docs\n\nSee the [auto-generated docs](./docs/classes/ChatGPTAPI.md) for more info on methods and parameters.\n\n## How it works\n\n**This package requires a valid session token from ChatGPT to access it's unofficial REST API.**\n\nTo get a session token:\n\n1. Go to https://chat.openai.com/chat and log in or sign up.\n2. Open dev tools.\n3. Open `Application` > `Cookies`.\n   ![ChatGPT cookies](./media/session-token.png)\n4. Copy the value for `__Secure-next-auth.session-token` and save it to your environment.\n\nIf you want to run the built-in demo, store this value as `SESSION_TOKEN` in a local `.env` file.\n\n> **Note**\n> This package will switch to using the official API once it's released.\n\n> **Note**\n> Prior to v1.0.0, this package used a headless browser via [Playwright](https://playwright.dev/) to automate the web UI. Here are the [docs for the initial browser version](https://github.com/transitive-bullshit/chatgpt-api/tree/v0.4.2).\n\n## Examples\n\nAll of these awesome projects are built using the `chatgpt` package. 🤯\n\n- [Twitter Bot](https://github.com/transitive-bullshit/chatgpt-twitter-bot) powered by ChatGPT ✨\n  - Mention [@ChatGPTBot](https://twitter.com/ChatGPTBot) on Twitter with your prompt to try it out\n- [Chrome Extension](https://github.com/gragland/chatgpt-everywhere) ([demo](https://twitter.com/gabe_ragland/status/1599466486422470656))\n- [VSCode Extension #1](https://github.com/mpociot/chatgpt-vscode) ([demo](https://twitter.com/marcelpociot/status/1599180144551526400))\n- [VSCode Extension #2](https://github.com/barnesoir/chatgpt-vscode-plugin)\n- [Raycast Extension](https://github.com/abielzulio/chatgpt-raycast) ([demo](https://twitter.com/abielzulio/status/1600176002042191875))\n- [Go Telegram Bot](https://github.com/m1guelpf/chatgpt-telegram)\n- [GitHub ProBot](https://github.com/oceanlvr/ChatGPTBot)\n- [Discord Bot](https://github.com/onury5506/Discord-ChatGPT-Bot)\n- [WeChat Bot](https://github.com/AutumnWhj/ChatGPT-wechat-bot)\n- [Lovelines.xyz](https://lovelines.xyz)\n- [EXM smart contracts](https://github.com/decentldotland/molecule)\n- [Flutter ChatGPT API](https://github.com/coskuncay/flutter_chatgpt_api)\n\nIf you create a cool integration, feel free to open a PR and add it to the list.\n\n## Credit\n\n- Huge thanks to [@RomanHotsiy](https://github.com/RomanHotsiy), [@ElijahPepe](https://github.com/ElijahPepe), and all the other contributors 💪\n- The original browser version was inspired by this [Go module](https://github.com/danielgross/whatsapp-gpt) by [Daniel Gross](https://github.com/danielgross)\n- The original REST version was inspired by [chat-gpt-google-extension](https://github.com/wong2/chat-gpt-google-extension) by [@wong2](https://github.com/wong2)\n\n## License\n\nMIT © [Travis Fischer](https://transitivebullsh.it)\n\nIf you found this project interesting, please consider supporting my open source work by [sponsoring me](https://github.com/sponsors/transitive-bullshit) or <a href=\"https://twitter.com/transitive_bs\">following me on twitter <img src=\"https://storage.googleapis.com/saasify-assets/twitter-logo.svg\" alt=\"twitter\" height=\"24px\" align=\"center\"></a>\n","readmeFilename":"readme.md"}