Update error message for invalid message role

role only allows user / assistant
This commit is contained in:
Haoyu Wang 2026-01-05 00:42:05 -05:00 committed by GitHub
parent 9d4c9b786d
commit 57bcf6786e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -193,7 +193,7 @@ def validate_chat_request(request: ChatRequest):
if message.role not in ["user", "assistant"]:
raise HTTPException(
status_code=400,
detail=f"Message {i} has invalid role. Must be 'user', 'assistant', or 'system'"
detail=f"Message {i} has invalid role. Must be 'user' or 'assistant'."
)
# Validate temperature