Skip to content

Commit

Permalink
Disable router for now as we only use pubmed / brave
Browse files Browse the repository at this point in the history
  • Loading branch information
ivarflakstad committed Apr 9, 2024
1 parent d255230 commit 7dce5fd
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions backend/app/router/orchestrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from llama_index.llms.together import TogetherLLM

from app.api.common.util import RouteCategory
from app.dspy_integration.router_prompt import RouterModule
from app.rag.reranker.response_reranker import TextEmbeddingInferenceRerankEngine
from app.rag.retrieval.pubmed.pubmedqueryengine import PubmedSearchQueryEngine
from app.rag.retrieval.web.brave_search import BraveSearchQueryEngine
Expand Down Expand Up @@ -38,8 +37,8 @@ def __init__(self, settings: Settings):
api_key=settings.openai.api_key.get_secret_value(),
)
dspy.settings.configure(lm=self.llm)
self.router = RouterModule()
self.router.load(settings.dspy.orchestrator_router_prompt_program)
# self.router = RouterModule()
# self.router.load(settings.dspy.orchestrator_router_prompt_program)

# self.clinical_trial_search = ClinicalTrialText2SQLEngine(settings)
# self.drug_chembl_search = DrugChEMBLText2CypherEngine(settings)
Expand All @@ -64,6 +63,8 @@ async def query_and_get_answer(
f"Orchestrator.query_and_get_answer.router_id search_text: {search_text}"
)

# TODO: Enable once stable and infallible
"""
# initialize router with bad value
router_id = -1
Expand All @@ -79,6 +80,7 @@ async def query_and_get_answer(
stack_info=True,
)
logger.info(f"query_and_get_answer.router_id router_id: {router_id}")
"""

# TODO: Enable once stable and infallible
"""
Expand Down

0 comments on commit 7dce5fd

Please sign in to comment.