forked from phoenix-oss/llama-stack-mirror
Update condition in tests to handle llama-3.1 vs llama3.1 (HF names)
This commit is contained in:
parent
394519d68a
commit
05d1ead02f
1 changed files with 6 additions and 2 deletions
|
@ -25,7 +25,11 @@ from .utils import group_chunks
|
||||||
|
|
||||||
|
|
||||||
def get_expected_stop_reason(model: str):
|
def get_expected_stop_reason(model: str):
|
||||||
return StopReason.end_of_message if "Llama3.1" in model else StopReason.end_of_turn
|
return (
|
||||||
|
StopReason.end_of_message
|
||||||
|
if ("Llama3.1" in model or "Llama-3.1" in model)
|
||||||
|
else StopReason.end_of_turn
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
@ -34,7 +38,7 @@ def common_params(inference_model):
|
||||||
"tool_choice": ToolChoice.auto,
|
"tool_choice": ToolChoice.auto,
|
||||||
"tool_prompt_format": (
|
"tool_prompt_format": (
|
||||||
ToolPromptFormat.json
|
ToolPromptFormat.json
|
||||||
if "Llama3.1" in inference_model
|
if ("Llama3.1" in inference_model or "Llama-3.1" in inference_model)
|
||||||
else ToolPromptFormat.python_list
|
else ToolPromptFormat.python_list
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue