Give more readable name to document search tool

This commit is contained in:
Debanjum
2025-06-04 18:38:52 -07:00
parent 38fa34a861
commit 1dbe60a8a2
3 changed files with 5 additions and 5 deletions

View File

@@ -357,7 +357,7 @@ def set_user_name(
return {"status": "ok"}
async def extract_references_and_questions(
async def search_documents(
user: KhojUser,
chat_history: list[ChatMessageModel],
q: str,

View File

@@ -40,7 +40,7 @@ from khoj.processor.tools.online_search import (
search_online,
)
from khoj.processor.tools.run_code import run_code
from khoj.routers.api import extract_references_and_questions
from khoj.routers.api import search_documents
from khoj.routers.email import send_query_feedback
from khoj.routers.helpers import (
ApiImageRateLimiter,
@@ -1161,7 +1161,7 @@ async def chat(
## Extract Document References
if not ConversationCommand.Research in conversation_commands:
try:
async for result in extract_references_and_questions(
async for result in search_documents(
user,
chat_history,
q,

View File

@@ -22,7 +22,7 @@ from khoj.processor.conversation.utils import (
from khoj.processor.operator import operate_environment
from khoj.processor.tools.online_search import read_webpages, search_online
from khoj.processor.tools.run_code import run_code
from khoj.routers.api import extract_references_and_questions
from khoj.routers.api import search_documents
from khoj.routers.helpers import (
ChatEvent,
generate_summary_from_files,
@@ -313,7 +313,7 @@ async def research(
previous_inferred_queries = {
c["query"] for iteration in previous_iterations if iteration.context for c in iteration.context
}
async for result in extract_references_and_questions(
async for result in search_documents(
user,
construct_tool_chat_history(previous_iterations, ConversationCommand.Notes),
this_iteration.query,