model perf (#3657)

* fix: model

* dataset quote

* perf: model config

* model tag

* doubao model config

* perf: config model

* feat: model test
This commit is contained in:
Archer
2025-01-24 14:10:14 +08:00
committed by archer
parent f2be9ae32d
commit e48df175d7
171 changed files with 1902 additions and 3126 deletions

View File

@@ -1,6 +1,7 @@
import { addLog } from '../../../common/system/log';
import { POST } from '../../../common/api/serverRequest';
import { getFirstReRankModel } from '../model';
import { getAxiosConfig } from '../config';
type PostReRankResponse = {
id: string;
@@ -24,9 +25,11 @@ export function reRankRecall({
return Promise.reject('no rerank model');
}
const { baseUrl, authorization } = getAxiosConfig({});
let start = Date.now();
return POST<PostReRankResponse>(
model.requestUrl,
model.requestUrl ? model.requestUrl : `${baseUrl}/v1/rerank`,
{
model: model.model,
query,
@@ -34,7 +37,7 @@ export function reRankRecall({
},
{
headers: {
Authorization: `Bearer ${model.requestAuth}`
Authorization: model.requestAuth ? model.requestAuth : authorization
},
timeout: 30000
}