Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests/ci_use/XPU_45T/run_45vl.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def test_45vl():
ip = "0.0.0.0"
service_http_port = "8188" # 服务配置的
client = openai.Client(base_url=f"http://{ip}:{service_http_port}/v1", api_key="EMPTY_API_KEY")
base_response = "\n\n这尊佛像属于**北魏时期**"
base_response = "北魏时期"
Copy link

Copilot AI Nov 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

变量名 base_response 不够准确。既然现在它只包含关键信息而不是完整响应,建议重命名为 expected_keywordexpected_content 以更好地反映其用途。

Copilot generated this review using guidance from repository custom instructions.
# 非流式对话
response = client.chat.completions.create(
model="default",
Expand All @@ -44,7 +44,7 @@ def test_45vl():
)
print(response.choices[0].message.content)
# print(base_response)
assert response.choices[0].message.content == base_response
assert base_response in response.choices[0].message.content
Copy link

Copilot AI Nov 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

断言缺少错误消息。建议添加描述性错误消息以便在测试失败时更容易调试,例如:assert base_response in response.choices[0].message.content, f\"Expected '{base_response}' not found in response: {response.choices[0].message.content}\"

Copilot generated this review using guidance from repository custom instructions.


if __name__ == "__main__":
Expand Down
Loading