File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 8
8
from deepeval .types import LLMTestCaseParams
9
9
from deepeval .chat_completion .retry import call_openai_with_retry
10
10
from pydantic import BaseModel
11
- import openai
11
+ from litellm import completion , text_completion
12
12
13
13
14
14
class LLMEvalMetricResponse (BaseModel ):
@@ -65,7 +65,7 @@ def generate_evaluation_steps(self):
65
65
prompt : dict = evaluation_steps_template .format (criteria = self .criteria )
66
66
67
67
res = call_openai_with_retry (
68
- lambda : openai . ChatCompletion . create (
68
+ lambda : completion (
69
69
model = self .model ,
70
70
messages = [
71
71
{
@@ -92,7 +92,7 @@ def evaluate(self, test_case: LLMTestCase):
92
92
)
93
93
94
94
res = call_openai_with_retry (
95
- lambda : openai . ChatCompletion . create (
95
+ lambda : completion (
96
96
model = self .model ,
97
97
messages = [{"role" : "system" , "content" : prompt }],
98
98
max_tokens = 5 ,
You can’t perform that action at this time.
0 commit comments