Skip to content

Commit 089ea34

Browse files
committed
W4A8 test adds 104 machine outputs
1 parent 518f57b commit 089ea34

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

tests/ci_use/XPU_45T/test_w4a8.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ def test_w4a8():
1919
ip = "0.0.0.0"
2020
service_http_port = "8188" # 服务配置的
2121
client = openai.Client(base_url=f"http://{ip}:{service_http_port}/v1", api_key="EMPTY_API_KEY")
22-
base_response = "你好!我是一个基于人工智能技术的助手,可以帮你解答问题、提供建议、聊天或者协助完成各种任务。无论是学习、工作还是生活中的疑问,我都可以尽力提供帮助。😊 你有什么想聊的吗?"
22+
base_response_110 = "你好!我是一个基于人工智能技术的助手,可以帮你解答问题、提供建议、聊天或者协助完成各种任务。无论是学习、工作还是生活中的疑问,我都可以尽力提供帮助。😊 你有什么想聊的吗?"
23+
base_response_104 = "你好!我是一个人工智能助手,可以帮你解答问题、提供建议、聊天或者完成一些任务。无论是学习、工作还是生活中的疑问,我都很乐意帮忙。你有什么需要我协助的吗?😊"
2324
# 非流式对话
2425
response = client.chat.completions.create(
2526
model="default",
@@ -32,8 +33,11 @@ def test_w4a8():
3233
stream=False,
3334
)
3435
print(response.choices[0].message.content)
35-
print(base_response)
36-
assert response.choices[0].message.content == base_response
36+
# print(base_response)
37+
assert (
38+
response.choices[0].message.content == base_response_110
39+
or response.choices[0].message.content == base_response_104
40+
)
3741

3842

3943
if __name__ == "__main__":

0 commit comments

Comments
 (0)