Spaces:
Sleeping
Sleeping
Update agents/simple_tools.py
#18
by
sahil-1-garg
- opened
- agents/simple_tools.py +5 -7
agents/simple_tools.py
CHANGED
|
@@ -204,8 +204,8 @@ def generate_balance_sheet(file_path: str, user_api_key: str = None, **kwargs) -
|
|
| 204 |
"execution_time": execution_time
|
| 205 |
}
|
| 206 |
|
| 207 |
-
@tool
|
| 208 |
-
def generate_pnl_statement(file_path: str) -> Dict[str, Any]:
|
| 209 |
"""
|
| 210 |
Generate P&L statement from trial balance file using complete pipeline
|
| 211 |
Args:
|
|
@@ -219,8 +219,7 @@ def generate_pnl_statement(file_path: str) -> Dict[str, Any]:
|
|
| 219 |
try:
|
| 220 |
# Use the complete P&L pipeline from existing endpoint
|
| 221 |
env = os.environ.copy()
|
| 222 |
-
|
| 223 |
-
env["OPENROUTER_API_KEY"] = os.getenv("OPENROUTER_API_KEY")
|
| 224 |
env["INPUT_FILE"] = "data/clean_financial_data_pnl.json"
|
| 225 |
cwd = os.getcwd()
|
| 226 |
|
|
@@ -294,7 +293,7 @@ def generate_pnl_statement(file_path: str) -> Dict[str, Any]:
|
|
| 294 |
}
|
| 295 |
|
| 296 |
@tool
|
| 297 |
-
def generate_cash_flow_statement(file_path: str) -> Dict[str, Any]:
|
| 298 |
"""
|
| 299 |
Generate cash flow statement from trial balance file using complete pipeline
|
| 300 |
Args:
|
|
@@ -309,8 +308,7 @@ def generate_cash_flow_statement(file_path: str) -> Dict[str, Any]:
|
|
| 309 |
try:
|
| 310 |
# Use the complete CF pipeline from existing endpoint
|
| 311 |
env = os.environ.copy()
|
| 312 |
-
|
| 313 |
-
env["OPENROUTER_API_KEY"] = os.getenv("OPENROUTER_API_KEY")
|
| 314 |
env["INPUT_FILE"] = "data/clean_financial_data_cfs.json"
|
| 315 |
env["CFS_JSON_INPUT"] = "data/clean_financial_data_cfs.json"
|
| 316 |
env["CFS_JSON_OUTPUT"] = "data/extracted_cfs_data.json"
|
|
|
|
| 204 |
"execution_time": execution_time
|
| 205 |
}
|
| 206 |
|
| 207 |
+
@tool
|
| 208 |
+
def generate_pnl_statement(file_path: str, **kwargs) -> Dict[str, Any]:
|
| 209 |
"""
|
| 210 |
Generate P&L statement from trial balance file using complete pipeline
|
| 211 |
Args:
|
|
|
|
| 219 |
try:
|
| 220 |
# Use the complete P&L pipeline from existing endpoint
|
| 221 |
env = os.environ.copy()
|
| 222 |
+
|
|
|
|
| 223 |
env["INPUT_FILE"] = "data/clean_financial_data_pnl.json"
|
| 224 |
cwd = os.getcwd()
|
| 225 |
|
|
|
|
| 293 |
}
|
| 294 |
|
| 295 |
@tool
|
| 296 |
+
def generate_cash_flow_statement(file_path: str, **kwargs) -> Dict[str, Any]:
|
| 297 |
"""
|
| 298 |
Generate cash flow statement from trial balance file using complete pipeline
|
| 299 |
Args:
|
|
|
|
| 308 |
try:
|
| 309 |
# Use the complete CF pipeline from existing endpoint
|
| 310 |
env = os.environ.copy()
|
| 311 |
+
|
|
|
|
| 312 |
env["INPUT_FILE"] = "data/clean_financial_data_cfs.json"
|
| 313 |
env["CFS_JSON_INPUT"] = "data/clean_financial_data_cfs.json"
|
| 314 |
env["CFS_JSON_OUTPUT"] = "data/extracted_cfs_data.json"
|