File size: 1,426 Bytes
497f49b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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())