Skip to content

Commit

Permalink
v0 litellm
Browse files Browse the repository at this point in the history
  • Loading branch information
ishaan-jaff committed Oct 5, 2023
1 parent cb1d94a commit afde51d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions llmfoundry/models/inference_api_wrapper/openai_causal_lm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit afde51d

Please sign in to comment.