Skip to content

Commit

Permalink
Replaced typo converstationId with conversationId
Browse files Browse the repository at this point in the history
ItzBlinkzy committed Dec 6, 2022
1 parent 542d1cd commit 700cb68
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/classes/ChatGPTAPI.md
Original file line number Diff line number Diff line change
@@ -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
6 changes: 3 additions & 3 deletions src/chatgpt-api.ts
Original file line number Diff line number Diff line change
@@ -86,11 +86,11 @@ export class ChatGPTAPI {
async sendMessage(
message: string,
opts: {
converstationId?: string
conversationId?: string
onProgress?: (partialResponse: string) => void
} = {}
): Promise<string> {
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`

0 comments on commit 700cb68

Please sign in to comment.