Skip to content

Latest commit

 

History

History
44 lines (27 loc) · 676 Bytes

README.md

File metadata and controls

44 lines (27 loc) · 676 Bytes

Setting up a proxy server for usage with BAML

This guide will help you set up a proxy server for usage with BAML. This is useful if you want to use BAML to call a model with your own provider.

Prerequisites

Install uv:

See https://docs.astral.sh/uv/getting-started/installation/

Modify the API key in anthropic_proxy.py.

Setup

Install the dependencies:

uv sync

Generate the BAML client:

uv run baml-cli generate

Run the anthropic proxy server:

uv run fastapi dev anthropic_proxy.py --port 8081

Run the web server:

uv run fastapi dev hello.py

Test

curl -X POST "http://localhost:8080/"