@devnorb/chatgpt

1.0.3 • Public • Published

@devnorb/chatgpt

This is a modified version of the npmjs chatgpt package

This is a CJS module.
(I modified this to be compatible with my discord account generator)

Constructor Parameters:

customProxy: "http://1.1.1.1" (string) - Default is none
A proxy to bypass website blocks
debug: true (boolean) - Default is false
Prints debug logs in console
apiReverseProxyUrl: "" (string) - Default is ai.fakeopen.com/api/conversation
A website that accesses chatGPT's backend (bypasses Cloudflare)
accessToken: "" (string) - Required.
Your chatGPT access token, similar to your API key.

Examples:

(async () => {
  // Your chatGPT access token can be found by logging in to chatGPT, then opening a new tab and visiting `https://chat.openai.com/api/auth/session`.
  const { ChatGPTAPI } = require("@devnorb/chatgpt");
  const api = new ChatGPTAPI({
    accessToken: "",
    apiReverseProxyUrl: "https://ai.fakeopen.com/api/conversation"
  });
  const res = await api.sendMessage(`Are you chatGPT?`);
  const response = res.text;
  console.log(response);
})();
(async () => {
  // Your chatGPT access token can be found by logging in to chatGPT, then opening a new tab and visiting `https://chat.openai.com/api/auth/session`.
  const { ChatGPTAPI } = require("@devnorb/chatgpt");
  const api = new ChatGPTAPI({
    accessToken: "",
    apiReverseProxyUrl: "https://ai.fakeopen.com/api/conversation",
    customProxy: "http://1.1.1.1",
    debug: true
  });
  const res = await api.sendMessage(`Are you chatGPT?`);
  const response = res.text;
  console.log(response);
})();

Package Sidebar

Install

npm i @devnorb/chatgpt

Weekly Downloads

4

Version

1.0.3

License

ISC

Unpacked Size

13.5 kB

Total Files

3

Last publish

Collaborators

  • devnorb