fix: update tests and snaps

This commit is contained in:
drbh 2024-02-22 17:34:02 +00:00
parent c7caac47f8
commit 3ec57acac1
4 changed files with 30 additions and 29 deletions

View File

@ -0,0 +1,24 @@
{
"choices": [
{
"finish_reason": "length",
"index": 0,
"logprobs": null,
"message": {
"content": "As an up-to-date news station, our team has access to the latest information on weather conditions in Brooklyn, New York. Here is what we have learned so far:\n\n- Located in New York City, Brooklyn has a history of harsh weather patterns, especially in winter. The city's cold penchant makes it a popular winter destination, and meteorologists predict \"bomb cyclone\" conditions in the year 2021. - Due to",
"name": null,
"role": "assistant"
}
}
],
"created": 1708623190,
"id": "",
"model": "TinyLlama/TinyLlama-1.1B-Chat-v1.0",
"object": "text_completion",
"system_fingerprint": "1.4.2-native",
"usage": {
"completion_tokens": 100,
"prompt_tokens": 60,
"total_tokens": 160
}
}

View File

@ -1,24 +0,0 @@
{
"choices": [
{
"finish_reason": "length",
"index": 0,
"logprobs": null,
"message": {
"content": "As for the weather in Brooklyn, New York, it can vary depending on the location within the borough. According to climatereporter.com, the average temperature in August is 73 degrees Fahrenheit (23 degrees Celsius), while the humidity is 62%. In the winter (December to February), the temperature averages between 20 and 45 degrees Fahrenheit (6 to 8 degrees Celsius), with significant",
"name": null,
"role": "assistant"
}
}
],
"created": 1708103426,
"id": "",
"model": "TinyLlama/TinyLlama-1.1B-Chat-v1.0",
"object": "text_completion",
"system_fingerprint": "1.4.0-native",
"usage": {
"completion_tokens": 100,
"prompt_tokens": 82,
"total_tokens": 182
}
}

View File

@ -11,14 +11,14 @@
}
}
],
"created": 1708103426,
"created": 1708623212,
"id": "",
"model": "TinyLlama/TinyLlama-1.1B-Chat-v1.0",
"object": "text_completion",
"system_fingerprint": "1.4.0-native",
"system_fingerprint": "1.4.2-native",
"usage": {
"completion_tokens": 33,
"prompt_tokens": 321,
"total_tokens": 354
"prompt_tokens": 318,
"total_tokens": 351
}
}

View File

@ -93,7 +93,7 @@ async def test_flash_llama_grammar_no_tools_regex(
assert (
response.choices[0].message.content
== "As for the weather in Brooklyn, New York, it can vary depending on the location within the borough. According to climatereporter.com, the average temperature in August is 73 degrees Fahrenheit (23 degrees Celsius), while the humidity is 62%. In the winter (December to February), the temperature averages between 20 and 45 degrees Fahrenheit (6 to 8 degrees Celsius), with significant"
== 'As an up-to-date news station, our team has access to the latest information on weather conditions in Brooklyn, New York. Here is what we have learned so far:\n\n- Located in New York City, Brooklyn has a history of harsh weather patterns, especially in winter. The city\'s cold penchant makes it a popular winter destination, and meteorologists predict "bomb cyclone" conditions in the year 2021. - Due to'
)
assert response == response_snapshot
@ -107,6 +107,7 @@ async def test_flash_llama_grammar_tools_regex(
max_tokens=100,
seed=0,
tools=tools,
presence_penalty=-1.1,
messages=[
{
"role": "system",