Commit 8bc4620
Fix Anthropic API compatibility issues in chat completions (#3054)
* 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: Baber <[email protected]>1 parent 68c3a81 commit 8bc4620
1 file changed
+16
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
323 | 323 | | |
324 | 324 | | |
325 | 325 | | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
326 | 337 | | |
327 | 338 | | |
328 | 339 | | |
329 | 340 | | |
330 | 341 | | |
331 | 342 | | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
332 | 347 | | |
333 | | - | |
| 348 | + | |
334 | 349 | | |
335 | 350 | | |
336 | 351 | | |
| |||
0 commit comments