vectara-agentic 0.1.22__py3-none-any.whl → 0.1.23__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.
- vectara_agentic/__init__.py +1 -1
- vectara_agentic/tools.py +7 -0
- {vectara_agentic-0.1.22.dist-info → vectara_agentic-0.1.23.dist-info}/METADATA +11 -3
- {vectara_agentic-0.1.22.dist-info → vectara_agentic-0.1.23.dist-info}/RECORD +7 -7
- {vectara_agentic-0.1.22.dist-info → vectara_agentic-0.1.23.dist-info}/LICENSE +0 -0
- {vectara_agentic-0.1.22.dist-info → vectara_agentic-0.1.23.dist-info}/WHEEL +0 -0
- {vectara_agentic-0.1.22.dist-info → vectara_agentic-0.1.23.dist-info}/top_level.txt +0 -0
vectara_agentic/__init__.py
CHANGED
vectara_agentic/tools.py
CHANGED
|
@@ -251,12 +251,19 @@ class VectaraToolFactory:
|
|
|
251
251
|
# = and != operators can be numeric or string
|
|
252
252
|
if rhs.isdigit() or is_float(rhs):
|
|
253
253
|
filter_parts.append(f"{prefix}.{key}{matched_operator}{rhs}")
|
|
254
|
+
elif rhs.lower() in ["true", "false"]:
|
|
255
|
+
filter_parts.append(f"{prefix}.{key}{matched_operator}{rhs.lower()}")
|
|
254
256
|
else:
|
|
255
257
|
# For string operands, wrap them in quotes
|
|
256
258
|
filter_parts.append(f"{prefix}.{key}{matched_operator}'{rhs}'")
|
|
257
259
|
else:
|
|
258
260
|
if val_str.isdigit() or is_float(val_str):
|
|
259
261
|
filter_parts.append(f"{prefix}.{key}={val_str}")
|
|
262
|
+
elif val_str.lower() in ["true", "false"]:
|
|
263
|
+
# This is to handle boolean values.
|
|
264
|
+
# This is not complete solution - the best solution would be to test if the field is boolean
|
|
265
|
+
# That can be done after we move to APIv2
|
|
266
|
+
filter_parts.append(f"{prefix}.{key}={val_str.lower()}")
|
|
260
267
|
else:
|
|
261
268
|
filter_parts.append(f"{prefix}.{key}='{val_str}'")
|
|
262
269
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: vectara_agentic
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.23
|
|
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
|
|
@@ -128,10 +128,18 @@ vec_factory = VectaraToolFactory(
|
|
|
128
128
|
vectara_corpus_id=os.environ['VECTARA_CORPUS_ID']
|
|
129
129
|
)
|
|
130
130
|
|
|
131
|
+
years = list(range(2020, 2024))
|
|
132
|
+
tickers = {
|
|
133
|
+
"AAPL": "Apple Computer",
|
|
134
|
+
"GOOG": "Google",
|
|
135
|
+
"AMZN": "Amazon",
|
|
136
|
+
"SNOW": "Snowflake",
|
|
137
|
+
}
|
|
138
|
+
|
|
131
139
|
class QueryFinancialReportsArgs(BaseModel):
|
|
132
140
|
query: str = Field(..., description="The user query.")
|
|
133
|
-
year: int = Field(..., description="The year. An integer between {min(years)} and {max(years)}.")
|
|
134
|
-
ticker: str = Field(..., description="The company ticker. Must be a valid ticket symbol from the list {tickers.keys()}.")
|
|
141
|
+
year: int | str = Field(..., description=f"The year this query relates to. An integer between {min(years)} and {max(years)} or a string specifying a condition on the year (example: '>2020').")
|
|
142
|
+
ticker: str = Field(..., description=f"The company ticker. Must be a valid ticket symbol from the list {tickers.keys()}.")
|
|
135
143
|
|
|
136
144
|
query_financial_reports_tool = vec_factory.create_rag_tool(
|
|
137
145
|
tool_name="query_financial_reports",
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
2
|
tests/test_agent.py,sha256=aQYYr_8hKlFiDgyI5Dd39TG5vkmDJe7F_nIzMTCLsTQ,2517
|
|
3
3
|
tests/test_tools.py,sha256=hDAlXkWKuXHnAjeQwMuTLTwNdRsM-xR7muBzFkZRefw,2942
|
|
4
|
-
vectara_agentic/__init__.py,sha256=
|
|
4
|
+
vectara_agentic/__init__.py,sha256=qmbzN20Bl7PTIgDB5Wpn0uBKyqMZxR2744Yn1LlqgcM,508
|
|
5
5
|
vectara_agentic/_callback.py,sha256=OBiHk_OJZTS3iKz_LigfEjnl_p5V90XYsQC0vEYVSPo,8782
|
|
6
6
|
vectara_agentic/_observability.py,sha256=v0xxTk8KI8nVK2rpyGqOVhyva9ymqOmZK5brKqFOwMM,3828
|
|
7
7
|
vectara_agentic/_prompts.py,sha256=N656x-bfy9I5j2Lw51gpaGq_8R6zpPelPQ2-KWHHpTk,6160
|
|
8
8
|
vectara_agentic/agent.py,sha256=Vr8R4sR_ZxJfGI94Jjze4r_rCCWYNvJ9UqsfjlAReWM,22045
|
|
9
9
|
vectara_agentic/agent_endpoint.py,sha256=I3zTEezbAiNeW5I41r0NjIaR8Ucn4oe1XVcALekakaA,1959
|
|
10
10
|
vectara_agentic/db_tools.py,sha256=kCEENzmnorm8i-k4Kpd4KLJt1QWh_ZlAyX1aG-tzET0,3619
|
|
11
|
-
vectara_agentic/tools.py,sha256=
|
|
11
|
+
vectara_agentic/tools.py,sha256=lXkf1cMrK1NNORArhM3urT9_UoibiEa268oOB_3_hGk,25346
|
|
12
12
|
vectara_agentic/tools_catalog.py,sha256=5NlJypdu0IKa7mODxVOwo05lw3PqQJtSl_ZOsUDH_TA,3986
|
|
13
13
|
vectara_agentic/types.py,sha256=siRh9VmFt3jhTu4uJzYpvNlLi60lyIH5_xqYHKpB24Q,1149
|
|
14
14
|
vectara_agentic/utils.py,sha256=XzSo5tKSsQpgd6Kx3q-XREohbyIe7-UqlpUW-9y1KeQ,3998
|
|
15
|
-
vectara_agentic-0.1.
|
|
16
|
-
vectara_agentic-0.1.
|
|
17
|
-
vectara_agentic-0.1.
|
|
18
|
-
vectara_agentic-0.1.
|
|
19
|
-
vectara_agentic-0.1.
|
|
15
|
+
vectara_agentic-0.1.23.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
16
|
+
vectara_agentic-0.1.23.dist-info/METADATA,sha256=e_sISyt8xk1ip2LtKfaSIvV_3O2w30jwj907I8cgueE,14683
|
|
17
|
+
vectara_agentic-0.1.23.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
|
18
|
+
vectara_agentic-0.1.23.dist-info/top_level.txt,sha256=Y7TQTFdOYGYodQRltUGRieZKIYuzeZj2kHqAUpfCUfg,22
|
|
19
|
+
vectara_agentic-0.1.23.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|