fix: adjust continuation tests expected text

This commit is contained in:
drbh 2024-11-25 08:33:58 -05:00
parent 13a75acd76
commit 594a6a7c22
3 changed files with 10 additions and 10 deletions

View File

@ -5,19 +5,19 @@
"index": 0, "index": 0,
"logprobs": null, "logprobs": null,
"message": { "message": {
"content": "\nGenerate according to: It is an elephant's one year old baby or a mouse's one year old baby. It is", "content": "Both an elephant and a mouse are mammals. However, the differences between elephants and mice are:\n\n1",
"role": "assistant" "role": "assistant"
} }
} }
], ],
"created": 1732050325, "created": 1732541189,
"id": "", "id": "",
"model": "TinyLlama/TinyLlama-1.1B-Chat-v1.0", "model": "TinyLlama/TinyLlama-1.1B-Chat-v1.0",
"object": "chat.completion", "object": "chat.completion",
"system_fingerprint": "2.4.1-dev0-native", "system_fingerprint": "2.4.1-dev0-native",
"usage": { "usage": {
"completion_tokens": 30, "completion_tokens": 30,
"prompt_tokens": 37, "prompt_tokens": 49,
"total_tokens": 67 "total_tokens": 79
} }
} }

View File

@ -5,19 +5,19 @@
"index": 0, "index": 0,
"logprobs": null, "logprobs": null,
"message": { "message": {
"content": " the royal mouse? It is a little more slender and only weighs around 1.5 pounds for males and 1.3 pounds", "content": "the mouse is much smaller than an elephant. The average elephant weight is around 6,500 lbs (3,",
"role": "assistant" "role": "assistant"
} }
} }
], ],
"created": 1732050326, "created": 1732541190,
"id": "", "id": "",
"model": "TinyLlama/TinyLlama-1.1B-Chat-v1.0", "model": "TinyLlama/TinyLlama-1.1B-Chat-v1.0",
"object": "chat.completion", "object": "chat.completion",
"system_fingerprint": "2.4.1-dev0-native", "system_fingerprint": "2.4.1-dev0-native",
"usage": { "usage": {
"completion_tokens": 30, "completion_tokens": 30,
"prompt_tokens": 61, "prompt_tokens": 73,
"total_tokens": 91 "total_tokens": 103
} }
} }

View File

@ -38,7 +38,7 @@ def test_llama_completion_single_prompt(
content = response["choices"][0]["message"]["content"] content = response["choices"][0]["message"]["content"]
assert ( assert (
content content
== "\nGenerate according to: It is an elephant's one year old baby or a mouse's one year old baby. It is" == "Both an elephant and a mouse are mammals. However, the differences between elephants and mice are:\n\n1"
) )
assert response == response_snapshot assert response == response_snapshot
@ -71,6 +71,6 @@ def test_llama_completion_single_prompt_continue(
content = response["choices"][0]["message"]["content"] content = response["choices"][0]["message"]["content"]
assert ( assert (
content content
== " the royal mouse? It is a little more slender and only weighs around 1.5 pounds for males and 1.3 pounds" == "the mouse is much smaller than an elephant. The average elephant weight is around 6,500 lbs (3,"
) )
assert response == response_snapshot assert response == response_snapshot