Builds PaperTrail from the base skeleton into a full evidence-verification platform for the "Built with Claude: Life Sciences" hackathon (Builder Track). New named-user features (Build Beyond the Bench): - Lab Notebook Companion — rough bench notes -> structured, searchable, grounded experiment records (lib/labNotebook, /console/lab-notebook, migration 0059) - Clinical Trial Matcher — de-identified patient notes -> ranked eligible ClinicalTrials.gov trials with per-criterion inclusion/exclusion reasoning (lib/trialMatcher, /console/trial-matcher, migrations 0060) Platform: - Deterministic verification moat (biostats recompute, exact-span grounding) - 11 biomedical evidence engines (FAERS, GWAS, Open Targets, ChEMBL, ClinVar, PharmGKB, PubTator, DDI, repurposing, biomarker, unified verifier) - Evidence Intelligence (KG, dossier, provenance/export, RWE) + enterprise governance (RBAC, /api/v1 gateway, metering, audit chain, retention) - 17 OSS projects assimilated into native TypeScript on our stack (backend/engines retained + credited in NOTICE) - Multi-format upload (PDF/DOCX/XLSX/CSV/MD/TXT), logo, marketing site - Next.js 16 upgrade, benchmark harness (honest smoke-test caveat) Licensing: Apache-2.0 (LICENSE + NOTICE).
49 lines
1.7 KiB
Python
49 lines
1.7 KiB
Python
import asyncio
|
|
from dotenv import load_dotenv
|
|
from gpt_researcher.config.config import Config
|
|
from gpt_researcher.actions.retriever import get_retrievers
|
|
from gpt_researcher.skills.researcher import ResearchConductor
|
|
import pprint
|
|
# Load environment variables from .env file
|
|
load_dotenv()
|
|
|
|
async def test_scrape_data_by_query():
|
|
# Initialize the Config object
|
|
config = Config()
|
|
|
|
# Retrieve the retrievers based on the current configuration
|
|
retrievers = get_retrievers({}, config)
|
|
print("Retrievers:", retrievers)
|
|
|
|
# Create a mock researcher object with necessary attributes
|
|
class MockResearcher:
|
|
def init(self):
|
|
self.retrievers = retrievers
|
|
self.cfg = config
|
|
self.verbose = True
|
|
self.websocket = None
|
|
self.scraper_manager = None # Mock or implement scraper manager
|
|
self.vector_store = None # Mock or implement vector store
|
|
|
|
researcher = MockResearcher()
|
|
research_conductor = ResearchConductor(researcher)
|
|
# print('research_conductor',dir(research_conductor))
|
|
# print('MockResearcher',dir(researcher))
|
|
# Define a sub-query to test
|
|
sub_query = "design patterns for autonomous ai agents"
|
|
|
|
# Iterate through all retrievers
|
|
for retriever_class in retrievers:
|
|
# Instantiate the retriever with the sub-query
|
|
retriever = retriever_class(sub_query)
|
|
|
|
# Perform the search using the current retriever
|
|
search_results = await asyncio.to_thread(
|
|
retriever.search, max_results=10
|
|
)
|
|
|
|
print("\033[35mSearch results:\033[0m")
|
|
pprint.pprint(search_results, indent=4, width=80)
|
|
|
|
if __name__ == "__main__":
|
|
asyncio.run(test_scrape_data_by_query()) |