Skip to content

Commit

Permalink
fix: init passes arguments in the wrong order (#132)
Browse files Browse the repository at this point in the history
* fix: init passes arguments in the wrong order

* change the order
  • Loading branch information
siyangqiu authored Mar 29, 2024
1 parent 4018ac7 commit 4231603
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
11 changes: 9 additions & 2 deletions agentops/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,21 @@

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,
Expand Down
12 changes: 6 additions & 6 deletions agentops/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ def __init__(self,
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

Expand Down Expand Up @@ -213,7 +213,7 @@ def start_session(self, tags: Optional[List[str]] = None, config: Optional[Confi
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,
Expand Down

0 comments on commit 4231603

Please sign in to comment.