mirror of
https://github.com/imartinez/privateGPT.git
synced 2025-08-23 17:49:38 +00:00
Updated settings in vector and chat service per Ivans request
This commit is contained in:
parent
5fcca04256
commit
335df17cb8
@ -135,7 +135,6 @@ class VectorStoreComponent:
|
|||||||
similarity_top_k: int = 2,
|
similarity_top_k: int = 2,
|
||||||
) -> VectorIndexRetriever:
|
) -> VectorIndexRetriever:
|
||||||
# This way we support qdrant (using doc_ids) and the rest (using filters)
|
# This way we support qdrant (using doc_ids) and the rest (using filters)
|
||||||
similarity_top_k = self.settings.rag.similarity_top_k
|
|
||||||
return VectorIndexRetriever(
|
return VectorIndexRetriever(
|
||||||
index=index,
|
index=index,
|
||||||
similarity_top_k=similarity_top_k,
|
similarity_top_k=similarity_top_k,
|
||||||
|
@ -109,7 +109,7 @@ class ChatService:
|
|||||||
settings = self.settings
|
settings = self.settings
|
||||||
if use_context:
|
if use_context:
|
||||||
vector_index_retriever = self.vector_store_component.get_retriever(
|
vector_index_retriever = self.vector_store_component.get_retriever(
|
||||||
index=self.index, context_filter=context_filter
|
index=self.index, context_filter=context_filter, similarity_top_k=self.settings.rag.similarity_top_k,
|
||||||
)
|
)
|
||||||
return ContextChatEngine.from_defaults(
|
return ContextChatEngine.from_defaults(
|
||||||
system_prompt=system_prompt,
|
system_prompt=system_prompt,
|
||||||
|
Loading…
Reference in New Issue
Block a user