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
Python agentagentopsagents-sdkaianthropicautogencost-estimationcrewaievalsevaluation-metricsgroqlangchainllmmistralollamaopenaiopenai-agents
fix: remove the rest of the rating
Shawn Qiudae28d0fba47
diff --git a/agentops/client.py b/agentops/client.pyindex f19c4ae8..5d1cf668 100644--- a/agentops/client.py+++ b/agentops/client.py@@ -227,7 +227,7 @@ class Client(metaclass=MetaClient):return logging.warn("AgentOps: Cannot end session - no current session")self._session.video = video- self._session.end_session(end_state, rating, end_state_reason)+ self._session.end_session(end_state, end_state_reason)self._worker.end_session(self._session)self._session = Noneself._worker = Nonediff --git a/agentops/session.py b/agentops/session.pyindex 4944059c..1c2c348a 100644--- a/agentops/session.py+++ b/agentops/session.py@@ -15,14 +15,12 @@ class Session:init_timestamp (float): The timestamp for when the session started, represented as seconds since the epoch.end_timestamp (float, optional): The timestamp for when the session ended, represented as seconds since the epoch. This is only set after end_session is called.end_state (str, optional): The final state of the session. Suggested: "Success", "Fail", "Indeterminate"- rating (str, optional): The rating for the session.end_state_reason (str, optional): The reason for ending the session."""def __init__(self, session_id: UUID, tags: Optional[List[str]] = None, host_env: Optional[dict] = None):self.end_timestamp = None- self.rating = Noneself.end_state = Noneself.session_id = session_idself.init_timestamp = get_ISO_time()@@ -40,7 +38,7 @@ class Session:"""self.video = video- def end_session(self, end_state: str = "Indeterminate", rating: Optional[str] = None, end_state_reason: Optional[str] = None):+ def end_session(self, end_state: str = "Indeterminate", end_state_reason: Optional[str] = None):"""End the session with a specified state, rating, and reason.@@ -50,7 +48,6 @@ class Session:end_state_reason (str, optional): The reason for ending the session. Provides context for why the session ended."""self.end_state = end_state- self.rating = ratingself.end_state_reason = end_state_reasonself.end_timestamp = get_ISO_time()