agentops icon indicating copy to clipboard operation
agentops copied to clipboard

Fix end_session() function missing token parameter

Open devin-ai-integration[bot] opened this issue 9 months ago • 0 comments

Issue Description

When using agentops.end_session(), the function requires a token parameter that isn't documented in the client implementation.

Steps to Reproduce

import agentops
agentops.init()
# ... code that uses agentops ...
agentops.end_session('Success')  # This fails with TypeError

Error Message

TypeError: end_session() missing 1 required positional argument: 'token'

Root Cause

The end_session() function in agentops/__init__.py requires both a span and token parameter, but the client implementation in client.py only requires an end_state parameter.

The issue is that __init__.py is calling the legacy version of end_session() which requires both parameters, while the client implementation has been updated.

Proposed Solution

Update the end_session() function in __init__.py to match the client implementation, removing the token parameter requirement.