Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Oct 20, 2024
1 parent 86da32c commit 3dca8d5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion evals/evaluation/deepeval/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,17 @@ from deepeval import assert_test
from deepeval.metrics import AnswerRelevancyMetric
from deepeval.test_case import LLMTestCase


def test_case():
from evals.evaluation.deepeval.models.endpoint_models import TGIEndpointModel

endpoint = TGIEndpointModel(model="http://localhost:{your_llm_port}/generate")
answer_relevancy_metric = AnswerRelevancyMetric(threshold=0.5, model=endpoint)
test_case = LLMTestCase(
input="What if these shoes don't fit?",
# Replace this with the actual output from your LLM application
actual_output="We offer a 30-day full refund at no extra costs.",
retrieval_context=["All customers are eligible for a 30 day full refund at no extra costs."]
retrieval_context=["All customers are eligible for a 30 day full refund at no extra costs."],
)
assert_test(test_case, [answer_relevancy_metric])
```
Expand Down

0 comments on commit 3dca8d5

Please sign in to comment.