From afde51d36df23a2533189bc1eef5b87853711d14 Mon Sep 17 00:00:00 2001 From: ishaan-jaff Date: Thu, 5 Oct 2023 14:51:42 -0700 Subject: [PATCH] v0 litellm --- .../models/inference_api_wrapper/openai_causal_lm.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/llmfoundry/models/inference_api_wrapper/openai_causal_lm.py b/llmfoundry/models/inference_api_wrapper/openai_causal_lm.py index 609112b944..464c8d0153 100644 --- a/llmfoundry/models/inference_api_wrapper/openai_causal_lm.py +++ b/llmfoundry/models/inference_api_wrapper/openai_causal_lm.py @@ -81,14 +81,14 @@ class OpenAIChatAPIEvalWrapper(OpenAIEvalInterface): def __init__(self, model_cfg: Dict, tokenizer: AutoTokenizer) -> None: super().__init__(model_cfg, tokenizer) try: - import openai + import litellm except ImportError as e: raise MissingConditionalImportError( - extra_deps_group='openai', - conda_package='openai', + extra_deps_group='litellm', + conda_package='litellm', conda_channel='conda-forge') from e - self.generate_completion = lambda prompt, num_tokens: openai.ChatCompletion.create( + self.generate_completion = lambda prompt, num_tokens: litellm.completion( self.model_name, messages=[{ 'role': 'user',