Skip to content

Commit 72122a9

Browse files
authored
Merge pull request #268 from krrishdholakia/patch-1
Add support for Bedrock, Huggingface, Replicate, TogetherAI, Azure, Anthropic, etc.
2 parents 8ca8528 + b98777f commit 72122a9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

deepeval/metrics/llm_eval_metric.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from deepeval.types import LLMTestCaseParams
99
from deepeval.chat_completion.retry import call_openai_with_retry
1010
from pydantic import BaseModel
11-
import openai
11+
from litellm import completion, text_completion
1212

1313

1414
class LLMEvalMetricResponse(BaseModel):
@@ -65,7 +65,7 @@ def generate_evaluation_steps(self):
6565
prompt: dict = evaluation_steps_template.format(criteria=self.criteria)
6666

6767
res = call_openai_with_retry(
68-
lambda: openai.ChatCompletion.create(
68+
lambda: completion(
6969
model=self.model,
7070
messages=[
7171
{
@@ -92,7 +92,7 @@ def evaluate(self, test_case: LLMTestCase):
9292
)
9393

9494
res = call_openai_with_retry(
95-
lambda: openai.ChatCompletion.create(
95+
lambda: completion(
9696
model=self.model,
9797
messages=[{"role": "system", "content": prompt}],
9898
max_tokens=5,

0 commit comments

Comments
 (0)