feat: add context length

This commit is contained in:
jialin
2026-01-06 17:21:32 +08:00
parent d8b3331648
commit 0f7a475ec9
23 changed files with 164 additions and 40 deletions
+17
View File
@@ -454,3 +454,20 @@ export async function queryDraftModelList(params?: Global.SearchParams) {
params
});
}
export async function queryModelContextLength(params: {
model: {
source: string;
model_scope_model_id?: string;
huggingface_repo_id?: string;
local_path?: string;
};
}) {
return request<{ native: number; scaled: number }>(
`${MODELS_API}/context-length`,
{
method: 'POST',
data: params
}
);
}