Provide Additional Context for Chunk Options in APIs (#1330)

This commit is contained in:
Yuhong Sun
2024-04-14 18:32:22 -07:00
committed by GitHub
parent b9b1e22fac
commit a17060af5a
31 changed files with 421 additions and 147 deletions

View File

@ -8,8 +8,8 @@ from typing import TextIO
from sqlalchemy.orm import Session
from danswer.db.engine import get_sqlalchemy_engine
from danswer.indexing.models import InferenceChunk
from danswer.llm.answering.doc_pruning import reorder_docs
from danswer.search.models import InferenceChunk
from danswer.search.models import RerankMetricsContainer
from danswer.search.models import RetrievalMetricsContainer
from danswer.search.models import SearchRequest
@ -92,7 +92,7 @@ def get_search_results(
rerank_metrics_callback=rerank_metrics.record_metric,
)
top_chunks = search_pipeline.reranked_docs
top_chunks = search_pipeline.reranked_chunks
llm_chunk_selection = search_pipeline.chunk_relevance_list
return (

View File

@ -2,13 +2,13 @@ import textwrap
import unittest
from danswer.configs.constants import DocumentSource
from danswer.indexing.models import InferenceChunk
from danswer.llm.answering.stream_processing.quotes_processing import (
match_quotes_to_docs,
)
from danswer.llm.answering.stream_processing.quotes_processing import (
separate_answer_quotes,
)
from danswer.search.models import InferenceChunk
class TestQAPostprocessing(unittest.TestCase):