diff --git a/integration-tests/models/__snapshots__/test_tools_llama/test_flash_llama_grammar_no_tools.json b/integration-tests/models/__snapshots__/test_tools_llama/test_flash_llama_grammar_no_tools.json new file mode 100644 index 00000000..0d3211b7 --- /dev/null +++ b/integration-tests/models/__snapshots__/test_tools_llama/test_flash_llama_grammar_no_tools.json @@ -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 + } +} diff --git a/integration-tests/models/__snapshots__/test_tools_llama/test_flash_llama_grammar_no_tools_regex.json b/integration-tests/models/__snapshots__/test_tools_llama/test_flash_llama_grammar_no_tools_regex.json deleted file mode 100644 index 0ff1630f..00000000 --- a/integration-tests/models/__snapshots__/test_tools_llama/test_flash_llama_grammar_no_tools_regex.json +++ /dev/null @@ -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 - } -} diff --git a/integration-tests/models/__snapshots__/test_tools_llama/test_flash_llama_grammar_tools_regex.json b/integration-tests/models/__snapshots__/test_tools_llama/test_flash_llama_grammar_tools.json similarity index 79% rename from integration-tests/models/__snapshots__/test_tools_llama/test_flash_llama_grammar_tools_regex.json rename to integration-tests/models/__snapshots__/test_tools_llama/test_flash_llama_grammar_tools.json index d3a868f2..dc4561e6 100644 --- a/integration-tests/models/__snapshots__/test_tools_llama/test_flash_llama_grammar_tools_regex.json +++ b/integration-tests/models/__snapshots__/test_tools_llama/test_flash_llama_grammar_tools.json @@ -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 } } diff --git a/integration-tests/models/test_tools_llama.py b/integration-tests/models/test_tools_llama.py index d12ed648..ae051f82 100644 --- a/integration-tests/models/test_tools_llama.py +++ b/integration-tests/models/test_tools_llama.py @@ -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",