Closed uezo closed 3 months ago
Add route for ClaudeProxy to FastAPI app.
from aiproxy.anthropic_claude import ClaudeProxy claude_proxy = ClaudeProxy( api_key="YOUR_ANTHROPIC_API_KEY", access_logger_queue=worker.queue_client ) claude_proxy.add_route(app, "/claude/v1/messages")
Just change the endpoint url.
request = httpx.Request( method="POST", url="http://127.0.0.1:8000/claude/v1/messages", headers={ "x-api-key": "dummy", "anthropic-version": "2023-06-01" }, json=request_json )
Server
Add route for ClaudeProxy to FastAPI app.
Client
Just change the endpoint url.