fixed citations when sections selected (#3914)

* removed some dead code and fixed citations when a search request is made with sections selected

* fix black formatting issue
This commit is contained in:
evan-danswer
2025-02-05 14:16:07 -08:00
committed by GitHub
parent b469a7eff4
commit 29f5f4edfa
7 changed files with 12 additions and 48 deletions

View File

@@ -3,6 +3,7 @@ from collections.abc import Sequence
from pydantic import BaseModel
from onyx.chat.models import LlmDoc
from onyx.chat.models import OnyxContext
from onyx.context.search.models import InferenceChunk
@@ -11,7 +12,7 @@ class DocumentIdOrderMapping(BaseModel):
def map_document_id_order(
chunks: Sequence[InferenceChunk | LlmDoc], one_indexed: bool = True
chunks: Sequence[InferenceChunk | LlmDoc | OnyxContext], one_indexed: bool = True
) -> DocumentIdOrderMapping:
order_mapping = {}
current = 1 if one_indexed else 0