feat: support image inputs in assistant tests
This commit is contained in:
@@ -51,6 +51,7 @@ import {
|
||||
import {
|
||||
batchRunsApi,
|
||||
modelResourcesApi,
|
||||
testAssetsApi,
|
||||
testCasesApi,
|
||||
testSuitesApi,
|
||||
type ModelResource,
|
||||
@@ -101,7 +102,7 @@ function isRunFinished(run: BatchRunSnapshot): boolean {
|
||||
|
||||
function runnableMessage(item: TestCase): string {
|
||||
if (item.inputMode !== "fixed_script_text") {
|
||||
return "当前自动测试仅支持固定脚本 · 文字";
|
||||
return "当前自动测试仅支持固定脚本 · 多模态";
|
||||
}
|
||||
return getTestCaseValidationMessage(item) ?? "";
|
||||
}
|
||||
@@ -653,6 +654,16 @@ function AutoTestTimeline({
|
||||
role: "user",
|
||||
label: `固定输入 · ${turn.index + 1} / ${maxTurns}`,
|
||||
content: turn.userInput,
|
||||
attachments: turn.image
|
||||
? [
|
||||
{
|
||||
id: turn.image.assetId,
|
||||
type: "image",
|
||||
url: testAssetsApi.contentUrl(turn.image.assetId),
|
||||
alt: turn.image.filename,
|
||||
},
|
||||
]
|
||||
: undefined,
|
||||
},
|
||||
});
|
||||
items.push({
|
||||
|
||||
Reference in New Issue
Block a user