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).
30 lines
831 B
Python
30 lines
831 B
Python
from itertools import islice
|
|
from ..utils import check_pkg
|
|
|
|
|
|
class Duckduckgo:
|
|
"""
|
|
Duckduckgo API Retriever
|
|
"""
|
|
def __init__(self, query, query_domains=None):
|
|
check_pkg('ddgs')
|
|
from ddgs import DDGS
|
|
self.ddg = DDGS()
|
|
self.query = query
|
|
self.query_domains = query_domains or None
|
|
|
|
def search(self, max_results=5):
|
|
"""
|
|
Performs the search
|
|
:param query:
|
|
:param max_results:
|
|
:return:
|
|
"""
|
|
# TODO: Add support for query domains
|
|
try:
|
|
search_response = self.ddg.text(self.query, region='wt-wt', max_results=max_results)
|
|
except Exception as e:
|
|
print(f"Error: {e}. Failed fetching sources. Resulting in empty response.")
|
|
search_response = []
|
|
return search_response
|