Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added indication of what our default end_state is #294

Merged
merged 1 commit into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion agentops/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ def end_session(
End the current session with the AgentOps service.

Args:
end_state (str): The final state of the session. Options: Success, Fail, or Indeterminate.
end_state (str): The final state of the session. Options: Success, Fail, or Indeterminate (default).
end_state_reason (str, optional): The reason for ending the session.
video (str, optional): The video screen recording of the session
is_auto_end (bool, optional): is this an automatic use of end_session and should be skipped with skip_auto_end_session
Expand Down
13 changes: 12 additions & 1 deletion agentops/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,17 @@ class EventType(Enum):


class EndState(Enum):
"""
Enum representing the possible end states of a session.

Attributes:
SUCCESS: Indicates the session ended successfully.
FAIL: Indicates the session failed.
INDETERMINATE (default): Indicates the session ended with an indeterminate state.
This is the default state if not specified, e.g. if you forget to call end_session()
at the end of your program or don't pass it the end_state parameter
"""

SUCCESS = "Success"
FAIL = "Fail"
INDETERMINATE = "Indeterminate"
INDETERMINATE = "Indeterminate" # Default
Loading