Commit 3a47ddd
committed
feat(server): add Anthropic Messages API endpoints
Add /v1/messages and a checks endpoint that accept Anthropic Messages
API format requests, with request/response schemas and SSE streaming
that emits tool_use blocks. Stream tool calls through the handler in
_stream_llm_call so the SSE formatter can surface them.
Add the optional anthropic dependency to the server, all, and
test_integration extras, since the server schemas depend on the
anthropic SDK types.
Document the endpoints: add an "Anthropic Messages" server guide page,
add both endpoints to the OpenAPI spec (fern/openapi.yml) and the docs
navigation and API reference layout.
Signed-off-by: Rob Geada <rob@geada.net>1 parent 358b32a commit 3a47ddd
12 files changed
Lines changed: 5384 additions & 3452 deletions
File tree
- docs
- run-rails/using-fastapi-server
- fern
- nemoguardrails
- llm
- server
- schemas
- tests/server
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
449 | 449 | | |
450 | 450 | | |
451 | 451 | | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
452 | 455 | | |
453 | 456 | | |
454 | 457 | | |
| |||
592 | 595 | | |
593 | 596 | | |
594 | 597 | | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
595 | 605 | | |
596 | 606 | | |
597 | 607 | | |
| |||
0 commit comments