[XPU][CI]Update test assertion and base response value (#4907)

This commit is contained in:
plusNew001
2025-11-10 11:44:54 +08:00
committed by GitHub
parent 8a9e7b53af
commit 0a3bc84f71

View File

@@ -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 = "北魏时期"
# 非流式对话
response = client.chat.completions.create(
model="default",
@@ -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
if __name__ == "__main__":