Fix vllm import (#7224)

* fix: Fix vllm import

* Update handler.py
This commit is contained in:
Ivan Vykopal 2024-12-15 00:57:49 +01:00 committed by GitHub
parent 222dad27d7
commit 553453daa9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -29,8 +29,7 @@ class VLLMError(Exception):
def validate_environment(model: str): def validate_environment(model: str):
global llm global llm
try: try:
from litellm.llms.vllm.completion.handler import LLM # type: ignore from vllm import LLM, SamplingParams # type: ignore
from litellm.llms.vllm.completion.handler import SamplingParams # type: ignore
if llm is None: if llm is None:
llm = LLM(model=model) llm = LLM(model=model)