fix: minor ui inconsistencies

This commit is contained in:
Siddhant Rai
2024-09-03 16:11:24 +05:30
parent c4cb9b07cb
commit 28e06fa684
6 changed files with 109 additions and 66 deletions

View File

@@ -61,13 +61,12 @@ class ClassicRAG(BaseRetriever):
settings.VECTOR_STORE, self.vectorstore, settings.EMBEDDINGS_KEY
)
docs_temp = docsearch.search(self.question, k=self.chunks)
print(docs_temp)
docs = [
{
"title": (
i.metadata["title"].split("/")[-1]
if i.metadata
else i.page_content
),
"title": i.metadata.get(
"title", i.metadata.get("post_title", i.page_content)
).split("/")[-1],
"text": i.page_content,
"source": (
i.metadata.get("source")