vectara-agentic 0.2.24__py3-none-any.whl → 0.3.0__py3-none-any.whl
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.
Potentially problematic release.
This version of vectara-agentic might be problematic. Click here for more details.
- tests/test_agent.py +2 -2
- tests/test_hhem.py +100 -0
- tests/test_return_direct.py +2 -6
- tests/test_tools.py +1 -1
- vectara_agentic/_callback.py +26 -18
- vectara_agentic/_prompts.py +4 -0
- vectara_agentic/_version.py +1 -1
- vectara_agentic/agent.py +69 -12
- vectara_agentic/hhem.py +45 -0
- vectara_agentic/llm_utils.py +34 -10
- vectara_agentic/tool_utils.py +177 -15
- vectara_agentic/tools.py +99 -99
- vectara_agentic/types.py +22 -1
- {vectara_agentic-0.2.24.dist-info → vectara_agentic-0.3.0.dist-info}/METADATA +24 -2
- {vectara_agentic-0.2.24.dist-info → vectara_agentic-0.3.0.dist-info}/RECORD +18 -16
- {vectara_agentic-0.2.24.dist-info → vectara_agentic-0.3.0.dist-info}/WHEEL +0 -0
- {vectara_agentic-0.2.24.dist-info → vectara_agentic-0.3.0.dist-info}/licenses/LICENSE +0 -0
- {vectara_agentic-0.2.24.dist-info → vectara_agentic-0.3.0.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: vectara_agentic
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: A Python package for creating AI Assistants and AI Agents with Vectara
|
|
5
5
|
Home-page: https://github.com/vectara/py-vectara-agentic
|
|
6
6
|
Author: Ofer Mendelevitch
|
|
@@ -49,7 +49,7 @@ Requires-Dist: llama-index-tools-bing-search==0.3.0
|
|
|
49
49
|
Requires-Dist: openai>=1.82.1
|
|
50
50
|
Requires-Dist: tavily-python==0.7.3
|
|
51
51
|
Requires-Dist: exa-py==1.13.1
|
|
52
|
-
Requires-Dist: openinference-instrumentation-llama-index==4.
|
|
52
|
+
Requires-Dist: openinference-instrumentation-llama-index==4.3.1
|
|
53
53
|
Requires-Dist: opentelemetry-proto>=1.31.0
|
|
54
54
|
Requires-Dist: arize-phoenix==10.9.1
|
|
55
55
|
Requires-Dist: arize-phoenix-otel==0.10.3
|
|
@@ -479,10 +479,32 @@ def mult_func(x, y):
|
|
|
479
479
|
mult_tool = ToolsFactory().create_tool(mult_func)
|
|
480
480
|
```
|
|
481
481
|
|
|
482
|
+
#### Human-Readable Tool Output
|
|
483
|
+
|
|
484
|
+
Tools can provide both raw data and human-readable formatted output using the `create_human_readable_output` utility:
|
|
485
|
+
|
|
486
|
+
```python
|
|
487
|
+
from vectara_agentic.tool_utils import create_human_readable_output, format_as_table
|
|
488
|
+
|
|
489
|
+
def my_data_tool(query: str):
|
|
490
|
+
"""Tool that returns structured data with custom formatting."""
|
|
491
|
+
raw_data = [
|
|
492
|
+
{"name": "Alice", "age": 30, "city": "New York"},
|
|
493
|
+
{"name": "Bob", "age": 25, "city": "Boston"}
|
|
494
|
+
]
|
|
495
|
+
|
|
496
|
+
# Return human-readable output with built-in table formatter
|
|
497
|
+
return create_human_readable_output(raw_data, format_as_table)
|
|
498
|
+
```
|
|
499
|
+
|
|
500
|
+
Built-in formatters include `format_as_table`, `format_as_json`, and `format_as_markdown_list`. For detailed documentation and advanced usage, see [tools.md](docs/tools.md#human-readable-tool-output).
|
|
501
|
+
|
|
482
502
|
> **Important:** When you define your own Python functions as tools, implement them at the top module level,
|
|
483
503
|
> and not as nested functions. Nested functions are not supported if you use serialization
|
|
484
504
|
> (dumps/loads or from_dict/to_dict).
|
|
485
505
|
|
|
506
|
+
The human-readable format, if available, is used when computing the factual consistency score.
|
|
507
|
+
|
|
486
508
|
### Tool Validation
|
|
487
509
|
|
|
488
510
|
When creating an agent, you can enable tool validation by setting `validate_tools=True`. This will check that any tools mentioned in your custom instructions actually exist in the agent's tool set:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
2
|
tests/endpoint.py,sha256=frnpdZQpnuQNNKNYgAn2rFTarNG8MCJaNA77Bw_W22A,1420
|
|
3
|
-
tests/test_agent.py,sha256=
|
|
3
|
+
tests/test_agent.py,sha256=4aRDhEVM1zARpSOevPR8PFGTkIaSw5g5WvoQDx-4sns,5496
|
|
4
4
|
tests/test_agent_planning.py,sha256=JwEebGooROAvsQ9JZoaH6KEcrSyv1F0lL4TD4FjP8a8,2213
|
|
5
5
|
tests/test_agent_type.py,sha256=9ZImIDw7Qz5EV2tX8bDD0tT1IFYghS3-SShpAezHO7s,7381
|
|
6
6
|
tests/test_api_endpoint.py,sha256=M9YGFCy_Jphzq9JznP4ftHqxZ_yu6dgWdX1jRvdsORA,5002
|
|
@@ -8,30 +8,32 @@ tests/test_bedrock.py,sha256=23A5_2FRaEl47PzgfUPDL6dgFDPJ9iktz-A-B1UwIhg,1224
|
|
|
8
8
|
tests/test_fallback.py,sha256=M5YD7NHZ0joVU1frYIr9_OiRAIje5mrXrYVcekzlyGs,2829
|
|
9
9
|
tests/test_gemini.py,sha256=QUBYWhZkX9AjnhPn5qa7sREf6YHZWeJEmYzKwVC23Io,4081
|
|
10
10
|
tests/test_groq.py,sha256=5yTlOLwpzGRmiBPExAuulK6SEO9O13cMJWVSSHX9CsE,1212
|
|
11
|
+
tests/test_hhem.py,sha256=XFUX3x0xOa9QsafzYNP8_ZsvzIiLnWee4hdsowzHft8,3250
|
|
11
12
|
tests/test_private_llm.py,sha256=-bQBI69Z-SwhhQJGzyC9GGM4kz5c6T5kAbXLbqn_G7E,2248
|
|
12
|
-
tests/test_return_direct.py,sha256=
|
|
13
|
+
tests/test_return_direct.py,sha256=mgj1xJnvOX28aaidhZfH2DaI-kM0yfQ0P1PNV0iyLcw,1405
|
|
13
14
|
tests/test_serialization.py,sha256=Ed23GN2zhSJNdPFrVK4aqLkOhJKviczR_o0t-r9TuRI,4762
|
|
14
|
-
tests/test_tools.py,sha256=
|
|
15
|
+
tests/test_tools.py,sha256=bhhq49I3eEJyuNf5FU7M9IxPT0XtwRbRTs3gwoBHihk,17128
|
|
15
16
|
tests/test_vectara_llms.py,sha256=gw5KQ4XT3L-_A6yj2jKqj-QomCjOb9VESKBtBH2Xb8s,2362
|
|
16
17
|
tests/test_workflow.py,sha256=TmNBxBqSW5owk_Nz9LLtHvqryVNsFPkf-M1G_uFSsAM,3739
|
|
17
18
|
vectara_agentic/__init__.py,sha256=2GLDS3U6KckK-dBRl9v_x1kSV507gEhjOfuMmmu0Qxg,850
|
|
18
|
-
vectara_agentic/_callback.py,sha256=
|
|
19
|
+
vectara_agentic/_callback.py,sha256=c3848EMSpaQWXtuwdqRGbhgbZhiDwgGnemJkgm9yWAc,13238
|
|
19
20
|
vectara_agentic/_observability.py,sha256=iZlByeQTyx6g3Y8aBYcdGcxdRkoYrfxHdcrTEKO26UE,4485
|
|
20
|
-
vectara_agentic/_prompts.py,sha256=
|
|
21
|
-
vectara_agentic/_version.py,sha256=
|
|
22
|
-
vectara_agentic/agent.py,sha256=
|
|
21
|
+
vectara_agentic/_prompts.py,sha256=l9DumUsoj5ZgM6dZyWLN_n2x97hbFp3Wb9lbnDry_ck,10533
|
|
22
|
+
vectara_agentic/_version.py,sha256=gMX-7WAzE6C0cnpJHP9oHj7SV_MLChPuUZZHG6aN0yk,65
|
|
23
|
+
vectara_agentic/agent.py,sha256=S1Rek9Dp9HabDQPqdQlkIMUR701-XTonyoXeCRE9WtA,58215
|
|
23
24
|
vectara_agentic/agent_config.py,sha256=E-rtYMcpoGxnEAyy8231bizo2n0uGQ2qWxuSgTEfwdQ,4327
|
|
24
25
|
vectara_agentic/agent_endpoint.py,sha256=PzIN7HhEHv8Mq_Zo5cZ2xYrgdv2AN6kx6dc_2AJq28I,7497
|
|
25
26
|
vectara_agentic/db_tools.py,sha256=GUsQTZfRbT9F5K_e5HNaKXUkU6x8RErUyjDVKlZi1IA,11196
|
|
26
|
-
vectara_agentic/
|
|
27
|
+
vectara_agentic/hhem.py,sha256=WxrDy3DstOyWpScl5Fu3qVS-QfCM43jf0xT-8cDSBOA,1551
|
|
28
|
+
vectara_agentic/llm_utils.py,sha256=g-8Ja4g8X67u02pi7mQrb3O1nRre9lgeC6gJqngl5ow,7668
|
|
27
29
|
vectara_agentic/sub_query_workflow.py,sha256=JYwN0wK4QzHjTaFDsSCAQvMx9GD4g6CnqxZCnzi6xb4,13086
|
|
28
|
-
vectara_agentic/tool_utils.py,sha256=
|
|
29
|
-
vectara_agentic/tools.py,sha256=
|
|
30
|
+
vectara_agentic/tool_utils.py,sha256=9xoqVPB97CIDXOxuFIw4yZ2RlXvdayCEGPUaUPC2Tbc,24168
|
|
31
|
+
vectara_agentic/tools.py,sha256=Q5D__YM9-bIlct8gtBGC5cX1Hxt-RhLAPu9QKKm2drU,34586
|
|
30
32
|
vectara_agentic/tools_catalog.py,sha256=cAN_kDOWZUoW4GNFwY5GdS6ImMUQNnF2sggx9OGK9Cg,4906
|
|
31
|
-
vectara_agentic/types.py,sha256=
|
|
33
|
+
vectara_agentic/types.py,sha256=3mrtshHiy-d5JHVxl-4tJk5DRspvYKwAYiI5LvKO1Bw,2226
|
|
32
34
|
vectara_agentic/utils.py,sha256=R9HitEG5K3Q_p2M_teosT181OUxkhs1-hnj98qDYGbE,2545
|
|
33
|
-
vectara_agentic-0.
|
|
34
|
-
vectara_agentic-0.
|
|
35
|
-
vectara_agentic-0.
|
|
36
|
-
vectara_agentic-0.
|
|
37
|
-
vectara_agentic-0.
|
|
35
|
+
vectara_agentic-0.3.0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
36
|
+
vectara_agentic-0.3.0.dist-info/METADATA,sha256=RUrv_F2LsjFkxBIdR4CCvJZEevpok3CFzJq3ehx1bEs,32046
|
|
37
|
+
vectara_agentic-0.3.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
38
|
+
vectara_agentic-0.3.0.dist-info/top_level.txt,sha256=Y7TQTFdOYGYodQRltUGRieZKIYuzeZj2kHqAUpfCUfg,22
|
|
39
|
+
vectara_agentic-0.3.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|