Merge pull request #21 from ItzBlinkzy/main

pull/25/head
Travis Fischer 2022-12-05 22:52:51 -06:00 zatwierdzone przez GitHub
commit cf5e775713
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 4 dodań i 4 usunięć

Wyświetl plik

@ -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

Wyświetl plik

@ -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`