Skip to content
Merged
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
13 changes: 6 additions & 7 deletions src/truefoundry_gateway_sdk/agents/agent_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
if typing.TYPE_CHECKING:
from ..client import AsyncTrueFoundryGateway, TrueFoundryGateway
from ..core.request_options import RequestOptions
from ..types.draft_session import DraftSession as RawDraftSession
from ..types.list_session_events_response import ListSessionEventsResponse
from ..types.list_turns_response import ListTurnsResponse
from ..types.previous_turn_id_input import PreviousTurnIdInput
Expand Down Expand Up @@ -71,9 +70,9 @@ class AgentSession:
A session enriched with convenience methods: prepare_turn, list_turns, get_turn, list_events, cancel.
"""

def __init__(self, session: typing.Union[RawSession, RawDraftSession], client: TrueFoundryGateway) -> None:
def __init__(self, session: RawSession, client: TrueFoundryGateway) -> None:
self._id: str = session.id
self._agent_name: typing.Optional[str] = session.agent_name
self._agent_name: str = session.agent_name
self._title: typing.Optional[str] = session.title
self._created_by_subject: Subject = session.created_by_subject
self._created_at: str = session.created_at
Expand All @@ -94,7 +93,7 @@ def id(self) -> str:
return self._id

@property
def agent_name(self) -> typing.Optional[str]:
def agent_name(self) -> str:
"""
Returns
-------
Expand Down Expand Up @@ -280,9 +279,9 @@ class AsyncAgentSession:
Async version of AgentSession.
"""

def __init__(self, session: typing.Union[RawSession, RawDraftSession], client: AsyncTrueFoundryGateway) -> None:
def __init__(self, session: RawSession, client: AsyncTrueFoundryGateway) -> None:
self._id: str = session.id
self._agent_name: typing.Optional[str] = session.agent_name
self._agent_name: str = session.agent_name
self._title: typing.Optional[str] = session.title
self._created_by_subject: Subject = session.created_by_subject
self._created_at: str = session.created_at
Expand All @@ -303,7 +302,7 @@ def id(self) -> str:
return self._id

@property
def agent_name(self) -> typing.Optional[str]:
def agent_name(self) -> str:
"""
Returns
-------
Expand Down
Loading