Spaces:
Running
Running
| import asyncio | |
| import sys | |
| from pathlib import Path | |
| sys.path.insert(0, str(Path(__file__).parent.parent)) | |
| from agents.base_agent import AgentContext | |
| from agents.claim_verifier_agent import ClaimVerifierAgent | |
| from memory.graph_memory import GraphMemory | |
| from protocols.a2a_protocol import A2AProtocol | |
| from services.lancedb_service import LanceDBService | |
| from services.llm_service import LLMService | |
| from services.mongo_service import MongoService | |
| from services.neo4j_service import Neo4jService | |
| from services.vector_store_service import VectorStoreService | |
| async def main(): | |
| neo4j = Neo4jService() | |
| ctx = AgentContext( | |
| job_id="test_verify_only", | |
| doc_id="doc_65382c73", | |
| pdf_path="test_paper.pdf", | |
| neo4j=neo4j, | |
| mongo=MongoService(), | |
| llm=LLMService(), | |
| embedder=VectorStoreService(), | |
| graph_memory=GraphMemory(neo4j=neo4j, embedder=VectorStoreService(), vector_db=LanceDBService()), | |
| a2a=A2AProtocol(), | |
| ) | |
| ctx.vector_db = LanceDBService() | |
| result = await ClaimVerifierAgent().run(ctx) | |
| print("STATUS:", result.status.value, "| ERROR:", result.error) | |
| if result.data: | |
| print("verified:", result.data.get("verified_count"), | |
| "| supported:", result.data.get("supported"), | |
| "| contradicted:", result.data.get("contradicted"), | |
| "| unverified:", result.data.get("unverified")) | |
| asyncio.run(main()) | |