mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-03-26 17:51:54 +01:00
minor update to typing
This commit is contained in:
parent
516f1840ce
commit
341bf26ff2
@ -415,8 +415,6 @@ def update_loop(
|
||||
for tenant_id in tenants:
|
||||
try:
|
||||
logger.debug(f"Processing tenant: {tenant_id}")
|
||||
|
||||
# Existing Dask clients
|
||||
with Session(get_sqlalchemy_engine(schema=tenant_id)) as db_session:
|
||||
try:
|
||||
check_index_swap(db_session)
|
||||
|
@ -10,8 +10,6 @@ class RecencyBiasSetting(str, Enum):
|
||||
NO_DECAY = "no_decay"
|
||||
# Determine based on query if to use base_decay or favor_recent
|
||||
AUTO = "auto"
|
||||
auto = "auto"
|
||||
|
||||
|
||||
class OptionalSearchSetting(str, Enum):
|
||||
ALWAYS = "always"
|
||||
|
@ -166,7 +166,7 @@ class SearchQuery(ChunkContext):
|
||||
num_hits: int = NUM_RETURNED_HITS
|
||||
offset: int = 0
|
||||
model_config = ConfigDict(frozen=True)
|
||||
|
||||
|
||||
|
||||
class RetrievalDetails(ChunkContext):
|
||||
# Use LLM to determine whether to do a retrieval or only rely on existing history
|
||||
|
@ -152,6 +152,7 @@ def retrieval_preprocessing(
|
||||
user_acl_filters = (
|
||||
None if bypass_acl else build_access_filters_for_user(user, db_session)
|
||||
)
|
||||
|
||||
final_filters = IndexFilters(
|
||||
source_type=preset_filters.source_type or predicted_source_filters,
|
||||
document_set=preset_filters.document_set,
|
||||
|
@ -40,6 +40,7 @@ from danswer.server.query_and_chat.models import SourceTag
|
||||
from danswer.server.query_and_chat.models import TagResponse
|
||||
from danswer.server.query_and_chat.token_limit import check_token_rate_limits
|
||||
from danswer.utils.logger import setup_logger
|
||||
from danswer.db.engine import get_current_tenant_id
|
||||
|
||||
logger = setup_logger()
|
||||
|
||||
@ -52,6 +53,7 @@ def admin_search(
|
||||
question: AdminSearchRequest,
|
||||
user: User | None = Depends(current_curator_or_admin_user),
|
||||
db_session: Session = Depends(get_session),
|
||||
tenant_id: str | None = Depends(get_current_tenant_id),
|
||||
) -> AdminSearchResponse:
|
||||
query = question.query
|
||||
logger.notice(f"Received admin search query: {query}")
|
||||
@ -62,6 +64,7 @@ def admin_search(
|
||||
time_cutoff=question.filters.time_cutoff,
|
||||
tags=question.filters.tags,
|
||||
access_control_list=user_acl_filters,
|
||||
tenant_id=tenant_id,
|
||||
)
|
||||
search_settings = get_current_search_settings(db_session)
|
||||
document_index = get_default_document_index(
|
||||
|
@ -100,6 +100,7 @@ export default async function RootLayout({
|
||||
<body className={`relative ${inter.variable} font-sans`}>
|
||||
<div
|
||||
className={`text-default bg-background ${
|
||||
// TODO: remove this once proper dark mode exists
|
||||
process.env.THEME_IS_DARK?.toLowerCase() === "true" ? "dark" : ""
|
||||
}`}
|
||||
>
|
||||
|
Loading…
x
Reference in New Issue
Block a user