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

fix: init passes arguments in the wrong order (#132)

Shawn Qiu42316037fa02
diff --git a/agentops/__init__.py b/agentops/__init__.py
index e09375a0..635112b4 100755
--- a/agentops/__init__.py
+++ b/agentops/__init__.py
@@ -12,14 +12,21 @@ from os import environ
def init(api_key: Optional[str] = None,
parent_key: Optional[str] = None,
- tags: Optional[List[str]] = None,
endpoint: Optional[str] = None,
max_wait_time: Optional[int] = None,
max_queue_size: Optional[int] = None,
+ tags: Optional[List[str]] = None,
override=True,
auto_start_session=True):
- Client(api_key, parent_key, tags, endpoint, max_wait_time, max_queue_size, override, auto_start_session)
+ Client(api_key=api_key,
+ parent_key=parent_key,
+ endpoint=endpoint,
+ max_wait_time=max_wait_time,
+ max_queue_size=max_queue_size,
+ tags=tags,
+ override=override,
+ auto_start_session=auto_start_session)
def end_session(end_state: str,
diff --git a/agentops/client.py b/agentops/client.py
index 9b802f5f..315bc13e 100644
--- a/agentops/client.py
+++ b/agentops/client.py
@@ -66,11 +66,11 @@ class Client(metaclass=MetaClient):
self._tags = tags
try:
- self.config = Configuration(api_key,
- parent_key,
- endpoint,
- max_wait_time,
- max_queue_size)
+ self.config = Configuration(api_key=api_key,
+ parent_key=parent_key,
+ endpoint=endpoint,
+ max_wait_time=max_wait_time,
+ max_queue_size=max_queue_size)
except ConfigurationError:
return
@@ -213,7 +213,7 @@ class Client(metaclass=MetaClient):
self._session = Session(uuid4(), tags or self._tags, host_env=get_host_env())
self._worker = Worker(config or self.config)
self._worker.start_session(self._session)
- logging.info('View info on this session at https://agentops.ai/dashboard?session_id={}'
+ logging.info('View info on this session at https://app.agentops.ai/dashboard?session_id={}'
.format(self._session.session_id))
def end_session(self,