update doc ;perf: model test (#4098)

* perf: extract array

* update doc

* perf: model test

* perf: model test
This commit is contained in:
Archer
2025-03-11 14:56:13 +08:00
committed by archer
parent bcd0b010a6
commit a3df9ea531
21 changed files with 144 additions and 79 deletions

View File

@@ -6,10 +6,12 @@ import { getSTTModel } from '../model';
export const aiTranscriptions = async ({
model,
fileStream
fileStream,
headers
}: {
model: string;
fileStream: fs.ReadStream;
headers?: Record<string, string>;
}) => {
const data = new FormData();
data.append('model', model);
@@ -30,7 +32,8 @@ export const aiTranscriptions = async ({
Authorization: modelData.requestAuth
? `Bearer ${modelData.requestAuth}`
: aiAxiosConfig.authorization,
...data.getHeaders()
...data.getHeaders(),
...headers
},
data: data
});