mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-12-24 13:28:13 +08:00
[XPU][CI]Update test assertion and base response value (#4907)
This commit is contained in:
@@ -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__":
|
||||
|
||||
Reference in New Issue
Block a user