Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ transformers = "^4.31.0"
sentence-transformers = "^2.2.2"
zstd = "^1.5.5.1"
openai = "^0.27.8"
litellm = "^0.1.400"
numpy = "^1.20"
nltk = "^3.8.1"
rank-bm25 = "^0.2.2"
Expand Down
3 changes: 2 additions & 1 deletion retrieval_qa_benchmark/models/openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from typing import Any, Dict, Optional

import openai
import litellm

from retrieval_qa_benchmark.schema import BaseLLM, BaseLLMOutput
from retrieval_qa_benchmark.utils.registry import REGISTRY
Expand Down Expand Up @@ -79,7 +80,7 @@ def _generate(
self,
text: str = "",
) -> BaseLLMOutput:
completion = openai.ChatCompletion.create(
completion = litellm.completion(
model=self.name,
messages=[
{"role": "system", "content": self.system_prompt},
Expand Down