We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0731257 commit cc2bfbbCopy full SHA for cc2bfbb
tests/mock_server.py
@@ -89,7 +89,7 @@ def snapshot(self):
89
# --- Pydantic Models ---
90
class Message(BaseModel):
91
role: str
92
- content: Optional[str] = ""
+ content: Optional[Union[str, List[Dict[str, Any]]]] = ""
93
tool_calls: Optional[List[Dict[str, Any]]] = None
94
tool_call_id: Optional[str] = None
95
name: Optional[str] = None
@@ -198,7 +198,10 @@ async def generate(
198
has_content = False
199
if has_input:
200
# Strict mutual exclusion check
201
- if req_data.input.messages is not None and req_data.input.prompt is not None:
+ if (
202
+ req_data.input.messages is not None
203
+ and req_data.input.prompt is not None
204
+ ):
205
return JSONResponse(
206
status_code=400,
207
content={
0 commit comments