mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-05-20 00:30:10 +02:00
Fixed slack bot auto filters for document sets (#2231)
This commit is contained in:
parent
1bc899cc67
commit
c1c35b00cb
@ -40,6 +40,7 @@ def create_slack_bot_persona(
|
||||
document_set_ids: list[int],
|
||||
existing_persona_id: int | None = None,
|
||||
num_chunks: float = MAX_CHUNKS_FED_TO_CHAT,
|
||||
enable_auto_filters: bool = False,
|
||||
) -> Persona:
|
||||
"""NOTE: does not commit changes"""
|
||||
|
||||
@ -53,7 +54,7 @@ def create_slack_bot_persona(
|
||||
description="",
|
||||
num_chunks=num_chunks,
|
||||
llm_relevance_filter=True,
|
||||
llm_filter_extraction=False,
|
||||
llm_filter_extraction=enable_auto_filters,
|
||||
recency_bias=RecencyBiasSetting.AUTO,
|
||||
prompt_ids=[default_prompt.id],
|
||||
document_set_ids=document_set_ids,
|
||||
|
@ -78,6 +78,8 @@ def retrieval_preprocessing(
|
||||
logger.debug("Persona disables auto detect filters")
|
||||
auto_detect_time_filter = False
|
||||
auto_detect_source_filter = False
|
||||
else:
|
||||
logger.debug("Auto detect filters enabled")
|
||||
|
||||
if (
|
||||
time_filter is not None
|
||||
|
@ -161,6 +161,7 @@ def patch_slack_bot_config(
|
||||
channel_names=channel_config["channel_names"],
|
||||
document_set_ids=slack_bot_config_creation_request.document_sets,
|
||||
existing_persona_id=existing_persona_id,
|
||||
enable_auto_filters=slack_bot_config_creation_request.enable_auto_filters,
|
||||
).id
|
||||
|
||||
slack_bot_config_model = update_slack_bot_config(
|
||||
|
Loading…
x
Reference in New Issue
Block a user