Skip to content

Commit cc2bfbb

Browse files
committed
add
1 parent 0731257 commit cc2bfbb

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/mock_server.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def snapshot(self):
8989
# --- Pydantic Models ---
9090
class Message(BaseModel):
9191
role: str
92-
content: Optional[str] = ""
92+
content: Optional[Union[str, List[Dict[str, Any]]]] = ""
9393
tool_calls: Optional[List[Dict[str, Any]]] = None
9494
tool_call_id: Optional[str] = None
9595
name: Optional[str] = None
@@ -198,7 +198,10 @@ async def generate(
198198
has_content = False
199199
if has_input:
200200
# Strict mutual exclusion check
201-
if req_data.input.messages is not None and req_data.input.prompt is not None:
201+
if (
202+
req_data.input.messages is not None
203+
and req_data.input.prompt is not None
204+
):
202205
return JSONResponse(
203206
status_code=400,
204207
content={

0 commit comments

Comments
 (0)