From 2f3e9965c3801835fd8e2643432e8b14c3034ef9 Mon Sep 17 00:00:00 2001 From: liyu Date: Mon, 12 Dec 2022 08:04:20 +0800 Subject: [PATCH] chore: update docs --- docs/classes/ChatGPTAPI.md | 34 ++++++++-- docs/classes/ChatGPTConversation.md | 10 +-- docs/classes/ChatGPTError.md | 99 +++++++++++++++++++++++++++++ docs/modules.md | 53 +++++++-------- docs/readme.md | 51 +++++++++++---- 5 files changed, 199 insertions(+), 48 deletions(-) create mode 100644 docs/classes/ChatGPTError.md diff --git a/docs/classes/ChatGPTAPI.md b/docs/classes/ChatGPTAPI.md index c78d20a..78072d9 100644 --- a/docs/classes/ChatGPTAPI.md +++ b/docs/classes/ChatGPTAPI.md @@ -8,6 +8,10 @@ - [constructor](ChatGPTAPI.md#constructor) +### Accessors + +- [user](ChatGPTAPI.md#user) + ### Methods - [ensureAuth](ChatGPTAPI.md#ensureauth) @@ -29,16 +33,34 @@ Creates a new client wrapper around the unofficial ChatGPT REST API. | Name | Type | Description | | :------ | :------ | :------ | | `opts` | `Object` | - | +| `opts.accessToken?` | `string` | - | | `opts.accessTokenTTL?` | `number` | **`Default Value`** 60000 (60 seconds) | | `opts.apiBaseUrl?` | `string` | **`Default Value`** `'https://chat.openai.com/api'` * | | `opts.backendApiBaseUrl?` | `string` | **`Default Value`** `'https://chat.openai.com/backend-api'` * | +| `opts.clearanceToken` | `string` | - | | `opts.markdown?` | `boolean` | **`Default Value`** `true` * | | `opts.sessionToken` | `string` | = **Required** OpenAI session token which can be found in a valid session's cookies (see readme for instructions) | | `opts.userAgent?` | `string` | **`Default Value`** `'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36'` * | #### Defined in -[chatgpt-api.ts:35](https://github.com/transitive-bullshit/chatgpt-api/blob/20c376e/src/chatgpt-api.ts#L35) +[src/chatgpt-api.ts:39](https://github.com/transitive-bullshit/chatgpt-api/blob/8e1cde4/src/chatgpt-api.ts#L39) + +## Accessors + +### user + +• `get` **user**(): [`User`](../modules.md#user) + +Gets the currently signed-in user, if authenticated, `null` otherwise. + +#### Returns + +[`User`](../modules.md#user) + +#### Defined in + +[src/chatgpt-api.ts:98](https://github.com/transitive-bullshit/chatgpt-api/blob/8e1cde4/src/chatgpt-api.ts#L98) ## Methods @@ -55,7 +77,7 @@ is still valid. #### Defined in -[chatgpt-api.ts:221](https://github.com/transitive-bullshit/chatgpt-api/blob/20c376e/src/chatgpt-api.ts#L221) +[src/chatgpt-api.ts:250](https://github.com/transitive-bullshit/chatgpt-api/blob/8e1cde4/src/chatgpt-api.ts#L250) ___ @@ -82,7 +104,7 @@ The new conversation instance #### Defined in -[chatgpt-api.ts:285](https://github.com/transitive-bullshit/chatgpt-api/blob/20c376e/src/chatgpt-api.ts#L285) +[src/chatgpt-api.ts:344](https://github.com/transitive-bullshit/chatgpt-api/blob/8e1cde4/src/chatgpt-api.ts#L344) ___ @@ -99,7 +121,7 @@ the token fails. #### Defined in -[chatgpt-api.ts:208](https://github.com/transitive-bullshit/chatgpt-api/blob/20c376e/src/chatgpt-api.ts#L208) +[src/chatgpt-api.ts:237](https://github.com/transitive-bullshit/chatgpt-api/blob/8e1cde4/src/chatgpt-api.ts#L237) ___ @@ -125,7 +147,7 @@ A valid access token #### Defined in -[chatgpt-api.ts:235](https://github.com/transitive-bullshit/chatgpt-api/blob/20c376e/src/chatgpt-api.ts#L235) +[src/chatgpt-api.ts:264](https://github.com/transitive-bullshit/chatgpt-api/blob/8e1cde4/src/chatgpt-api.ts#L264) ___ @@ -156,4 +178,4 @@ The response from ChatGPT #### Defined in -[chatgpt-api.ts:94](https://github.com/transitive-bullshit/chatgpt-api/blob/20c376e/src/chatgpt-api.ts#L94) +[src/chatgpt-api.ts:121](https://github.com/transitive-bullshit/chatgpt-api/blob/8e1cde4/src/chatgpt-api.ts#L121) diff --git a/docs/classes/ChatGPTConversation.md b/docs/classes/ChatGPTConversation.md index 5d47d71..61b8fa7 100644 --- a/docs/classes/ChatGPTConversation.md +++ b/docs/classes/ChatGPTConversation.md @@ -41,7 +41,7 @@ Creates a new conversation wrapper around the ChatGPT API. #### Defined in -[chatgpt-conversation.ts:21](https://github.com/transitive-bullshit/chatgpt-api/blob/20c376e/src/chatgpt-conversation.ts#L21) +[src/chatgpt-conversation.ts:21](https://github.com/transitive-bullshit/chatgpt-api/blob/8e1cde4/src/chatgpt-conversation.ts#L21) ## Properties @@ -51,7 +51,7 @@ Creates a new conversation wrapper around the ChatGPT API. #### Defined in -[chatgpt-conversation.ts:10](https://github.com/transitive-bullshit/chatgpt-api/blob/20c376e/src/chatgpt-conversation.ts#L10) +[src/chatgpt-conversation.ts:10](https://github.com/transitive-bullshit/chatgpt-api/blob/8e1cde4/src/chatgpt-conversation.ts#L10) ___ @@ -61,7 +61,7 @@ ___ #### Defined in -[chatgpt-conversation.ts:11](https://github.com/transitive-bullshit/chatgpt-api/blob/20c376e/src/chatgpt-conversation.ts#L11) +[src/chatgpt-conversation.ts:11](https://github.com/transitive-bullshit/chatgpt-api/blob/8e1cde4/src/chatgpt-conversation.ts#L11) ___ @@ -71,7 +71,7 @@ ___ #### Defined in -[chatgpt-conversation.ts:12](https://github.com/transitive-bullshit/chatgpt-api/blob/20c376e/src/chatgpt-conversation.ts#L12) +[src/chatgpt-conversation.ts:12](https://github.com/transitive-bullshit/chatgpt-api/blob/8e1cde4/src/chatgpt-conversation.ts#L12) ## Methods @@ -104,4 +104,4 @@ The response from ChatGPT #### Defined in -[chatgpt-conversation.ts:48](https://github.com/transitive-bullshit/chatgpt-api/blob/20c376e/src/chatgpt-conversation.ts#L48) +[src/chatgpt-conversation.ts:48](https://github.com/transitive-bullshit/chatgpt-api/blob/8e1cde4/src/chatgpt-conversation.ts#L48) diff --git a/docs/classes/ChatGPTError.md b/docs/classes/ChatGPTError.md new file mode 100644 index 0000000..b80b8c8 --- /dev/null +++ b/docs/classes/ChatGPTError.md @@ -0,0 +1,99 @@ +[chatgpt](../readme.md) / [Exports](../modules.md) / ChatGPTError + +# Class: ChatGPTError + +## Hierarchy + +- `Error` + + ↳ **`ChatGPTError`** + +## Table of contents + +### Constructors + +- [constructor](ChatGPTError.md#constructor) + +### Properties + +- [originalError](ChatGPTError.md#originalerror) +- [response](ChatGPTError.md#response) +- [statusCode](ChatGPTError.md#statuscode) +- [statusText](ChatGPTError.md#statustext) + +## Constructors + +### constructor + +• **new ChatGPTError**(`message?`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `message?` | `string` | + +#### Inherited from + +Error.constructor + +#### Defined in + +node_modules/.pnpm/typescript@4.9.3/node_modules/typescript/lib/lib.es5.d.ts:1059 + +• **new ChatGPTError**(`message?`, `options?`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `message?` | `string` | +| `options?` | `ErrorOptions` | + +#### Inherited from + +Error.constructor + +#### Defined in + +node_modules/.pnpm/typescript@4.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts:30 + +## Properties + +### originalError + +• `Optional` **originalError**: `Error` + +#### Defined in + +[src/types.ts:295](https://github.com/transitive-bullshit/chatgpt-api/blob/8e1cde4/src/types.ts#L295) + +___ + +### response + +• `Optional` **response**: `Response` + +#### Defined in + +[src/types.ts:294](https://github.com/transitive-bullshit/chatgpt-api/blob/8e1cde4/src/types.ts#L294) + +___ + +### statusCode + +• `Optional` **statusCode**: `number` + +#### Defined in + +[src/types.ts:292](https://github.com/transitive-bullshit/chatgpt-api/blob/8e1cde4/src/types.ts#L292) + +___ + +### statusText + +• `Optional` **statusText**: `string` + +#### Defined in + +[src/types.ts:293](https://github.com/transitive-bullshit/chatgpt-api/blob/8e1cde4/src/types.ts#L293) diff --git a/docs/modules.md b/docs/modules.md index f07f115..85ca365 100644 --- a/docs/modules.md +++ b/docs/modules.md @@ -8,6 +8,7 @@ - [ChatGPTAPI](classes/ChatGPTAPI.md) - [ChatGPTConversation](classes/ChatGPTConversation.md) +- [ChatGPTError](classes/ChatGPTError.md) ### Type Aliases @@ -46,7 +47,7 @@ #### Defined in -[types.ts:109](https://github.com/transitive-bullshit/chatgpt-api/blob/20c376e/src/types.ts#L109) +[src/types.ts:109](https://github.com/transitive-bullshit/chatgpt-api/blob/8e1cde4/src/types.ts#L109) ___ @@ -56,7 +57,7 @@ ___ #### Defined in -[types.ts:1](https://github.com/transitive-bullshit/chatgpt-api/blob/20c376e/src/types.ts#L1) +[src/types.ts:1](https://github.com/transitive-bullshit/chatgpt-api/blob/8e1cde4/src/types.ts#L1) ___ @@ -78,7 +79,7 @@ https://chat.openapi.com/backend-api/conversation #### Defined in -[types.ts:134](https://github.com/transitive-bullshit/chatgpt-api/blob/20c376e/src/types.ts#L134) +[src/types.ts:134](https://github.com/transitive-bullshit/chatgpt-api/blob/8e1cde4/src/types.ts#L134) ___ @@ -96,7 +97,7 @@ ___ #### Defined in -[types.ts:251](https://github.com/transitive-bullshit/chatgpt-api/blob/20c376e/src/types.ts#L251) +[src/types.ts:251](https://github.com/transitive-bullshit/chatgpt-api/blob/8e1cde4/src/types.ts#L251) ___ @@ -121,7 +122,7 @@ ___ #### Defined in -[types.ts:257](https://github.com/transitive-bullshit/chatgpt-api/blob/20c376e/src/types.ts#L257) +[src/types.ts:257](https://github.com/transitive-bullshit/chatgpt-api/blob/8e1cde4/src/types.ts#L257) ___ @@ -138,7 +139,7 @@ ___ #### Defined in -[types.ts:270](https://github.com/transitive-bullshit/chatgpt-api/blob/20c376e/src/types.ts#L270) +[src/types.ts:270](https://github.com/transitive-bullshit/chatgpt-api/blob/8e1cde4/src/types.ts#L270) ___ @@ -160,7 +161,7 @@ https://chat.openapi.com/backend-api/conversation/message_feedback #### Defined in -[types.ts:193](https://github.com/transitive-bullshit/chatgpt-api/blob/20c376e/src/types.ts#L193) +[src/types.ts:193](https://github.com/transitive-bullshit/chatgpt-api/blob/8e1cde4/src/types.ts#L193) ___ @@ -170,7 +171,7 @@ ___ #### Defined in -[types.ts:249](https://github.com/transitive-bullshit/chatgpt-api/blob/20c376e/src/types.ts#L249) +[src/types.ts:249](https://github.com/transitive-bullshit/chatgpt-api/blob/8e1cde4/src/types.ts#L249) ___ @@ -190,7 +191,7 @@ ___ #### Defined in -[types.ts:222](https://github.com/transitive-bullshit/chatgpt-api/blob/20c376e/src/types.ts#L222) +[src/types.ts:222](https://github.com/transitive-bullshit/chatgpt-api/blob/8e1cde4/src/types.ts#L222) ___ @@ -200,7 +201,7 @@ ___ #### Defined in -[types.ts:220](https://github.com/transitive-bullshit/chatgpt-api/blob/20c376e/src/types.ts#L220) +[src/types.ts:220](https://github.com/transitive-bullshit/chatgpt-api/blob/8e1cde4/src/types.ts#L220) ___ @@ -210,7 +211,7 @@ ___ #### Defined in -[types.ts:275](https://github.com/transitive-bullshit/chatgpt-api/blob/20c376e/src/types.ts#L275) +[src/types.ts:275](https://github.com/transitive-bullshit/chatgpt-api/blob/8e1cde4/src/types.ts#L275) ___ @@ -228,7 +229,7 @@ ___ #### Defined in -[types.ts:77](https://github.com/transitive-bullshit/chatgpt-api/blob/20c376e/src/types.ts#L77) +[src/types.ts:77](https://github.com/transitive-bullshit/chatgpt-api/blob/8e1cde4/src/types.ts#L77) ___ @@ -246,7 +247,7 @@ https://chat.openapi.com/backend-api/models #### Defined in -[types.ts:70](https://github.com/transitive-bullshit/chatgpt-api/blob/20c376e/src/types.ts#L70) +[src/types.ts:70](https://github.com/transitive-bullshit/chatgpt-api/blob/8e1cde4/src/types.ts#L70) ___ @@ -265,7 +266,7 @@ https://chat.openapi.com/backend-api/moderations #### Defined in -[types.ts:97](https://github.com/transitive-bullshit/chatgpt-api/blob/20c376e/src/types.ts#L97) +[src/types.ts:97](https://github.com/transitive-bullshit/chatgpt-api/blob/8e1cde4/src/types.ts#L97) ___ @@ -285,7 +286,7 @@ https://chat.openapi.com/backend-api/moderations #### Defined in -[types.ts:114](https://github.com/transitive-bullshit/chatgpt-api/blob/20c376e/src/types.ts#L114) +[src/types.ts:114](https://github.com/transitive-bullshit/chatgpt-api/blob/8e1cde4/src/types.ts#L114) ___ @@ -303,7 +304,7 @@ ___ #### Defined in -[types.ts:161](https://github.com/transitive-bullshit/chatgpt-api/blob/20c376e/src/types.ts#L161) +[src/types.ts:161](https://github.com/transitive-bullshit/chatgpt-api/blob/8e1cde4/src/types.ts#L161) ___ @@ -320,7 +321,7 @@ ___ #### Defined in -[types.ts:178](https://github.com/transitive-bullshit/chatgpt-api/blob/20c376e/src/types.ts#L178) +[src/types.ts:178](https://github.com/transitive-bullshit/chatgpt-api/blob/8e1cde4/src/types.ts#L178) ___ @@ -330,7 +331,7 @@ ___ #### Defined in -[types.ts:3](https://github.com/transitive-bullshit/chatgpt-api/blob/20c376e/src/types.ts#L3) +[src/types.ts:3](https://github.com/transitive-bullshit/chatgpt-api/blob/8e1cde4/src/types.ts#L3) ___ @@ -340,7 +341,7 @@ ___ #### Defined in -[types.ts:286](https://github.com/transitive-bullshit/chatgpt-api/blob/20c376e/src/types.ts#L286) +[src/types.ts:286](https://github.com/transitive-bullshit/chatgpt-api/blob/8e1cde4/src/types.ts#L286) ___ @@ -361,7 +362,7 @@ ___ #### Defined in -[types.ts:277](https://github.com/transitive-bullshit/chatgpt-api/blob/20c376e/src/types.ts#L277) +[src/types.ts:277](https://github.com/transitive-bullshit/chatgpt-api/blob/8e1cde4/src/types.ts#L277) ___ @@ -382,7 +383,7 @@ https://chat.openapi.com/api/auth/session #### Defined in -[types.ts:8](https://github.com/transitive-bullshit/chatgpt-api/blob/20c376e/src/types.ts#L8) +[src/types.ts:8](https://github.com/transitive-bullshit/chatgpt-api/blob/8e1cde4/src/types.ts#L8) ___ @@ -394,9 +395,9 @@ ___ | Name | Type | Description | | :------ | :------ | :------ | -| `email` | `string` | Email of the user | -| `features` | `string`[] \| [] | Features the user is in | -| `groups` | `string`[] \| [] | Groups the user is in | +| `email?` | `string` | Email of the user | +| `features` | `string`[] | Features the user is in | +| `groups` | `string`[] | Groups the user is in | | `id` | `string` | ID of the user | | `image` | `string` | Image of the user | | `name` | `string` | Name of the user | @@ -404,7 +405,7 @@ ___ #### Defined in -[types.ts:30](https://github.com/transitive-bullshit/chatgpt-api/blob/20c376e/src/types.ts#L30) +[src/types.ts:30](https://github.com/transitive-bullshit/chatgpt-api/blob/8e1cde4/src/types.ts#L30) ## Functions @@ -424,4 +425,4 @@ ___ #### Defined in -[utils.ts:4](https://github.com/transitive-bullshit/chatgpt-api/blob/20c376e/src/utils.ts#L4) +[src/utils.ts:4](https://github.com/transitive-bullshit/chatgpt-api/blob/8e1cde4/src/utils.ts#L4) diff --git a/docs/readme.md b/docs/readme.md index 1be5668..3ef7fc6 100644 --- a/docs/readme.md +++ b/docs/readme.md @@ -1,5 +1,8 @@ chatgpt / [Exports](modules.md) +> **Note** +> As of December 11, 2022 ~2pm CST, OpenAI has enabled additional Cloudflare restrictions that are currently preventing us from refreshing access tokens. This is affecting _all_ ChatGPT API wrappers at the moment, including the Python ones. See [this issue](https://github.com/transitive-bullshit/chatgpt-api/issues/96) for an ongoing discussion until I release a viable workaround. +

Example usage

@@ -49,7 +52,7 @@ async function example() { // send a message and wait for the response const response = await api.sendMessage( - 'Write a python version of bubble sort. Do not include example usage.' + 'Write a python version of bubble sort.' ) // response is a markdown-formatted string @@ -57,7 +60,7 @@ async function example() { } ``` -The default ChatGPT responses are formatted as markdown. If you want to work with plaintext only, you can use: +ChatGPT responses are formatted as markdown by default. If you want to work with plaintext instead, you can use: ```ts const api = new ChatGPTAPI({ @@ -85,9 +88,9 @@ const response1 = await conversation.sendMessage('Can you expand on that?') const response2 = await conversation.sendMessage('Oh cool; thank you') ``` -Sometimes, ChatGPT will hang for an extended period of time before sending it's response. This may be due to rate limiting or it may be due to OpenAI's servers being overloaded. +Sometimes, ChatGPT will hang for an extended period of time before beginning to respond. This may be due to rate limiting or it may be due to OpenAI's servers being overloaded. -To mitigate this issues, you can add a timeout like this: +To mitigate these issues, you can add a timeout like this: ```ts // timeout after 2 minutes (which will also abort the underlying HTTP request) @@ -96,6 +99,8 @@ const response = await api.sendMessage('this is a timeout test', { }) ``` +You can stream responses using the `onProgress` or `onConversationResponse` callbacks. See the [docs](./docs/classes/ChatGPTAPI.md) for more details. +
Usage in CommonJS (Dynamic import) @@ -169,17 +174,40 @@ All of these awesome projects are built using the `chatgpt` package. 🤯 - [Twitter Bot](https://github.com/transitive-bullshit/chatgpt-twitter-bot) powered by ChatGPT ✨ - Mention [@ChatGPTBot](https://twitter.com/ChatGPTBot) on Twitter with your prompt to try it out - [Chrome Extension](https://github.com/gragland/chatgpt-everywhere) ([demo](https://twitter.com/gabe_ragland/status/1599466486422470656)) -- [VSCode Extension #1](https://github.com/mpociot/chatgpt-vscode) ([demo](https://twitter.com/marcelpociot/status/1599180144551526400)) +- [VSCode Extension #1](https://github.com/mpociot/chatgpt-vscode) ([demo](https://twitter.com/marcelpociot/status/1599180144551526400), [updated version](https://github.com/timkmecl/chatgpt-vscode), [marketplace](https://marketplace.visualstudio.com/items?itemName=timkmecl.chatgpt)) - [VSCode Extension #2](https://github.com/barnesoir/chatgpt-vscode-plugin) ([marketplace](https://marketplace.visualstudio.com/items?itemName=JayBarnes.chatgpt-vscode-plugin)) - [VSCode Extension #3](https://github.com/gencay/vscode-chatgpt) ([marketplace](https://marketplace.visualstudio.com/items?itemName=gencay.vscode-chatgpt)) -- [Raycast Extension](https://github.com/abielzulio/chatgpt-raycast) ([demo](https://twitter.com/abielzulio/status/1600176002042191875)) +- [Raycast Extension #1](https://github.com/abielzulio/chatgpt-raycast) ([demo](https://twitter.com/abielzulio/status/1600176002042191875)) +- [Raycast Extension #2](https://github.com/domnantas/raycast-chatgpt) +- [Telegram Bot #1](https://github.com/realies/chatgpt-telegram-bot) +- [Telegram Bot #2](https://github.com/dawangraoming/chatgpt-telegram-bot) +- [Deno Telegram Bot](https://github.com/Ciyou/chatbot-telegram) - [Go Telegram Bot](https://github.com/m1guelpf/chatgpt-telegram) - [GitHub ProBot](https://github.com/oceanlvr/ChatGPTBot) -- [Discord Bot](https://github.com/onury5506/Discord-ChatGPT-Bot) -- [WeChat Bot](https://github.com/AutumnWhj/ChatGPT-wechat-bot) +- [Discord Bot #1](https://github.com/onury5506/Discord-ChatGPT-Bot) +- [Discord Bot #2](https://github.com/Nageld/ChatGPT-Bot) +- [Discord Bot #3](https://github.com/leinstay/gptbot) +- [Discord Bot #4 (selfbot)](https://github.com/0x7030676e31/cumsocket) +- [WeChat Bot #1](https://github.com/AutumnWhj/ChatGPT-wechat-bot) +- [WeChat Bot #2](https://github.com/fuergaosi233/wechat-chatgpt) +- [WeChat Bot #3](https://github.com/wangrongding/wechat-bot) +- [WeChat Bot #4](https://github.com/darknightlab/wechat-bot) +- [WeChat Bot #5](https://github.com/sunshanpeng/wechaty-chatgpt) +- [QQ Bot (plugin for Yunzai-bot)](https://github.com/ikechan8370/chatgpt-plugin) +- [QQ Bot (plugin for KiviBot)](https://github.com/KiviBotLab/kivibot-plugin-chatgpt) +- [QQ Bot (oicq)](https://github.com/easydu2002/chat_gpt_oicq) +- [QQ Bot (oicq + RabbitMQ)](https://github.com/linsyking/ChatGPT-QQBot) - [Lovelines.xyz](https://lovelines.xyz) - [EXM smart contracts](https://github.com/decentldotland/molecule) - [Flutter ChatGPT API](https://github.com/coskuncay/flutter_chatgpt_api) +- [Carik Bot](https://github.com/luridarmawan/Carik) +- [Github Action for reviewing PRs](https://github.com/kxxt/chatgpt-action/) +- [WhatsApp Bot #1](https://github.com/pascalroget/whatsgpt) (multi-user support) +- [WhatsApp Bot #2](https://github.com/amosayomide05/chatgpt-whatsapp-bot) +- [Matrix Bot](https://github.com/jakecoppinger/matrix-chatgpt-bot) +- [Rental Cover Letter Generator](https://sharehouse.app/ai) +- [Assistant CLI](https://github.com/diciaup/assistant-cli) +- [Teams Bot](https://github.com/formulahendry/chatgpt-teams-bot) If you create a cool integration, feel free to open a PR and add it to the list. @@ -191,15 +219,16 @@ This package is ESM-only. It supports: - If you need Node.js 14 support, use [`v1.4.0`](https://github.com/transitive-bullshit/chatgpt-api/releases/tag/v1.4.0) - Edge runtimes like CF workers and Vercel edge functions - Modern browsers - - Mainly chrome extensions where your code is protected to a degree - - **We do not recommend using `chatgpt` from client-side browser code** because it would expose your private session token + - Mainly meant for chrome extensions where your code is protected to a degree + - We recommend against using `chatgpt` from client-side browser code because it would expose your private session token - If you want to build a website using `chatgpt`, we recommend using it only from your backend API ## Credits -- Huge thanks to [@RomanHotsiy](https://github.com/RomanHotsiy), [@ElijahPepe](https://github.com/ElijahPepe), and all the other contributors 💪 +- Huge thanks to [@simon300000](https://github.com/simon300000), [@RomanHotsiy](https://github.com/RomanHotsiy), [@ElijahPepe](https://github.com/ElijahPepe), and all the other contributors 💪 - The original browser version was inspired by this [Go module](https://github.com/danielgross/whatsapp-gpt) by [Daniel Gross](https://github.com/danielgross) - 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) +- [OpenAI](https://openai.com) for creating [ChatGPT](https://openai.com/blog/chatgpt/) 🔥 ## License