Merge pull request #464 from adi6409/main

pull/469/head
Travis Fischer 2023-03-12 03:48:24 -05:00 zatwierdzone przez GitHub
commit 5fef0f6ead
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -49,7 +49,7 @@ export class ChatGPTAPI {
constructor(opts: types.ChatGPTAPIOptions) {
const {
apiKey,
apiBaseUrl = 'https://api.openai.com',
apiBaseUrl = 'https://api.openai.com/v1',
debug = false,
messageStore,
completionParams,
@ -170,7 +170,7 @@ export class ChatGPTAPI {
const responseP = new Promise<types.ChatMessage>(
async (resolve, reject) => {
const url = `${this._apiBaseUrl}/v1/chat/completions`
const url = `${this._apiBaseUrl}/chat/completions`
const headers = {
'Content-Type': 'application/json',
Authorization: `Bearer ${this._apiKey}`