mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-11-13 20:53:45 +08:00
feat: #226
This commit is contained in:
@@ -143,11 +143,12 @@ export class ChatGPTApi implements LLMApi {
|
||||
|
||||
try {
|
||||
const path = this.path(OpenaiPath.TranscriptionPath, options.model);
|
||||
const headers = getHeaders(true);
|
||||
const payload = {
|
||||
method: "POST",
|
||||
body: formData,
|
||||
signal: controller.signal,
|
||||
headers: getHeaders(true),
|
||||
headers: headers,
|
||||
};
|
||||
|
||||
// make a fetch request
|
||||
@@ -155,7 +156,6 @@ export class ChatGPTApi implements LLMApi {
|
||||
() => controller.abort(),
|
||||
REQUEST_TIMEOUT_MS,
|
||||
);
|
||||
|
||||
const res = await fetch(path, payload);
|
||||
clearTimeout(requestTimeoutId);
|
||||
const json = await res.json();
|
||||
|
||||
Reference in New Issue
Block a user