vectara-agentic 0.1.0__tar.gz → 0.1.2__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.

Potentially problematic release.


This version of vectara-agentic might be problematic. Click here for more details.

Files changed (22) hide show
  1. {vectara_agentic-0.1.0 → vectara_agentic-0.1.2}/PKG-INFO +24 -4
  2. {vectara_agentic-0.1.0 → vectara_agentic-0.1.2}/README.md +2 -3
  3. {vectara_agentic-0.1.0 → vectara_agentic-0.1.2}/requirements.txt +1 -0
  4. {vectara_agentic-0.1.0 → vectara_agentic-0.1.2}/setup.py +1 -1
  5. {vectara_agentic-0.1.0 → vectara_agentic-0.1.2}/vectara_agentic/_callback.py +4 -2
  6. {vectara_agentic-0.1.0 → vectara_agentic-0.1.2}/vectara_agentic/agent.py +26 -16
  7. {vectara_agentic-0.1.0 → vectara_agentic-0.1.2}/vectara_agentic/tools.py +54 -37
  8. {vectara_agentic-0.1.0 → vectara_agentic-0.1.2}/vectara_agentic/tools_catalog.py +41 -10
  9. {vectara_agentic-0.1.0 → vectara_agentic-0.1.2}/vectara_agentic.egg-info/PKG-INFO +25 -5
  10. {vectara_agentic-0.1.0 → vectara_agentic-0.1.2}/vectara_agentic.egg-info/requires.txt +1 -0
  11. {vectara_agentic-0.1.0 → vectara_agentic-0.1.2}/LICENSE +0 -0
  12. {vectara_agentic-0.1.0 → vectara_agentic-0.1.2}/MANIFEST.in +0 -0
  13. {vectara_agentic-0.1.0 → vectara_agentic-0.1.2}/setup.cfg +0 -0
  14. {vectara_agentic-0.1.0 → vectara_agentic-0.1.2}/tests/test_agent.py +0 -0
  15. {vectara_agentic-0.1.0 → vectara_agentic-0.1.2}/tests/test_tools.py +0 -0
  16. {vectara_agentic-0.1.0 → vectara_agentic-0.1.2}/vectara_agentic/__init__.py +0 -0
  17. {vectara_agentic-0.1.0 → vectara_agentic-0.1.2}/vectara_agentic/_prompts.py +0 -0
  18. {vectara_agentic-0.1.0 → vectara_agentic-0.1.2}/vectara_agentic/types.py +0 -0
  19. {vectara_agentic-0.1.0 → vectara_agentic-0.1.2}/vectara_agentic/utils.py +0 -0
  20. {vectara_agentic-0.1.0 → vectara_agentic-0.1.2}/vectara_agentic.egg-info/SOURCES.txt +0 -0
  21. {vectara_agentic-0.1.0 → vectara_agentic-0.1.2}/vectara_agentic.egg-info/dependency_links.txt +0 -0
  22. {vectara_agentic-0.1.0 → vectara_agentic-0.1.2}/vectara_agentic.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: vectara_agentic
3
- Version: 0.1.0
3
+ Version: 0.1.2
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
@@ -11,6 +11,27 @@ Classifier: Operating System :: OS Independent
11
11
  Requires-Python: >=3.10
12
12
  Description-Content-Type: text/markdown
13
13
  License-File: LICENSE
14
+ Requires-Dist: llama-index==0.10.64
15
+ Requires-Dist: llama-index-indices-managed-vectara==0.1.7
16
+ Requires-Dist: llama-index-agent-llm-compiler==0.1.0
17
+ Requires-Dist: llama-index-agent-openai==0.2.9
18
+ Requires-Dist: llama-index-llms-openai==0.1.29
19
+ Requires-Dist: llama-index-llms-anthropic==0.1.17
20
+ Requires-Dist: llama-index-llms-together==0.1.3
21
+ Requires-Dist: llama-index-llms-groq==0.1.4
22
+ Requires-Dist: llama-index-tools-yahoo-finance==0.1.1
23
+ Requires-Dist: llama-index-tools-arxiv==0.1.3
24
+ Requires-Dist: llama-index-tools-database==0.1.3
25
+ Requires-Dist: llama-index-tools-google==0.1.6
26
+ Requires-Dist: llama-index-tools-tavily_research==0.1.3
27
+ Requires-Dist: llama-index-llms-fireworks==0.1.8
28
+ Requires-Dist: pydantic==1.10.17
29
+ Requires-Dist: retrying==1.3.4
30
+ Requires-Dist: mypy==1.11.0
31
+ Requires-Dist: pylint==3.2.6
32
+ Requires-Dist: flake8==7.1.0
33
+ Requires-Dist: pymongo==4.6.1
34
+ Requires-Dist: python-dotenv==1.0.1
14
35
 
