From 700cb68c80358c40310700fbfde0d7d043e14244 Mon Sep 17 00:00:00 2001 From: ItzBlinkzy Date: Tue, 6 Dec 2022 03:52:37 +0000 Subject: [PATCH] Replaced typo converstationId with conversationId --- docs/classes/ChatGPTAPI.md | 2 +- src/chatgpt-api.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/classes/ChatGPTAPI.md b/docs/classes/ChatGPTAPI.md index 1c54cf9..76eb5f5 100644 --- a/docs/classes/ChatGPTAPI.md +++ b/docs/classes/ChatGPTAPI.md @@ -95,7 +95,7 @@ the response. | :------ | :------ | :------ | | `message` | `string` | The plaintext message to send. | | `opts` | `Object` | - | -| `opts.converstationId?` | `string` | - | +| `opts.conversationId?` | `string` | - | | `opts.onProgress?` | (`partialResponse`: `string`) => `void` | - | #### Returns diff --git a/src/chatgpt-api.ts b/src/chatgpt-api.ts index 594d860..7598960 100644 --- a/src/chatgpt-api.ts +++ b/src/chatgpt-api.ts @@ -86,11 +86,11 @@ export class ChatGPTAPI { async sendMessage( message: string, opts: { - converstationId?: string + conversationId?: string onProgress?: (partialResponse: string) => void } = {} ): Promise { - const { converstationId = uuidv4(), onProgress } = opts + const { conversationId = uuidv4(), onProgress } = opts const accessToken = await this.refreshAccessToken() @@ -107,7 +107,7 @@ export class ChatGPTAPI { } ], model: 'text-davinci-002-render', - parent_message_id: converstationId + parent_message_id: conversationId } const url = `${this._backendApiBaseUrl}/conversation`