Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge from main. #20

Merged
merged 19 commits into from
Dec 13, 2023
Merged
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
2 changes: 1 addition & 1 deletion deepeval/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__: str = "0.20.30"
__version__: str = "0.20.33"
3 changes: 3 additions & 0 deletions deepeval/evaluate.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class TestResult:
actual_output: str
expected_output: str
context: List[str]
retrieval_context: List[str]


def create_test_result(
Expand All @@ -37,6 +38,7 @@ def create_test_result(
actual_output=test_case.actual_output,
expected_output=test_case.expected_output,
context=test_case.context,
retrieval_context=test_case.retrieval_context,
)
else:
raise ValueError("TestCase not supported yet.")
Expand Down Expand Up @@ -139,3 +141,4 @@ def print_test_result(test_result: TestResult):
print(f" - actual output: {test_result.actual_output}")
print(f" - expected output: {test_result.expected_output}")
print(f" - context: {test_result.context}")
print(f" - retrieval context: {test_result.retrieval_context}")
2 changes: 2 additions & 0 deletions deepeval/test_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ class APITestCase(BaseModel):
run_duration: float = Field(..., alias="runDuration")
traceStack: Optional[dict] = Field(None)
context: Optional[list] = Field(None)
retrieval_context: Optional[list] = Field(None, alias="retrievalContext")
id: Optional[str] = None


Expand Down Expand Up @@ -133,6 +134,7 @@ def add_llm_test_case(
metricsMetadata=[metrics_metadata],
runDuration=run_duration,
context=test_case.context,
retrievalContext=test_case.retrieval_context,
traceStack=get_trace_stack(),
id=test_case.id,
)
Expand Down
352 changes: 0 additions & 352 deletions docs/docs/evaluation-metrics.mdx

This file was deleted.

Loading