完善文档页文本向量与重排序调用支持

This commit is contained in:
2026-05-31 21:18:41 +08:00
parent 8ee7a7969e
commit 644a6f9d17
24 changed files with 1945 additions and 71 deletions
@@ -49,6 +49,7 @@ export type PlatformModelTypeDefinition = {
export const platformModelTypeDefinitions: PlatformModelTypeDefinition[] = [
{ key: 'text_generate', label: '文本生成', group: '文本', area: 'text' },
{ key: 'text_embedding', label: '文本向量', group: '文本', area: 'embedding' },
{ key: 'text_rerank', label: '重排序', group: '文本', area: 'text' },
{ key: 'image_generate', label: '图像生成', group: '图像', area: 'image' },
{ key: 'image_edit', label: '图像编辑', group: '图像', area: 'image' },
{ key: 'image_analysis', label: '图像理解', group: '理解', area: 'text' },
@@ -469,7 +470,7 @@ function boolFrom(value: unknown) {
}
function looksLikeCapabilityType(key: string) {
return modelTypeDefinitionMap.has(key) || key.includes('_') || ['chat', 'image', 'video', 'audio', 'embedding', 'music', 'digital_human', 'model_3d'].includes(key);
return modelTypeDefinitionMap.has(key) || key.includes('_') || ['chat', 'image', 'video', 'audio', 'embedding', 'rerank', 'music', 'digital_human', 'model_3d'].includes(key);
}
function inferArea(type: string): CapabilityConfigArea {
@@ -484,7 +485,7 @@ function inferArea(type: string): CapabilityConfigArea {
}
function isTextLike(type: string) {
return ['text_generate', 'image_analysis', 'video_understanding', 'audio_understanding', 'omni', 'tools_call'].includes(type);
return ['text_generate', 'text_rerank', 'image_analysis', 'video_understanding', 'audio_understanding', 'omni', 'tools_call'].includes(type);
}
function isImageLike(type: string) {