Unfortunately it doesn’t work..
Also, sometimes when i run it it gives:
Error in code parsing:
Your code snippet is invalid, because the regex pattern ```(?:py|python)?\s*\n(.*?)\n``` was not found in it.
Here is your code snippet:
def create_forecasting_agent(model):
forecast_agent = CodeAgent(
name='forecast_agent',
model=model,
tools=[create_forecast_model],
additional_authorized_imports=["pandas", "numpy", "prophet", "matplotlib"],
max_steps=3,
verbosity_level=LogLevel.INFO,
planning_interval=1
)
return forecast_agent