Skip to content
Open
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
12 changes: 6 additions & 6 deletions agentplatform/_genai/sessions.py
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ def _update(
*,
name: str,
config: Optional[types.UpdateAgentEngineSessionConfigOrDict] = None,
) -> types.AgentEngineSessionOperation:
) -> types.Session:
"""
Updates an Agent Engine session.

Expand All @@ -636,7 +636,7 @@ def _update(
Optional. Additional configurations for updating the Agent Engine session.

Returns:
AgentEngineSessionOperation: The operation for updating the Agent Engine session.
Session: The updated Agent Engine session.

"""

Expand Down Expand Up @@ -680,7 +680,7 @@ def _update(

response_dict = {} if not response.body else json.loads(response.body)

return_value = types.AgentEngineSessionOperation._from_response(
return_value = types.Session._from_response(
response=response_dict,
kwargs=(
{
Expand Down Expand Up @@ -1222,7 +1222,7 @@ async def _update(
*,
name: str,
config: Optional[types.UpdateAgentEngineSessionConfigOrDict] = None,
) -> types.AgentEngineSessionOperation:
) -> types.Session:
"""
Updates an Agent Engine session.

Expand All @@ -1233,7 +1233,7 @@ async def _update(
Optional. Additional configurations for updating the Agent Engine session.

Returns:
AgentEngineSessionOperation: The operation for updating the Agent Engine session.
Session: The updated Agent Engine session.

"""

Expand Down Expand Up @@ -1279,7 +1279,7 @@ async def _update(

response_dict = {} if not response.body else json.loads(response.body)

return_value = types.AgentEngineSessionOperation._from_response(
return_value = types.Session._from_response(
response=response_dict,
kwargs=(
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@


def test_private_update_session(client):
agent_engine_session_operation = client.agent_engines.sessions._update(
session = client.agent_engines.sessions._update(
name="reasoningEngines/2886612747586371584/sessions/3080649749292908544",
config=types.UpdateAgentEngineSessionConfig(
display_name="test-agent-engine-session-updated",
user_id="test-user-id",
),
)
assert isinstance(agent_engine_session_operation, types.AgentEngineSessionOperation)
assert isinstance(session, types.Session)


pytestmark = pytest_helper.setup(
Expand Down
Loading