mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-03 13:19:16 +00:00
Give more readable name to document search tool
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user