update reseacher agents

This commit is contained in:
CREDO23 2025-08-04 00:59:56 +02:00
parent e17d969087
commit ad951d45da
3 changed files with 28 additions and 0 deletions

View file

@ -988,6 +988,32 @@ async def fetch_relevant_documents(
)
}
)
elif connector == "GOOGLE_GMAIL_CONNECTOR":
(
source_object,
gmail_chunks,
) = await connector_service.search_google_gmail(
user_query=reformulated_query,
user_id=user_id,
search_space_id=search_space_id,
top_k=top_k,
search_mode=search_mode,
)
# Add to sources and raw documents
if source_object:
all_sources.append(source_object)
all_raw_documents.extend(gmail_chunks)
# Stream found document count
if streaming_service and writer:
writer(
{
"yield_value": streaming_service.format_terminal_info_delta(
f"📧 Found {len(gmail_chunks)} Gmail messages related to your query"
)
}
)
elif connector == "CONFLUENCE_CONNECTOR":
(
source_object,