• NourFahmy's avatar
    Fix Anthropic API compatibility issues in chat completions (#3054) · 8bc46207
    NourFahmy authored
    
    
    * Fix Anthropic API compatibility issues in chat completions
    
    solves two important compatibility issues between the LM Eval Harness and Anthropic's API:
    
    1) The type field issue - Anthropic's Messages API doesn't accept the type field that other APIs might expect, that was previously included
    2) The stop sequences issue - Anthropic requires stop sequences to contain non-whitespace characters
    
    tested with most recent models from anthopic; claude-sonnet-4-0, claude-opus-4-0, resolved my local api errors
    
    * pacufy pre-commit
    
    * add type
    
    ---------
    Co-authored-by: default avatarBaber <baber@hey.com>
    8bc46207
anthropic_llms.py 12.5 KB