From e615f2670a16baca1aac190420c19ee169687afd Mon Sep 17 00:00:00 2001 From: ishaan-jaff Date: Tue, 5 Dec 2023 12:02:35 -0800 Subject: [PATCH] (docs) proxy + configs --- docs/my-website/docs/proxy/configs.md | 35 ++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/docs/my-website/docs/proxy/configs.md b/docs/my-website/docs/proxy/configs.md index ed5424b1a0..305280bdd6 100644 --- a/docs/my-website/docs/proxy/configs.md +++ b/docs/my-website/docs/proxy/configs.md @@ -68,6 +68,10 @@ Calling a model group +Sends request to model where `model_name=gpt-3.5-turbo` on config.yaml. + +If multiple with `model_name=gpt-3.5-turbo` does [Load Balancing](https://docs.litellm.ai/docs/proxy/load_balancing) + ```shell curl --location 'http://0.0.0.0:8000/chat/completions' \ --header 'Content-Type: application/json' \ @@ -83,6 +87,26 @@ curl --location 'http://0.0.0.0:8000/chat/completions' \ ' ``` + + + +Sends this request to model where `model_name=bedrock-claude-v1` on config.yaml + +```shell +curl --location 'http://0.0.0.0:8000/chat/completions' \ +--header 'Content-Type: application/json' \ +--data ' { + "model": "bedrock-claude-v1", + "messages": [ + { + "role": "user", + "content": "what llm are you" + } + ], + } +' +``` + ```python @@ -92,7 +116,7 @@ client = openai.OpenAI( base_url="http://0.0.0.0:8000" ) -# request sent to model set on litellm proxy, `litellm --model` +# Sends request to model where `model_name=gpt-3.5-turbo` on config.yaml. response = client.chat.completions.create(model="gpt-3.5-turbo", messages = [ { "role": "user", @@ -102,6 +126,15 @@ response = client.chat.completions.create(model="gpt-3.5-turbo", messages = [ print(response) +# Sends this request to model where `model_name=bedrock-claude-v1` on config.yaml +response = client.chat.completions.create(model="bedrock-claude-v1", messages = [ + { + "role": "user", + "content": "this is a test request, write a short poem" + } +]) + +print(response) ```