Skip to content

Python SDK for AI agent monitoring, LLM cost tracking, benchmarking, and more. Integrates with most LLMs and agent frameworks including CrewAI, Agno, OpenAI Agents SDK, Langchain, Autogen, AG2, and CamelAI

fixed unbound code issue

reibsf5c612a36fa1
diff --git a/agentops/client.py b/agentops/client.py
index ee173e19..2cf57abb 100644
--- a/agentops/client.py
+++ b/agentops/client.py
@@ -139,12 +139,12 @@ class Client:
@functools.wraps(func)
async def async_wrapper(*args, **kwargs):
return await self._record_event_async(func, event_name, tags, *args, **kwargs)
+ return async_wrapper
else:
@functools.wraps(func)
def sync_wrapper(*args, **kwargs):
return self._record_event_sync(func, event_name, tags, *args, **kwargs)
-
- return async_wrapper if inspect.iscoroutinefunction(func) else sync_wrapper
+ return sync_wrapper
return decorator