@@ -37,7 +37,7 @@ def create_session(
3737 discoveryengine.Session: The newly created Session.
3838 """
3939
40- client = discoveryengine .ConversationalSearchServiceClient ()
40+ client = discoveryengine .SessionServiceClient ()
4141
4242 session = client .create_session (
4343 # The full resource name of the engine
@@ -71,7 +71,7 @@ def get_session(
7171 session_id: The ID of the session.
7272 """
7373
74- client = discoveryengine .ConversationalSearchServiceClient ()
74+ client = discoveryengine .SessionServiceClient ()
7575
7676 # The full resource name of the session
7777 name = f"projects/{ project_id } /locations/{ location } /collections/default_collection/engines/{ engine_id } /sessions/{ session_id } "
@@ -104,7 +104,7 @@ def delete_session(
104104 session_id: The ID of the session.
105105 """
106106
107- client = discoveryengine .ConversationalSearchServiceClient ()
107+ client = discoveryengine .SessionServiceClient ()
108108
109109 # The full resource name of the session
110110 name = f"projects/{ project_id } /locations/{ location } /collections/default_collection/engines/{ engine_id } /sessions/{ session_id } "
@@ -138,7 +138,7 @@ def update_session(
138138 Returns:
139139 discoveryengine.Session: The updated Session.
140140 """
141- client = discoveryengine .ConversationalSearchServiceClient ()
141+ client = discoveryengine .SessionServiceClient ()
142142
143143 # The full resource name of the session
144144 name = f"projects/{ project_id } /locations/{ location } /collections/default_collection/engines/{ engine_id } /sessions/{ session_id } "
@@ -178,7 +178,7 @@ def list_sessions(
178178 discoveryengine.ListSessionsResponse: The list of sessions.
179179 """
180180
181- client = discoveryengine .ConversationalSearchServiceClient ()
181+ client = discoveryengine .SessionServiceClient ()
182182
183183 # The full resource name of the engine
184184 parent = f"projects/{ project_id } /locations/{ location } /collections/default_collection/engines/{ engine_id } "
0 commit comments