mirror of
https://github.com/karpathy/nanochat.git
synced 2026-03-07 09:50:28 +00:00
fix(chat_web): correct role validation error message to match allowed roles
This commit is contained in:
parent
542beb0c8c
commit
b66bbbf3de
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user