File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change 7
7
@pytest .fixture
8
8
def model ():
9
9
return VLLMModel (
10
- model_id = "meta-llama/Llama-3.2-3B" , # or whatever your model ID is
11
- host = "http://localhost:8000" , # adjust as needed
10
+ model_id = "Qwen/Qwen3-4B" ,
11
+ host = "http://localhost:8000" ,
12
12
max_tokens = 128 ,
13
13
)
14
14
@@ -32,7 +32,14 @@ def agent(model, tools):
32
32
33
33
34
34
def test_agent (agent ):
35
- result = agent ( "What is the time and weather in Melboune Australia?" )
36
- text = result . message [ "content" ][ 0 ][ "text" ]. lower ( )
35
+ # Send prompt
36
+ result = agent ( "What is the time and weather in Melbourne Australia?" )
37
37
38
- assert all (string in text for string in ["3:00" , "cloudy" ])
38
+ # Extract plain text from the first content block
39
+ text_blocks = result .message .get ("content" , [])
40
+ # content is a list of dicts with 'text' keys
41
+ text = " " .join (block .get ("text" , "" ) for block in text_blocks ).lower ()
42
+
43
+ # Assert that the tool outputs appear in the generated response text
44
+ assert "12:00" in text
45
+ assert "cloudy" in text
You can’t perform that action at this time.
0 commit comments