From 68d994f9805b3983f06ea2d8b75ef8b051f2d936 Mon Sep 17 00:00:00 2001 From: ishaan-jaff Date: Fri, 8 Sep 2023 14:01:19 -0700 Subject: [PATCH] docs update --- docs/my-website/docs/providers/vllm.md | 21 ++++++++++++++++++++- pyproject.toml | 2 +- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/docs/my-website/docs/providers/vllm.md b/docs/my-website/docs/providers/vllm.md index 30d60dccf..c755afc2f 100644 --- a/docs/my-website/docs/providers/vllm.md +++ b/docs/my-website/docs/providers/vllm.md @@ -8,7 +8,7 @@ LiteLLM supports all models on VLLM. ``` pip install litellm vllm ``` -``` +```python import litellm response = completion( @@ -20,6 +20,25 @@ response = completion( print(response) ``` +#### Calling hosted VLLM Server +In order to use litellm to call a hosted vllm server add the following to your completion call + +* `custom_llm_provider == "openai"` +* `api_base = "your-hosted-vllm-server/v1"` + +```python +import litellm + +response = completion( + model="vllm/facebook/opt-125m", + messages=messages, + temperature=0.2, + max_tokens=80) + +print(response) +``` + + ### Batch Completion ``` diff --git a/pyproject.toml b/pyproject.toml index 7055b6572..d2e1e5b25 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "litellm" -version = "0.1.562" +version = "0.1.563" description = "Library to easily interface with LLM API providers" authors = ["BerriAI"] license = "MIT License"