Spaces:
Build error
Build error
Commit History
-
fix: apply lazy init pattern and pydantic-ai fixes to ReportAgent (#12)β
Applies the same fixes as Phase 7 HypothesisAgent: - Lazy initialization via _get_agent() to avoid API key requirement at import - Use output_type instead of result_type (pydantic-ai API) - Use result.output instead of result.data - Fix line length issues in tests - Proper mocking of get_model in tests3139749 -
fix: address CodeRabbit Phase 7 review feedbackβ
- Lazy initialize HypothesisAgent's pydantic-ai Agent to avoid requiring API keys at import time (fixes CI failure) - Add explicit default=None to primary_hypothesis field for Pydantic v2 compliancebc74531 -
feat(phase7): implement Hypothesis Agent for mechanistic reasoningβ
Add HypothesisAgent that generates Drug β Target β Pathway β Effect hypotheses based on collected evidence. Key features: Models: - MechanismHypothesis: structured hypothesis with confidence scoring - HypothesisAssessment: container for hypotheses with knowledge gaps Utilities: - MMR (Maximal Marginal Relevance) for diverse evidence selection - Sentence-aware truncation for clean text processing Agent: - HypothesisAgent generates 2-4 testable hypotheses per query - Integrated with EmbeddingService for semantic evidence selection Orchestrator: - Refactored MagenticOrchestrator into smaller methods - Added "hypothesizing" event type for UI feedback - Workflow: Search β Hypothesize β Targeted Search β Judge Tests: 53/53 passing, mypy clean, ruff cleanc690006 -
fix(phase6): critical fixes from senior auditβ
- Fix Dockerfile cache ownership (run model download as appuser) - Store full citation metadata in vector DB (title, date, authors) - Remove fragile locals() hack in search_agent.py - Add try/except in deduplicate loop for resilience - Document threshold semantics (cosine distance math) - Clean up redundant list() calls59afc84 -
feat(phase6): Embeddings & Semantic Search implementationβ
- Added EmbeddingService with ChromaDB and SentenceTransformers - Updated SearchAgent to support semantic deduplication and search - Updated MagenticOrchestrator to use embeddings if available - Added 100% async-safe implementation with run_in_executor - Added comprehensive unit tests3bacbf8 -
fix(phase5): align configs and add agent testsβ
- Add PLR0912, PLC0415 to ruff ignore list for complex orchestrator logic - Disable warn_unused_ignores in mypy (vendored lib needs type: ignore) - Fix single ChatMessage input handling in SearchAgent/JudgeAgent - Add comprehensive unit tests for SearchAgent and JudgeAgent wrappers - All 38 tests pass, lint and mypy clean, pre-commit aligned15459e9 -
fix: linting and types for phase 5
1922dbd