Spaces:
Sleeping
Sleeping
Download agents/consistency.py from DerXanity/farient-deckcheck: direct link, hf CLI and curl.
- Browser
- Download file 1.24 kB
-
https://huggingface.co/spaces/DerXanity/farient-deckcheck/resolve/main/agents/consistency.py
- Command line
-
hf download hf://spaces/DerXanity/farient-deckcheck/agents/consistency.py
-
curl -L -o consistency.py https://huggingface.co/spaces/DerXanity/farient-deckcheck/resolve/main/agents/consistency.py
1.24 kB
| """Deck Consistency Agent — cross-slide drift reviewer. | |
| Tools are intentionally narrower than the Slide Reviewer: this agent works | |
| across slides and does not need image / palette / confidentiality probes. | |
| """ | |
| from __future__ import annotations | |
| import os | |
| from agents import Agent | |
| from agents._prompt_loader import load_prompt | |
| from agents.context import AuditContext | |
| from agents.output_schemas import DeckFindings | |
| from agents.tools import ( | |
| get_rubric_section, | |
| get_slide_text, | |
| list_slide_summaries, | |
| ) | |
| def _model_name() -> str: | |
| """Return the OpenAI model for cross-slide consistency review. | |
| The deck-consistency pass reasons across the whole deck so it benefits | |
| from a stronger model. Defaults to ``gpt-4o``; override with | |
| ``OPENAI_MODEL_DECK`` (or the legacy ``OPENAI_MODEL``). | |
| """ | |
| return ( | |
| os.environ.get("OPENAI_MODEL_DECK") | |
| or os.environ.get("OPENAI_MODEL") | |
| or "gpt-4o" | |
| ) | |
| deck_consistency: Agent[AuditContext] = Agent[AuditContext]( | |
| name="Deck Consistency", | |
| instructions=load_prompt("consistency"), | |
| model=_model_name(), | |
| tools=[ | |
| list_slide_summaries, | |
| get_slide_text, | |
| get_rubric_section, | |
| ], | |
| output_type=DeckFindings, | |
| ) | |