You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a an existing bug? Please link it here.
N/A
Describe the solution you'd like
The current implementation for the callback mechanism of CrewAI is enabled by passing a callback function as the Task attribute or Agent attribute. However, since the callback function is called only after the execution, it is challenging to have full observability including latency of the execution. Therefore, it would be great if a new callback attribute is added to Task, Agent and so on that is called before the execution.
defpre_method_callback(input):
...
defpost_method_callback(output):
...
fromcrewaiimportAgentagent=Agent(
role="Senior Data Scientist",
goal="Analyze and interpret complex datasets to provide actionable insights",
backstory="With over 10 years of experience in data science and machine learning, ""you excel at finding patterns in complex datasets.",
llm="gpt-4",
pre_callback=pre_method_callback,
post_callback=post_method_callback,
)
Describe alternatives you've considered
Alternatively, the callback function could be configured as a global configuration as DSPy does. In this approach, one callback class will be defined and configured globally. The callback class implements the callback methods for each major class (e.g. Crew, Task, Agent) separately. https://dspy.ai/tutorials/observability/
Additional context
No response
Willingness to Contribute
Yes, I'd be happy to submit a pull request
The text was updated successfully, but these errors were encountered:
Feature Area
Other (please specify in additional context)
Is your feature request related to a an existing bug? Please link it here.
N/A
Describe the solution you'd like
The current implementation for the callback mechanism of CrewAI is enabled by passing a callback function as the Task attribute or Agent attribute. However, since the callback function is called only after the execution, it is challenging to have full observability including latency of the execution. Therefore, it would be great if a new callback attribute is added to Task, Agent and so on that is called before the execution.
Describe alternatives you've considered
Alternatively, the callback function could be configured as a global configuration as DSPy does. In this approach, one callback class will be defined and configured globally. The callback class implements the callback methods for each major class (e.g. Crew, Task, Agent) separately.
https://dspy.ai/tutorials/observability/
Additional context
No response
Willingness to Contribute
Yes, I'd be happy to submit a pull request
The text was updated successfully, but these errors were encountered: