From 7c0ef9e58dd74694d508d5aee3a805a73ecb37a9 Mon Sep 17 00:00:00 2001 From: Ivan Vykopal Date: Sat, 14 Dec 2024 18:51:02 +0100 Subject: [PATCH 1/2] fix: Fix vllm import --- litellm/llms/vllm/completion/handler.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/litellm/llms/vllm/completion/handler.py b/litellm/llms/vllm/completion/handler.py index b2371ffca3c0..217319a17178 100644 --- a/litellm/llms/vllm/completion/handler.py +++ b/litellm/llms/vllm/completion/handler.py @@ -29,8 +29,7 @@ def __init__(self, status_code, message): def validate_environment(model: str): global llm try: - from litellm.llms.vllm.completion.handler import LLM # type: ignore - from litellm.llms.vllm.completion.handler import SamplingParams # type: ignore + from vllm import LLM, SamplingParams if llm is None: llm = LLM(model=model) From 6477029843168c20d8486b282026cc689d037fc5 Mon Sep 17 00:00:00 2001 From: Ivan Vykopal Date: Sat, 14 Dec 2024 19:14:02 +0100 Subject: [PATCH 2/2] Update handler.py --- litellm/llms/vllm/completion/handler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litellm/llms/vllm/completion/handler.py b/litellm/llms/vllm/completion/handler.py index 217319a17178..f8f1e54a1fa5 100644 --- a/litellm/llms/vllm/completion/handler.py +++ b/litellm/llms/vllm/completion/handler.py @@ -29,7 +29,7 @@ def __init__(self, status_code, message): def validate_environment(model: str): global llm try: - from vllm import LLM, SamplingParams + from vllm import LLM, SamplingParams # type: ignore if llm is None: llm = LLM(model=model)