perf: text splitter (#4313)

* sync collection

* remove lock

* perf: text splitter

* update comment
This commit is contained in:
Archer
2025-03-25 17:44:38 +08:00
committed by archer
parent 826a53dcb6
commit 37b4a1919b
8 changed files with 716 additions and 70 deletions

View File

@@ -30,11 +30,11 @@ export async function text2Speech({
response_format: 'mp3',
speed
},
modelData.requestUrl && modelData.requestAuth
modelData.requestUrl
? {
path: modelData.requestUrl,
headers: {
Authorization: `Bearer ${modelData.requestAuth}`
...(modelData.requestAuth ? { Authorization: `Bearer ${modelData.requestAuth}` } : {})
}
}
: {}

View File

@@ -65,6 +65,7 @@ export const llmCompletionsBodyFormat = <T extends CompletionsBodyType>(
const requestBody: T = {
...body,
model: modelData.model,
temperature:
typeof body.temperature === 'number'
? computedTemperature({