Spaces:
Running
Running
Download app/schemas/commit_adaptation.py from SolusOps/study-buddy: direct link, hf CLI and curl.
- Browser
- Download file 1.09 kB
-
https://huggingface.co/spaces/SolusOps/study-buddy/resolve/main/app/schemas/commit_adaptation.py
- Command line
-
hf download hf://spaces/SolusOps/study-buddy/app/schemas/commit_adaptation.py
-
curl -L -o commit_adaptation.py https://huggingface.co/spaces/SolusOps/study-buddy/resolve/main/app/schemas/commit_adaptation.py
1.09 kB
| """Structured-output contract for the Commit-time adaptation reviewer. | |
| See docs/commit-memory-adaptation-architecture.md. The LLM only proposes — | |
| candidate_id, recurrence_key, novelty_key, and authoritative attribution are | |
| all derived deterministically in application code (commit_candidate_adapters.py), | |
| never trusted from model output. | |
| """ | |
| from __future__ import annotations | |
| from typing import Literal | |
| from pydantic import BaseModel, ConfigDict, Field | |
| class InteractionQuote(BaseModel): | |
| model_config = ConfigDict(strict=True, extra="forbid") | |
| interaction_id: str | |
| quote: str | |
| class MemoryProposal(BaseModel): | |
| model_config = ConfigDict(strict=True, extra="forbid") | |
| proposal_id: str | |
| destination: Literal["project", "student"] | |
| kind: str | |
| statement: str | |
| interaction_ids: list[str] | |
| evidence_quotes: list[InteractionQuote] | |
| confidence: float = Field(ge=0.0, le=1.0) | |
| class CommitAdaptationReview(BaseModel): | |
| model_config = ConfigDict(strict=True, extra="forbid") | |
| memory_proposals: list[MemoryProposal] | |
| inferred_persona_text: str | |