mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-09-19 12:03:54 +02:00
Initial document display
This commit is contained in:
@@ -90,7 +90,7 @@ def get_application() -> FastAPI:
|
||||
)
|
||||
|
||||
@application.on_event("startup")
|
||||
async def startup_event() -> None:
|
||||
def startup_event() -> None:
|
||||
from danswer.semantic_search.semantic_search import (
|
||||
warm_up_models,
|
||||
) # To avoid circular imports
|
||||
|
@@ -81,7 +81,7 @@ async def promote_admin(
|
||||
|
||||
|
||||
@router.get("/direct-qa", response_model=QAResponse)
|
||||
def direct_qa(question: QAQuestion):
|
||||
def direct_qa(question: QAQuestion = Depends()):
|
||||
start_time = time.time()
|
||||
|
||||
query = question.query
|
||||
@@ -104,7 +104,7 @@ def direct_qa(question: QAQuestion):
|
||||
|
||||
|
||||
@router.get("/stream-direct-qa")
|
||||
def stream_direct_qa(question: QAQuestion):
|
||||
def stream_direct_qa(question: QAQuestion = Depends()):
|
||||
top_documents_key = "top_documents"
|
||||
answer_key = "answer"
|
||||
quotes_key = "quotes"
|
||||
@@ -147,7 +147,7 @@ def stream_direct_qa(question: QAQuestion):
|
||||
|
||||
|
||||
@router.get("/keyword-search", response_model=KeywordResponse)
|
||||
def keyword_search(question: QAQuestion):
|
||||
def keyword_search(question: QAQuestion = Depends()):
|
||||
ts_client = TSClient.get_instance()
|
||||
query = question.query
|
||||
collection = question.collection
|
||||
|
Reference in New Issue
Block a user