From ff0f21a1f35f0bf1c7f5c2372881291b4761defb Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Thu, 25 Jul 2024 19:02:22 -0700 Subject: [PATCH] docs - anthropic --- docs/my-website/docs/providers/anthropic.md | 41 +++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/docs/my-website/docs/providers/anthropic.md b/docs/my-website/docs/providers/anthropic.md index 496343f8792..2227b7a6b51 100644 --- a/docs/my-website/docs/providers/anthropic.md +++ b/docs/my-website/docs/providers/anthropic.md @@ -82,6 +82,47 @@ model_list: ```bash litellm --config /path/to/config.yaml ``` + + + +Use this if you want to make requests to `claude-3-haiku-20240307`,`claude-3-opus-20240229`,`claude-2.1` without defining them on the config.yaml + +#### Required env variables +``` +ANTHROPIC_API_KEY=sk-ant**** +``` + +```yaml +model_list: + - model_name: "*" + litellm_params: + model: "*" +``` + +```bash +litellm --config /path/to/config.yaml +``` + +Example Request for this config.yaml + +**Ensure you use `anthropic/` prefix to route the request to Anthropic API** + +```shell +curl --location 'http://0.0.0.0:4000/chat/completions' \ +--header 'Content-Type: application/json' \ +--data ' { + "model": "anthropic/claude-3-haiku-20240307", + "messages": [ + { + "role": "user", + "content": "what llm are you" + } + ] + } +' +``` + +