You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
System message not supported for Anthropic (anthropic.BadRequestError) #367
Using the system role with the Anthropic backend results in the following error:
anthropic.BadRequestError: Error code: 400 - {
'type': 'error',
'error': {
'type': 'invalid_request_error',
'message': 'messages: Unexpected role "system". The Messages API accepts a top-level `system` parameter, not "system" as an input message role.'
}
}
Is there a known workaround? I've tried using a user message instead, but occasionally that causes confusion for Haiku.
Activity
fronx commentedon Apr 15, 2024
Here is how Anthropic system messages are supposed to be provided (source: https://docs.anthropic.com/claude/docs/system-prompts):
And here is what the current sglang implementation does:
So there is currently no way of converting a system message into a system parameter.
fronx commentedon Apr 15, 2024
Would the following be an acceptable fix?
If I can figure out how to set things up on my machine so I can run tests for this repo, I could contribute a fix.
Fix issue #367 – System message not supported for Anthropic (anthropi…
Fix issue sgl-project#367 – System message not supported for Anthropi…
Update w4a8 moe groupgemm (sgl-project#367)
Merge fix/dense-draft-moe-align-367: unquantized MoE activation-vecto…