Spaces:
Paused
Paused
Download src/models.py from zaid646/llm-evaluator: direct link, hf CLI and curl.
- Browser
- Download file 862 Bytes
-
https://huggingface.co/spaces/zaid646/llm-evaluator/resolve/main/src/models.py
- Command line
-
hf download hf://spaces/zaid646/llm-evaluator/src/models.py
-
curl -L -o models.py https://huggingface.co/spaces/zaid646/llm-evaluator/resolve/main/src/models.py
862 Bytes
| from pydantic import BaseModel | |
| class EvalSample(BaseModel): | |
| id: str | |
| prompt: str | |
| expected_answer: str | |
| class TargetResponse(BaseModel): | |
| output: str | |
| error: str | None = None | |
| success: bool = False | |
| latency_ms: float = 0.0 | |
| tokens_used: int = 0 | |
| class JudgeScore(BaseModel): | |
| relevance: int | |
| hallucination: int | |
| toxicity: int | |
| reasoning: str | |
| class RunRecord(BaseModel): | |
| sample_id: str | |
| prompt: str | |
| expected_answer: str | |
| target_output: str | None = None | |
| target_error: str | None = None | |
| target_success: bool = False | |
| target_latency_ms: float = 0.0 | |
| target_tokens: int = 0 | |
| relevance: int | None = None | |
| hallucination: int | None = None | |
| toxicity: int | None = None | |
| reasoning: str | None = None | |
| judge_latency_ms: float = 0.0 | |
| judge_tokens: int = 0 | |
| passed: bool = False | |