From 2afdf34a9f4822987b84d7a24a7f51e723e368cc Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Sat, 20 Apr 2024 08:47:22 -0700 Subject: [PATCH] docs(quick_start.md): add example of using proxy with litellm sdk --- docs/my-website/docs/proxy/quick_start.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/docs/my-website/docs/proxy/quick_start.md b/docs/my-website/docs/proxy/quick_start.md index a7ca4743b..69712e46a 100644 --- a/docs/my-website/docs/proxy/quick_start.md +++ b/docs/my-website/docs/proxy/quick_start.md @@ -283,6 +283,27 @@ response = client.chat.completions.create(model="gpt-3.5-turbo", messages = [ print(response) +``` + + + +```python +from litellm import completion + +response = completion( + model="openai/gpt-3.5-turbo", + messages = [ + { + "role": "user", + "content": "this is a test request, write a short poem" + } + ], + api_key="anything", + base_url="http://0.0.0.0:4000" + ) + +print(response) + ```