mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-04-29 12:10:57 +00:00
rag tool progress and optimization
This commit is contained in:
parent
602d60cc8f
commit
11f7c6009f
2 changed files with 43 additions and 14 deletions
|
|
@ -10,7 +10,15 @@ class DocumentQueryTool(Tool):
|
|||
if not isinstance(document_uri, str) or not document_uri:
|
||||
return Response(message="Error: no document provided", break_loop=False)
|
||||
try:
|
||||
helper = DocumentQueryHelper(self.agent)
|
||||
|
||||
progress = []
|
||||
|
||||
# logging callback
|
||||
def progress_callback(msg):
|
||||
progress.append(msg)
|
||||
self.log.update(progress="\n".join(progress))
|
||||
|
||||
helper = DocumentQueryHelper(self.agent, progress_callback)
|
||||
if not queries:
|
||||
content = await helper.document_get_content(document_uri)
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue