bstraehle commited on
Commit
e10c632
·
verified ·
1 Parent(s): 480a1dc

Update crew.py

Browse files
Files changed (1) hide show
  1. crew.py +6 -6
crew.py CHANGED
@@ -181,11 +181,11 @@ def run_crew(question, file_path):
181
 
182
  @tool("Code Generation Tool")
183
  def code_generation_tool(question: str, file_path: str) -> str:
184
- """Generate and execute Python code, optionally reading a .csv, .xls, .xlsx, .json, .jsonl document, to answer a question.
185
 
186
  Args:
187
  question (str): Question to answer
188
- file_path (str): The optional document file path
189
 
190
  Returns:
191
  str: Answer to the question
@@ -217,11 +217,11 @@ def run_crew(question, file_path):
217
 
218
  @tool("Code Execution Tool")
219
  def code_execution_tool(question: str, file_path: str) -> str:
220
- """Execute a .py Python code file to answer a question.
221
 
222
  Args:
223
  question (str): Question to answer
224
- file_path (str): The Python code file path
225
 
226
  Returns:
227
  str: Answer to the question
@@ -306,7 +306,7 @@ def run_crew(question, file_path):
306
 
307
  code_generation_agent = Agent(
308
  role="Code Generation Agent",
309
- goal="Generate and execute Python code, optionally reading a .csv, .xls, .xlsx, .json, .jsonl document, to help answer question \"{question}\"",
310
  backstory="As an expert Python code generation assistant, you generate and execute code to help answer the question.",
311
  allow_delegation=False,
312
  llm=AGENT_MODEL,
@@ -317,7 +317,7 @@ def run_crew(question, file_path):
317
 
318
  code_execution_agent = Agent(
319
  role="Code Execution Agent",
320
- goal="Execute Python code file to help answer question \"{question}\"",
321
  backstory="As an expert Python code execution assistant, you execute the code file to help answer the question.",
322
  allow_delegation=False,
323
  llm=AGENT_MODEL,
 
181
 
182
  @tool("Code Generation Tool")
183
  def code_generation_tool(question: str, file_path: str) -> str:
184
+ """Given a question and optional .csv, .xls, .xlsx, .json, .jsonl file, generate and execute code to answer the question.
185
 
186
  Args:
187
  question (str): Question to answer
188
+ file_path (str): The optional .csv, .xls, .xlsx, .json, .jsonl file path
189
 
190
  Returns:
191
  str: Answer to the question
 
217
 
218
  @tool("Code Execution Tool")
219
  def code_execution_tool(question: str, file_path: str) -> str:
220
+ """Given a question and .py file, execute the file to answer the question.
221
 
222
  Args:
223
  question (str): Question to answer
224
+ file_path (str): The .py file path
225
 
226
  Returns:
227
  str: Answer to the question
 
306
 
307
  code_generation_agent = Agent(
308
  role="Code Generation Agent",
309
+ goal="Given a question and optional .csv, .xls, .xlsx, .json, .jsonl file, generate and execute code to help answer question \"{question}\"",
310
  backstory="As an expert Python code generation assistant, you generate and execute code to help answer the question.",
311
  allow_delegation=False,
312
  llm=AGENT_MODEL,
 
317
 
318
  code_execution_agent = Agent(
319
  role="Code Execution Agent",
320
+ goal="Given a question and .py file, execute the file to help answer question \"{question}\"",
321
  backstory="As an expert Python code execution assistant, you execute the code file to help answer the question.",
322
  allow_delegation=False,
323
  llm=AGENT_MODEL,