Skip to content

Commit

Permalink
rename decorator
Browse files Browse the repository at this point in the history
  • Loading branch information
japdubengsub committed Jan 9, 2025
1 parent 94411a7 commit afd1efe
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions sdks/python/src/opik/integrations/crewai/opik_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ def track_crewai(

decorator_factory = crewai_decorator.CrewAITrackDecorator()

kickoff_decorator = decorator_factory.track(
crewai_wrapper = decorator_factory.track(
project_name=project_name,
)

crewai.Crew.kickoff = kickoff_decorator(crewai.Crew.kickoff)
crewai.Crew.kickoff_for_each = kickoff_decorator(crewai.Crew.kickoff_for_each)
crewai.Agent.execute_task = kickoff_decorator(crewai.Agent.execute_task)
crewai.Task.execute_sync = kickoff_decorator(crewai.Task.execute_sync)
litellm.completion = kickoff_decorator(litellm.completion)
crewai.Crew.kickoff = crewai_wrapper(crewai.Crew.kickoff)
crewai.Crew.kickoff_for_each = crewai_wrapper(crewai.Crew.kickoff_for_each)
crewai.Agent.execute_task = crewai_wrapper(crewai.Agent.execute_task)
crewai.Task.execute_sync = crewai_wrapper(crewai.Task.execute_sync)
litellm.completion = crewai_wrapper(litellm.completion)

return None

0 comments on commit afd1efe

Please sign in to comment.