You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| message | The message to be displayed to the user. |
297
+
| conversationId | (Optional) An ID for the conversation. |
298
+
| parentMessageId | (Optional, for `ChatGPTClient` only) The ID of the parent message. |
299
+
| conversationSignature | (Optional, for `BingAIClient` only) A signature for the conversation. |
300
+
| clientId | (Optional, for `BingAIClient` only) The ID of the client. |
301
+
| invocationId | (Optional, for `BingAIClient` only) The ID of the invocation. |
302
+
| clientOptions | (Optional) An object containing options for the client. |
303
+
| clientOptions.clientToUse | (Optional) The client to use for this message. Possible values: `chatgpt`, `chatgpt-browser`, `bing`. |
304
+
| clientOptions.*| (Optional) Any valid options for the client. For example, for `ChatGPTClient`, you can set `clientOptions.openaiApiKey` to set an API key for this message only, or `clientOptions.promptPrefix` to give the AI custom instructions for this message only, etc. |
To start a conversation with ChatGPT, send a POST request to the server's `/conversation` endpoint with a JSON body in the following format.
271
-
Optional parameters are only necessary for conversations that span multiple requests:
312
+
To start a conversation with ChatGPT, send a POST request to the server's `/conversation` endpoint with a JSON body with parameters per **Endpoints** > **POST /conversation** above.
272
313
```JSON
273
314
{
274
315
"message": "Hello, how are you today?",
@@ -289,7 +330,7 @@ The server will return a JSON object containing ChatGPT's response:
@@ -408,7 +450,7 @@ Instructions are provided below.
408
450
***This is NOT the same thing as the _session token_.**
409
451
* Automatically fetching or refreshing your ChatGPT access token is not currently supported by this library. Please handle this yourself for now.
410
452
2. Set `reverseProxyUrl` to `https://chatgpt.hato.ai/completions` in `settings.js > chatGptClient` or `ChatGPTClient`'s options.
411
-
3. Set the "OpenAI API key" parameter (e.g. `settings.openaiApiKey`) to the ChatGPT access token you got in step 1.
453
+
3. Set the "OpenAI API key" parameter (e.g. `settings.chatGptClient.openaiApiKey`) to the ChatGPT access token you got in step 1.
412
454
4. Set the `model` to `text-davinci-002-render`, `text-davinci-002-render-paid`, or `text-davinci-002-render-sha` depending on which ChatGPT models that your account has access to. Models **must** be a ChatGPT model name, not the underlying model name, and you cannot use a model that your account does not have access to.
413
455
* You can check which ones you have access to by opening DevTools and going to the Network tab. Refresh the page and look at the response body for https://chat.openai.com/backend-api/models.
414
456
@@ -426,7 +468,7 @@ Instructions are provided below.
426
468
***This is NOT the same thing as the _session token_.**
427
469
* Automatically fetching or refreshing your ChatGPT access token is not currently supported by this library. Please handle this yourself for now.
428
470
2. Set `reverseProxyUrl` to `https://chatgpt.pawan.krd/api/completions` in `settings.js > chatGptClient` or `ChatGPTClient`'s options.
429
-
3. Set the "OpenAI API key" parameter (e.g. `settings.openaiApiKey`) to the ChatGPT access token you got in step 1.
471
+
3. Set the "OpenAI API key" parameter (e.g. `settings.chatGptClient.openaiApiKey`) to the ChatGPT access token you got in step 1.
430
472
4. Set the `model` to `text-davinci-002-render`, `text-davinci-002-render-paid`, or `text-davinci-002-render-sha` depending on which ChatGPT models that your account has access to. Models **must** be a ChatGPT model name, not the underlying model name, and you cannot use a model that your account does not have access to.
431
473
* You can check which ones you have access to by opening DevTools and going to the Network tab. Refresh the page and look at the response body for https://chat.openai.com/backend-api/models.
0 commit comments