Skip to content

Commit b0e9644

Browse files
authored
Merge branch 'main' into cluster_health_main
2 parents 27cadd7 + 87f7e8a commit b0e9644

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

tests/llama_stack/inference/test_completions.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
import pytest
2+
from simple_logger.logger import get_logger
23
from llama_stack_client import LlamaStackClient
34
from tests.llama_stack.constants import ModelInfo
45

6+
LOGGER = get_logger(name=__name__)
7+
58

69
@pytest.mark.parametrize(
710
"unprivileged_model_namespace",
@@ -51,11 +54,12 @@ def test_inference_completion(
5154
) -> None:
5255
"""Test text completion functionality with a geography question."""
5356
response = unprivileged_llama_stack_client.completions.create(
54-
model=llama_stack_models.model_id, prompt="What is the capital of Catalonia?", max_tokens=7, temperature=0
57+
model=llama_stack_models.model_id, prompt="What is the capital of Catalonia?", max_tokens=20, temperature=0
5558
)
5659
assert len(response.choices) > 0, "No response after basic inference on llama-stack server"
5760

5861
# Check if response has the expected structure and content
5962
content = response.choices[0].text.lower()
6063
assert content is not None, "LLM response content is None"
64+
LOGGER.info(f"LLM response content for test_inference_completion: {content}")
6165
assert "barcelona" in content, "The LLM didn't provide the expected answer to the prompt"

0 commit comments

Comments
 (0)