15
36
  # vectara-agentic
16
37
 
@@ -118,15 +139,12 @@ mult_tool = ToolsFactory().create_tool(mult_func)
118
139
 
119
140
  ```python
120
141
  agent = Agent(
121
- agent_type = agent_type,
122
142
  tools = tools,
123
143
  topic = topic_of_expertise
124
144
  custom_instructions = financial_bot_instructions,
125
145
  update_func = update_func
126
146
  )
127
147
  ```
128
-
129
- - `agent_type` is one of `AgentType.REACT` or `AgentTypeOpenAI`
130
148
  - `tools` is the list of tools you want to provide to the agent
131
149
  - `topic` is a string that defines the expertise you want the agent to specialize in.
132
150
  - `custom_instructions` is an optional string that defines special instructions to the agent
@@ -134,6 +152,8 @@ agent = Agent(
134
152
  The inputs to this function you provide are `status_type` of type AgentStatusType and
135
153
  `msg` which is a string.
136
154
 
155
+ Note that the Agent type (`OPENAI` or `REACT`) is defined as an environment variables `VECTARA_AGENTIC_AGENT_TYPE`.
156
+
137
157
  For example, for a financial agent we can use:
138
158
 
139
159
  ```python
@@ -104,15 +104,12 @@ mult_tool = ToolsFactory().create_tool(mult_func)
104
104
 
105
105
  ```python
106
106
  agent = Agent(
107
- agent_type = agent_type,
108
107
  tools = tools,
109
108
  topic = topic_of_expertise
110
109
  custom_instructions = financial_bot_instructions,
111
110
  update_func = update_func
112
111
  )
113
112
  ```
114
-
115
- - `agent_type` is one of `AgentType.REACT` or `AgentTypeOpenAI`
116
113
  - `tools` is the list of tools you want to provide to the agent
117
114
  - `topic` is a string that defines the expertise you want the agent to specialize in.
118
115
  - `custom_instructions` is an optional string that defines special instructions to the agent
@@ -120,6 +117,8 @@ agent = Agent(
120
117
  The inputs to this function you provide are `status_type` of type AgentStatusType and
121
118
  `msg` which is a string.
122
119
 
120
+ Note that the Agent type (`OPENAI` or `REACT`) is defined as an environment variables `VECTARA_AGENTIC_AGENT_TYPE`.
121
+
123
122
  For example, for a financial agent we can use:
124
123
 
125
124
  ```python
@@ -18,3 +18,4 @@ mypy==1.11.0
18
18
  pylint==3.2.6
19
19
  flake8==7.1.0
20
20
  pymongo==4.6.1
21
+ python-dotenv==1.0.1
@@ -8,7 +8,7 @@ def read_requirements():
8
8
 
9
9
  setup(
10
10
  name="vectara_agentic",
11
- version="0.1.0",
11
+ version="0.1.2",
12
12
  author="Ofer Mendelevitch",
13
13
  author_email="ofer@vectara.com",
14
14
  description="A Python package for creating AI Assistants and AI Agents with Vectara",
@@ -11,13 +11,15 @@ from .types import AgentStatusType
11
11
 
12
12
 
13
13
  class AgentCallbackHandler(BaseCallbackHandler):
14
- """Callback handler to track agent status
14
+ """
15
+ Callback handler to track agent status
15
16
 
16
17
  This handler simply keeps track of event starts/ends, separated by event types.
17
18
  You can use this callback handler to keep track of agent progress.
18
19
 
19
20
  Args:
20
- - fn: callable function agent will call back to report on agent progress
21
+
22
+ fn: callable function agent will call back to report on agent progress
21
23
  """
22
24
 
23
25
  def __init__(self, fn: Callable = None) -> None:
@@ -1,4 +1,4 @@
1
- """"
1
+ """
2
2
  This module contains the Agent class for handling different types of agents and their interactions.
3
3
  """
4
4
 
@@ -26,9 +26,11 @@ load_dotenv(override=True)
26
26
 
27
27
 
28
28
  def get_prompt(prompt_template: str, topic: str, custom_instructions: str):
29
- """Generate a prompt by replacing placeholders with topic and date.
29
+ """
30
+ Generate a prompt by replacing placeholders with topic and date.
30
31
 
31
32
  Args:
33
+
32
34
  prompt_template (str): The template for the prompt.
33
35
  topic (str): The topic to be included in the prompt.
34
36
 
@@ -50,7 +52,9 @@ def retry_if_exception(exception):
50
52
 
51
53
 
52
54
  class Agent:
53
- """Agent class for handling different types of agents and their interactions."""
55
+ """
56
+ Agent class for handling different types of agents and their interactions.
57
+ """
54
58
 
55
59
  def __init__(
56
60
  self,
@@ -59,13 +63,15 @@ class Agent:
59
63
  custom_instructions: str = "",
60
64
  update_func: Optional[Callable[[AgentStatusType, str], None]] = None,
61
65
  ):
62
- """Initialize the agent with the specified type, tools, topic, and system message.
66
+ """
67
+ Initialize the agent with the specified type, tools, topic, and system message.
63
68
 
64
69
  Args:
65
- - tools (list[FunctionTool]): A list of tools to be used by the agent.
66
- - topic (str, optional): The topic for the agent. Defaults to 'general'.
67
- - custom_instructions (str, optional): custom instructions for the agent. Defaults to ''.
68
- - update_func (Callable): a callback function the code calls on any agent updates
70
+
71
+ tools (list[FunctionTool]): A list of tools to be used by the agent.
72
+ topic (str, optional): The topic for the agent. Defaults to 'general'.
73
+ custom_instructions (str, optional): custom instructions for the agent. Defaults to ''.
74
+ update_func (Callable): a callback function the code calls on any agent updates.
69
75
  """
70
76
  self.agent_type = AgentType(os.getenv("VECTARA_AGENTIC_AGENT_TYPE", "OPENAI"))
71
77
  self.tools = tools
@@ -110,21 +116,24 @@ class Agent:
110
116
  custom_instructions: str = "",
111
117
  update_func: Optional[Callable[[AgentStatusType, str], None]] = None,
112
118
  ) -> "Agent":
113
- """Create an agent from tools, agent type, and language model.
119
+ """
120
+ Create an agent from tools, agent type, and language model.
114
121
 
115
122
  Args:
116
- - tools (list[FunctionTool]): A list of tools to be used by the agent.
117
- - topic (str, optional): The topic for the agent. Defaults to 'general'.
118
- - custom_instructions (str, optional): custom instructions for the agent. Defaults to ''.
119
- - llm (LLM): The language model to be used by the agent.
123
+
124
+ tools (list[FunctionTool]): A list of tools to be used by the agent.
125
+ topic (str, optional): The topic for the agent. Defaults to 'general'.
126
+ custom_instructions (str, optional): custom instructions for the agent. Defaults to ''.
127
+ llm (LLM): The language model to be used by the agent.
120
128
 
121
129
  Returns:
122
- - Agent: An instance of the Agent class.
130
+ Agent: An instance of the Agent class.
123
131
  """
124
132
  return cls(tools, topic, custom_instructions, update_func)
125
133
 
126
134
  def report(self) -> str:
127
- """Get a report from the agent.
135
+ """
136
+ Get a report from the agent.
128
137
 
129
138
  Returns:
130
139
  str: The report from the agent.
@@ -144,7 +153,8 @@ class Agent:
144
153
  wait_fixed=2000,
145
154
  )
146
155
  def chat(self, prompt: str) -> str:
147
- """Interact with the agent using a chat prompt.
156
+ """
157
+ Interact with the agent using a chat prompt.
148
158
 
149
159
  Args:
150
160
  prompt (str): The chat prompt.
@@ -51,7 +51,7 @@ LI_packages = {
51
51
 
52
52
  class VectaraTool:
53
53
  """
54
- A wrapper of FunctionTOol class for Vectara tools, adding the tool_type attribute.
54
+ A wrapper of FunctionTool class for Vectara tools, adding the tool_type attribute.
55
55
  """
56
56
 
57
57
  def __init__(self, function_tool: FunctionTool, tool_type: ToolType) -> None:
@@ -99,21 +99,25 @@ class VectaraToolFactory:
99
99
  """
100
100
  Creates a RAG (Retrieve and Generate) tool.
101
101
 
102
- Parameters:
103
- - tool_name (str): The name of the tool.
104
- - tool_description (str): The description of the tool.
105
- - tool_args_schema (BaseModel): The schema for the tool arguments.
106
- - vectara_summarizer (str): The Vectara summarizer to use.
107
- - summary_num_results (int): The number of summary results.
108
- - summary_response_lang (str): The response language for the summary.
109
- - n_sentences_before (int): Number of sentences before the summary.
110
- - n_sentences_after (int): Number of sentences after the summary.
111
- - lambda_val (float): Lambda value for the Vectara query.
112
- - reranker (str): The reranker mode.
113
- - rerank_k (int): Number of top-k documents for reranking.
114
- - mmr_diversity_bias (float): MMR diversity bias.
115
- - include_citations (bool): Whether to include citations in the response.
116
- If True, uses MARKDOWN vectara citations that requires the Vectara scale plan.
102
+ Args:
103
+
104
+ tool_name (str): The name of the tool.
105
+ tool_description (str): The description of the tool.
106
+ tool_args_schema (BaseModel): The schema for the tool arguments.
107
+ vectara_summarizer (str): The Vectara summarizer to use.
108
+ summary_num_results (int): The number of summary results.
109
+ summary_response_lang (str): The response language for the summary.
110
+ n_sentences_before (int): Number of sentences before the summary.
111
+ n_sentences_after (int): Number of sentences after the summary.
112
+ lambda_val (float): Lambda value for the Vectara query.
113
+ reranker (str): The reranker mode.
114
+ rerank_k (int): Number of top-k documents for reranking.
115
+ mmr_diversity_bias (float): MMR diversity bias.
116
+ include_citations (bool): Whether to include citations in the response.
117
+ If True, uses MARKDOWN vectara citations that requires the Vectara scale plan.
118
+
119
+ Returns:
120
+ VectaraTool: A VectaraTool object.
117
121
  """
118
122
  vectara = VectaraIndex(
119
123
  vectara_api_key=self.vectara_api_key,
@@ -133,7 +137,9 @@ class VectaraToolFactory:
133
137
 
134
138
  # Dynamically generate the RAG function
135
139
  def rag_function(*args, **kwargs) -> dict[str, Any]:
136
- """Dynamically generated function for RAG query with Vectara"""
140
+ """
141
+ Dynamically generated function for RAG query with Vectara.
142
+ """
137
143
  # Convert args to kwargs using the function signature
138
144
  sig = inspect.signature(rag_function)
139
145
  bound_args = sig.bind_partial(*args, **kwargs)
@@ -249,7 +255,7 @@ class VectaraToolFactory:
249
255
 
250
256
  class ToolsFactory:
251
257
  """
252
- A factory class for creating agent tools
258
+ A factory class for creating agent tools.
253
259
  """
254
260
 
255
261
  def create_tool(
@@ -258,9 +264,12 @@ class ToolsFactory:
258
264
  """
259
265
  Create a tool from a function.
260
266
 
261
- Parameters:
262
- - function (Callable): a function to convert into a tool.
263
- - tool_type (ToolType): the type of tool.
267
+ Args:
268
+ function (Callable): a function to convert into a tool.
269
+ tool_type (ToolType): the type of tool.
270
+
271
+ Returns:
272
+ List[FunctionTool]: A list of FunctionTool objects.
264
273
  """
265
274
  return VectaraTool(FunctionTool.from_defaults(function), tool_type)
266
275
 
@@ -275,10 +284,13 @@ class ToolsFactory:
275
284
  Get a tool from the llama_index hub.
276
285
 
277
286
  Parameters:
278
- - tool_package_name (str): The name of the tool package.
279
- - tool_spec_name (str): The name of the tool spec.
280
- - tool_name_prefix (str): The prefix to add to the tool names (added to every tool in the spec).
281
- - kwargs (dict): The keyword arguments to pass to the tool constructor (see Hub for tool specific details).
287
+ tool_package_name (str): The name of the tool package.
288
+ tool_spec_name (str): The name of the tool spec.
289
+ tool_name_prefix (str): The prefix to add to the tool names (added to every tool in the spec).
290
+ kwargs (dict): The keyword arguments to pass to the tool constructor (see Hub for tool specific details).
291
+
292
+ Returns:
293
+ list[FunctionTool]: A list of FunctionTool objects.
282
294
  """
283
295
  # Dynamically install and import the module
284
296
  if tool_package_name not in LI_packages.keys():
@@ -341,7 +353,7 @@ class ToolsFactory:
341
353
  text: str = Field(description="the original text."),
342
354
  ) -> str:
343
355
  """
344
- critique the legal document.
356
+ Critique the legal document.
345
357
  """
346
358
  return critique_text(
347
359
  text,
@@ -369,18 +381,23 @@ class ToolsFactory:
369
381
  dbname: str = "postgres",
370
382
  ) -> List[FunctionTool]:
371
383
  """
372
- returns a list of database tools.
384
+ Returns a list of database tools.
385
+
373
386
  Args:
374
- - tool_name_prefix (str, optional): The prefix to add to the tool names. Defaults to "".
375
- - content_description (str, optional): The content description for the database. Defaults to None.
376
- - sql_database (SQLDatabase, optional): The SQLDatabase object. Defaults to None.
377
- - scheme (str, optional): The database scheme. Defaults to None.
378
- - host (str, optional): The database host. Defaults to "localhost".
379
- - port (str, optional): The database port. Defaults to "5432".
380
- - user (str, optional): The database user. Defaults to "postgres".
381
- - password (str, optional): The database password. Defaults to "Password".
382
- - dbname (str, optional): The database name. Defaults to "postgres".
383
- You must specify either the sql_database object or the scheme, host, port, user, password, and dbname.
387
+
388
+ tool_name_prefix (str, optional): The prefix to add to the tool names. Defaults to "".
389
+ content_description (str, optional): The content description for the database. Defaults to None.
390
+ sql_database (SQLDatabase, optional): The SQLDatabase object. Defaults to None.
391
+ scheme (str, optional): The database scheme. Defaults to None.
392
+ host (str, optional): The database host. Defaults to "localhost".
393
+ port (str, optional): The database port. Defaults to "5432".
394
+ user (str, optional): The database user. Defaults to "postgres".
395
+ password (str, optional): The database password. Defaults to "Password".
396
+ dbname (str, optional): The database name. Defaults to "postgres".
397
+ You must specify either the sql_database object or the scheme, host, port, user, password, and dbname.
398
+
399
+ Returns:
400
+ List[FunctionTool]: A list of FunctionTool objects.
384
401
  """
385
402
  if sql_database:
386
403
  tools = self.get_llama_index_tools(
@@ -22,7 +22,6 @@ get_headers = {
22
22
  #
23
23
  # Standard Tools
24
24
  #
25
-
26
25
  def summarize_text(
27
26
  text: str = Field(description="the original text."),
28
27
  expertise: str = Field(
@@ -30,9 +29,16 @@ def summarize_text(
30
29
  ),
31
30
  ) -> str:
32
31
  """
33
- This is a helper tool. It does not provide new information.
34
- Use this tool to summarize text with no more than summary_max_length
35
- characters.
32
+ This is a helper tool.
33
+ Use this tool to summarize text using a given expertise
34
+ with no more than summary_max_length characters.
35
+
36
+ Args:
37
+ text (str): The original text.
38
+ expertise (str): The expertise to apply to the summarization.
39
+
40
+ Returns:
41
+ str: The summarized text.
36
42
  """
37
43
  expertise = "general" if len(expertise) < 3 else expertise.lower()
38
44
  prompt = f"As an expert in {expertise}, summarize the provided text"
@@ -50,9 +56,16 @@ def rephrase_text(
50
56
  ),
51
57
  ) -> str:
52
58
  """
53
- This is a helper tool. It does not provide new information.
59
+ This is a helper tool.
54
60
  Use this tool to rephrase the text according to the provided instructions.
55
61
  For example, instructions could be "as a 5 year old would say it."
62
+
63
+ Args:
64
+ text (str): The original text.
65
+ instructions (str): The specific instructions for how to rephrase the text.
66
+
67
+ Returns:
68
+ str: The rephrased text.
56
69
  """
57
70
  prompt = f"""
58
71
  Rephrase the provided text according to the following instructions: {instructions}.
@@ -75,8 +88,16 @@ def critique_text(
75
88
  ),
76
89
  ) -> str:
77
90
  """
78
- This is a helper tool. It does not provide new information.
91
+ This is a helper tool.
79
92
  Critique the text from the specified point of view.
93
+
94
+ Args:
95
+ text (str): The original text.
96
+ role (str): The role of the person providing critique.
97
+ point_of_view (str): The point of view with which to provide critique.
98
+
99
+ Returns:
100
+ str: The critique of the text.
80
101
  """
81
102
  if role:
82
103
  prompt = f"As a {role}, critique the provided text from the point of view of {point_of_view}."
@@ -94,12 +115,16 @@ def critique_text(
94
115
  #
95
116
  # Guardrails tools
96
117
  #
97
-
98
-
99
118
  def guardrails_no_politics(text: str = Field(description="the original text.")) -> str:
100
119
  """
101
120
  A guardrails tool.
102
- Can be used to rephrase text so that it does not have political content.
121
+ Given the input text, rephrases the text to ensure that the response avoids any specific political content.
122
+
123
+ Args:
124
+ text (str): The original text.
125
+
126
+ Returns:
127
+ str: The rephrased text.
103
128
  """
104
129
  return rephrase_text(text, "avoid any specific political content.")
105
130
 
@@ -107,6 +132,12 @@ def guardrails_no_politics(text: str = Field(description="the original text."))
107
132
  def guardrails_be_polite(text: str = Field(description="the original text.")) -> str:
108
133
  """
109
134
  A guardrails tool.
110
- Can be used to rephrase the text so that the response is in a polite tone.
135
+ Given the input text, rephrases the text to ensure that the response is polite.
136
+
137
+ Args:
138
+ text (str): The original text.
139
+
140
+ Returns:
141
+ str: The rephrased text.
111
142
  """
112
143
  return rephrase_text(text, "Ensure the response is super polite.")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
- Name: vectara-agentic
3
- Version: 0.1.0
2
+ Name: vectara_agentic
3
+ Version: 0.1.2
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
@@ -11,6 +11,27 @@ Classifier: Operating System :: OS Independent
11
11
  Requires-Python: >=3.10
12
12
  Description-Content-Type: text/markdown
13
13
  License-File: LICENSE
14
+ Requires-Dist: llama-index==0.10.64
15
+ Requires-Dist: llama-index-indices-managed-vectara==0.1.7
16
+ Requires-Dist: llama-index-agent-llm-compiler==0.1.0
17
+ Requires-Dist: llama-index-agent-openai==0.2.9
18
+ Requires-Dist: llama-index-llms-openai==0.1.29
19
+ Requires-Dist: llama-index-llms-anthropic==0.1.17
20
+ Requires-Dist: llama-index-llms-together==0.1.3
21
+ Requires-Dist: llama-index-llms-groq==0.1.4
22
+ Requires-Dist: llama-index-tools-yahoo-finance==0.1.1
23
+ Requires-Dist: llama-index-tools-arxiv==0.1.3
24
+ Requires-Dist: llama-index-tools-database==0.1.3
25
+ Requires-Dist: llama-index-tools-google==0.1.6
26
+ Requires-Dist: llama-index-tools-tavily_research==0.1.3
27
+ Requires-Dist: llama-index-llms-fireworks==0.1.8
28
+ Requires-Dist: pydantic==1.10.17
29
+ Requires-Dist: retrying==1.3.4
30
+ Requires-Dist: mypy==1.11.0
31
+ Requires-Dist: pylint==3.2.6
32
+ Requires-Dist: flake8==7.1.0
33
+ Requires-Dist: pymongo==4.6.1
34
+ Requires-Dist: python-dotenv==1.0.1
14
35
 
15
36
  # vectara-agentic
16
37
 
@@ -118,15 +139,12 @@ mult_tool = ToolsFactory().create_tool(mult_func)
118
139
 
119
140
  ```python
120
141
  agent = Agent(
121
- agent_type = agent_type,
122
142
  tools = tools,
123
143
  topic = topic_of_expertise
124
144
  custom_instructions = financial_bot_instructions,
125
145
  update_func = update_func
126
146
  )
127
147
  ```
128
-
129
- - `agent_type` is one of `AgentType.REACT` or `AgentTypeOpenAI`
130
148
  - `tools` is the list of tools you want to provide to the agent
131
149
  - `topic` is a string that defines the expertise you want the agent to specialize in.
132
150
  - `custom_instructions` is an optional string that defines special instructions to the agent
@@ -134,6 +152,8 @@ agent = Agent(
134
152
  The inputs to this function you provide are `status_type` of type AgentStatusType and
135
153
  `msg` which is a string.
136
154
 
155
+ Note that the Agent type (`OPENAI` or `REACT`) is defined as an environment variables `VECTARA_AGENTIC_AGENT_TYPE`.
156
+
137
157
  For example, for a financial agent we can use:
138
158
 
139
159
  ```python
@@ -18,3 +18,4 @@ mypy==1.11.0
18
18
  pylint==3.2.6
19
19
  flake8==7.1.0
20
20
  pymongo==4.6.1
21
+ python-dotenv==1.0.1
File without changes