forked from confident-ai/deepeval
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request confident-ai#1063 from kritinv/fix_red_teamer
red-teaming fix
- Loading branch information
Showing
44 changed files
with
2,826 additions
and
2,576 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,10 @@ | ||
from typing import List, Optional | ||
from pydantic import BaseModel, Field | ||
|
||
|
||
class Opinions(BaseModel): | ||
opinions: List[str] | ||
class Purpose(BaseModel): | ||
purpose: str | ||
|
||
|
||
# BiasMetric runs a similar algorithm to Dbias: https://arxiv.org/pdf/2208.05777.pdf | ||
class BiasVerdict(BaseModel): | ||
verdict: str | ||
reason: Optional[str] = Field(default=None) | ||
|
||
|
||
class Verdicts(BaseModel): | ||
verdicts: List[BiasVerdict] | ||
|
||
|
||
class Reason(BaseModel): | ||
class ReasonScore(BaseModel): | ||
reason: str | ||
score: float |
Oops, something went wrong.