mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-08 15:22:39 +02:00
feat: test script of new agent
This commit is contained in:
parent
e48aa3f1c7
commit
c6cc7c2a6a
14 changed files with 5079 additions and 2923 deletions
|
|
@ -1163,6 +1163,33 @@ async def fetch_relevant_documents(
|
|||
}
|
||||
)
|
||||
|
||||
elif connector == "BOOKSTACK_CONNECTOR":
|
||||
(
|
||||
source_object,
|
||||
bookstack_chunks,
|
||||
) = await connector_service.search_bookstack(
|
||||
user_query=reformulated_query,
|
||||
search_space_id=search_space_id,
|
||||
top_k=top_k,
|
||||
start_date=start_date,
|
||||
end_date=end_date,
|
||||
)
|
||||
|
||||
# Add to sources and raw documents
|
||||
if source_object:
|
||||
all_sources.append(source_object)
|
||||
all_raw_documents.extend(bookstack_chunks)
|
||||
|
||||
# Stream found document count
|
||||
if streaming_service and writer:
|
||||
writer(
|
||||
{
|
||||
"yield_value": streaming_service.format_terminal_info_delta(
|
||||
f"📚 Found {len(bookstack_chunks)} BookStack pages related to your query"
|
||||
)
|
||||
}
|
||||
)
|
||||
|
||||
elif connector == "NOTE":
|
||||
(
|
||||
source_object,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue