vectara-agentic 0.2.23__tar.gz → 0.2.24__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {vectara_agentic-0.2.23/vectara_agentic.egg-info → vectara_agentic-0.2.24}/PKG-INFO +1 -1
- {vectara_agentic-0.2.23 → vectara_agentic-0.2.24}/vectara_agentic/_version.py +1 -1
- {vectara_agentic-0.2.23 → vectara_agentic-0.2.24}/vectara_agentic/db_tools.py +1 -1
- {vectara_agentic-0.2.23 → vectara_agentic-0.2.24}/vectara_agentic/tools.py +18 -2
- {vectara_agentic-0.2.23 → vectara_agentic-0.2.24/vectara_agentic.egg-info}/PKG-INFO +1 -1
- {vectara_agentic-0.2.23 → vectara_agentic-0.2.24}/LICENSE +0 -0
- {vectara_agentic-0.2.23 → vectara_agentic-0.2.24}/MANIFEST.in +0 -0
- {vectara_agentic-0.2.23 → vectara_agentic-0.2.24}/README.md +0 -0
- {vectara_agentic-0.2.23 → vectara_agentic-0.2.24}/requirements.txt +0 -0
- {vectara_agentic-0.2.23 → vectara_agentic-0.2.24}/setup.cfg +0 -0
- {vectara_agentic-0.2.23 → vectara_agentic-0.2.24}/setup.py +0 -0
- {vectara_agentic-0.2.23 → vectara_agentic-0.2.24}/tests/__init__.py +0 -0
- {vectara_agentic-0.2.23 → vectara_agentic-0.2.24}/tests/endpoint.py +0 -0
- {vectara_agentic-0.2.23 → vectara_agentic-0.2.24}/tests/test_agent.py +0 -0
- {vectara_agentic-0.2.23 → vectara_agentic-0.2.24}/tests/test_agent_planning.py +0 -0
- {vectara_agentic-0.2.23 → vectara_agentic-0.2.24}/tests/test_agent_type.py +0 -0
- {vectara_agentic-0.2.23 → vectara_agentic-0.2.24}/tests/test_api_endpoint.py +0 -0
- {vectara_agentic-0.2.23 → vectara_agentic-0.2.24}/tests/test_bedrock.py +0 -0
- {vectara_agentic-0.2.23 → vectara_agentic-0.2.24}/tests/test_fallback.py +0 -0
- {vectara_agentic-0.2.23 → vectara_agentic-0.2.24}/tests/test_gemini.py +0 -0
- {vectara_agentic-0.2.23 → vectara_agentic-0.2.24}/tests/test_groq.py +0 -0
- {vectara_agentic-0.2.23 → vectara_agentic-0.2.24}/tests/test_private_llm.py +0 -0
- {vectara_agentic-0.2.23 → vectara_agentic-0.2.24}/tests/test_return_direct.py +0 -0
- {vectara_agentic-0.2.23 → vectara_agentic-0.2.24}/tests/test_serialization.py +0 -0
- {vectara_agentic-0.2.23 → vectara_agentic-0.2.24}/tests/test_tools.py +0 -0
- {vectara_agentic-0.2.23 → vectara_agentic-0.2.24}/tests/test_vectara_llms.py +0 -0
- {vectara_agentic-0.2.23 → vectara_agentic-0.2.24}/tests/test_workflow.py +0 -0
- {vectara_agentic-0.2.23 → vectara_agentic-0.2.24}/vectara_agentic/__init__.py +0 -0
- {vectara_agentic-0.2.23 → vectara_agentic-0.2.24}/vectara_agentic/_callback.py +0 -0
- {vectara_agentic-0.2.23 → vectara_agentic-0.2.24}/vectara_agentic/_observability.py +0 -0
- {vectara_agentic-0.2.23 → vectara_agentic-0.2.24}/vectara_agentic/_prompts.py +0 -0
- {vectara_agentic-0.2.23 → vectara_agentic-0.2.24}/vectara_agentic/agent.py +0 -0
- {vectara_agentic-0.2.23 → vectara_agentic-0.2.24}/vectara_agentic/agent_config.py +0 -0
- {vectara_agentic-0.2.23 → vectara_agentic-0.2.24}/vectara_agentic/agent_endpoint.py +0 -0
- {vectara_agentic-0.2.23 → vectara_agentic-0.2.24}/vectara_agentic/llm_utils.py +0 -0
- {vectara_agentic-0.2.23 → vectara_agentic-0.2.24}/vectara_agentic/sub_query_workflow.py +0 -0
- {vectara_agentic-0.2.23 → vectara_agentic-0.2.24}/vectara_agentic/tool_utils.py +0 -0
- {vectara_agentic-0.2.23 → vectara_agentic-0.2.24}/vectara_agentic/tools_catalog.py +0 -0
- {vectara_agentic-0.2.23 → vectara_agentic-0.2.24}/vectara_agentic/types.py +0 -0
- {vectara_agentic-0.2.23 → vectara_agentic-0.2.24}/vectara_agentic/utils.py +0 -0
- {vectara_agentic-0.2.23 → vectara_agentic-0.2.24}/vectara_agentic.egg-info/SOURCES.txt +0 -0
- {vectara_agentic-0.2.23 → vectara_agentic-0.2.24}/vectara_agentic.egg-info/dependency_links.txt +0 -0
- {vectara_agentic-0.2.23 → vectara_agentic-0.2.24}/vectara_agentic.egg-info/requires.txt +0 -0
- {vectara_agentic-0.2.23 → vectara_agentic-0.2.24}/vectara_agentic.egg-info/top_level.txt +0 -0
|
@@ -114,7 +114,7 @@ class DatabaseTools:
|
|
|
114
114
|
if sql_query is None:
|
|
115
115
|
raise ValueError("A query parameter is necessary to filter the data.")
|
|
116
116
|
|
|
117
|
-
count_query = f"SELECT COUNT(*) FROM ({sql_query})"
|
|
117
|
+
count_query = f"SELECT COUNT(*) FROM ({sql_query}) c"
|
|
118
118
|
try:
|
|
119
119
|
count_rows = self._load_data(count_query)
|
|
120
120
|
except Exception as e:
|
|
@@ -236,10 +236,13 @@ class VectaraToolFactory:
|
|
|
236
236
|
)
|
|
237
237
|
unique_ids = set()
|
|
238
238
|
docs = []
|
|
239
|
+
doc_matches = {}
|
|
239
240
|
for doc in response:
|
|
240
241
|
if doc.id_ in unique_ids:
|
|
242
|
+
doc_matches[doc.id_].append(doc.node.get_content())
|
|
241
243
|
continue
|
|
242
244
|
unique_ids.add(doc.id_)
|
|
245
|
+
doc_matches[doc.id_] = [doc.node.get_content()]
|
|
243
246
|
docs.append((doc.id_, doc.metadata))
|
|
244
247
|
tool_output = "Matching documents:\n"
|
|
245
248
|
if summarize:
|
|
@@ -253,11 +256,24 @@ class VectaraToolFactory:
|
|
|
253
256
|
)
|
|
254
257
|
for doc_id, metadata in docs:
|
|
255
258
|
summary = summaries_dict.get(doc_id, "")
|
|
256
|
-
|
|
259
|
+
matching_text = "\n".join(
|
|
260
|
+
f"<match {i}>{piece}</match {i}>"
|
|
261
|
+
for i, piece in enumerate(doc_matches[doc_id], start=1)
|
|
262
|
+
)
|
|
263
|
+
tool_output += (
|
|
264
|
+
f"document_id: '{doc_id}'\nmetadata: '{metadata}'\n"
|
|
265
|
+
f"matching texts: '{matching_text}'\n"
|
|
266
|
+
f"summary: '{summary}'\n\n"
|
|
267
|
+
)
|
|
257
268
|
else:
|
|
258
269
|
for doc_id, metadata in docs:
|
|
270
|
+
matching_text = "\n".join(
|
|
271
|
+
f"<match {i}>{piece}</match {i}>"
|
|
272
|
+
for i, piece in enumerate(doc_matches[doc_id], start=1)
|
|
273
|
+
)
|
|
259
274
|
tool_output += (
|
|
260
|
-
f"document_id: '{doc_id}'\nmetadata: '{metadata}'\n
|
|
275
|
+
f"document_id: '{doc_id}'\nmetadata: '{metadata}'\n"
|
|
276
|
+
f"matching texts: '{matching_text}'\n"
|
|
261
277
|
)
|
|
262
278
|
|
|
263
279
|
out = ToolOutput(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{vectara_agentic-0.2.23 → vectara_agentic-0.2.24}/vectara_agentic.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|