Update crew.py
Browse files
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 |
-
"""Given a question and optional .csv, .xls, .xlsx, .json, .jsonl file, generate
|
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
|
@@ -219,11 +219,11 @@ def run_crew(question, file_path):
|
|
219 |
|
220 |
@tool("Code Execution Tool")
|
221 |
def code_execution_tool(question: str, file_path: str) -> str:
|
222 |
-
"""Given a question and .py file, execute the file to answer the question.
|
223 |
|
224 |
Args:
|
225 |
question (str): Question to answer
|
226 |
-
file_path (str): The .py file path
|
227 |
|
228 |
Returns:
|
229 |
str: Answer to the question
|
@@ -308,8 +308,8 @@ def run_crew(question, file_path):
|
|
308 |
|
309 |
code_generation_agent = Agent(
|
310 |
role="Code Generation Agent",
|
311 |
-
goal="Given a question and optional .csv, .xls, .xlsx, .json, .jsonl file, generate
|
312 |
-
backstory="As an expert Python code generation assistant, you generate
|
313 |
allow_delegation=False,
|
314 |
llm=AGENT_MODEL,
|
315 |
max_iter=2,
|
@@ -319,7 +319,7 @@ def run_crew(question, file_path):
|
|
319 |
|
320 |
code_execution_agent = Agent(
|
321 |
role="Code Execution Agent",
|
322 |
-
goal="Given a question and .py file, execute the file to help answer question \"{question}\"",
|
323 |
backstory="As an expert Python code execution assistant, you execute the code file to help answer the question.",
|
324 |
allow_delegation=False,
|
325 |
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 document file, generate 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 document file path
|
189 |
|
190 |
Returns:
|
191 |
str: Answer to the question
|
|
|
219 |
|
220 |
@tool("Code Execution Tool")
|
221 |
def code_execution_tool(question: str, file_path: str) -> str:
|
222 |
+
"""Given a question and .py Python file, execute the file to answer the question.
|
223 |
|
224 |
Args:
|
225 |
question (str): Question to answer
|
226 |
+
file_path (str): The .py Python file path
|
227 |
|
228 |
Returns:
|
229 |
str: Answer to the question
|
|
|
308 |
|
309 |
code_generation_agent = Agent(
|
310 |
role="Code Generation Agent",
|
311 |
+
goal="Given a question and optional .csv, .xls, .xlsx, .json, .jsonl document file, generate code to help answer the question: \"{question}\"",
|
312 |
+
backstory="As an expert Python code generation assistant, you generate code to help answer the question.",
|
313 |
allow_delegation=False,
|
314 |
llm=AGENT_MODEL,
|
315 |
max_iter=2,
|
|
|
319 |
|
320 |
code_execution_agent = Agent(
|
321 |
role="Code Execution Agent",
|
322 |
+
goal="Given a question and .py Python file, execute the file to help answer the question: \"{question}\"",
|
323 |
backstory="As an expert Python code execution assistant, you execute the code file to help answer the question.",
|
324 |
allow_delegation=False,
|
325 |
llm=AGENT_MODEL,
|