h2ogpte 1.6.55rc1__py3-none-any.whl → 1.7.0rc2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. h2ogpte/__init__.py +1 -1
  2. h2ogpte/h2ogpte.py +213 -20
  3. h2ogpte/h2ogpte_async.py +213 -20
  4. h2ogpte/rest_async/__init__.py +3 -2
  5. h2ogpte/rest_async/api/agents_api.py +25 -25
  6. h2ogpte/rest_async/api/chat_api.py +1077 -21
  7. h2ogpte/rest_async/api/collections_api.py +281 -0
  8. h2ogpte/rest_async/api/models_api.py +35 -67
  9. h2ogpte/rest_async/api_client.py +1 -1
  10. h2ogpte/rest_async/configuration.py +1 -1
  11. h2ogpte/rest_async/models/__init__.py +2 -1
  12. h2ogpte/rest_async/models/chat_completion_request.py +6 -2
  13. h2ogpte/rest_async/models/chat_settings.py +6 -2
  14. h2ogpte/rest_async/models/chat_settings_tags.py +140 -0
  15. h2ogpte/rest_async/models/extractor.py +26 -2
  16. h2ogpte/rest_async/models/extractor_create_request.py +29 -5
  17. h2ogpte/rest_async/models/ingest_from_confluence_body.py +4 -2
  18. h2ogpte/rest_async/models/{create_topic_model_job_request.py → tag_filter.py} +11 -9
  19. h2ogpte/rest_sync/__init__.py +3 -2
  20. h2ogpte/rest_sync/api/agents_api.py +25 -25
  21. h2ogpte/rest_sync/api/chat_api.py +1077 -21
  22. h2ogpte/rest_sync/api/collections_api.py +281 -0
  23. h2ogpte/rest_sync/api/models_api.py +35 -67
  24. h2ogpte/rest_sync/api_client.py +1 -1
  25. h2ogpte/rest_sync/configuration.py +1 -1
  26. h2ogpte/rest_sync/models/__init__.py +2 -1
  27. h2ogpte/rest_sync/models/chat_completion_request.py +6 -2
  28. h2ogpte/rest_sync/models/chat_settings.py +6 -2
  29. h2ogpte/rest_sync/models/chat_settings_tags.py +140 -0
  30. h2ogpte/rest_sync/models/extractor.py +26 -2
  31. h2ogpte/rest_sync/models/extractor_create_request.py +29 -5
  32. h2ogpte/rest_sync/models/ingest_from_confluence_body.py +4 -2
  33. h2ogpte/rest_sync/models/{create_topic_model_job_request.py → tag_filter.py} +11 -9
  34. h2ogpte/session.py +10 -5
  35. h2ogpte/session_async.py +10 -2
  36. h2ogpte/types.py +28 -1
  37. {h2ogpte-1.6.55rc1.dist-info → h2ogpte-1.7.0rc2.dist-info}/METADATA +1 -1
  38. {h2ogpte-1.6.55rc1.dist-info → h2ogpte-1.7.0rc2.dist-info}/RECORD +41 -39
  39. {h2ogpte-1.6.55rc1.dist-info → h2ogpte-1.7.0rc2.dist-info}/WHEEL +0 -0
  40. {h2ogpte-1.6.55rc1.dist-info → h2ogpte-1.7.0rc2.dist-info}/entry_points.txt +0 -0
  41. {h2ogpte-1.6.55rc1.dist-info → h2ogpte-1.7.0rc2.dist-info}/top_level.txt +0 -0
@@ -2258,6 +2258,270 @@ class ChatApi:
2258
2258
 
2259
2259
 
2260
2260
 
2261
+ @validate_call
2262
+ def finish_chat_message(
2263
+ self,
2264
+ question_id: Annotated[StrictStr, Field(description="The ID of the chat question to finish gracefully.")],
2265
+ _request_timeout: Union[
2266
+ None,
2267
+ Annotated[StrictFloat, Field(gt=0)],
2268
+ Tuple[
2269
+ Annotated[StrictFloat, Field(gt=0)],
2270
+ Annotated[StrictFloat, Field(gt=0)]
2271
+ ]
2272
+ ] = None,
2273
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2274
+ _content_type: Optional[StrictStr] = None,
2275
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2276
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2277
+ ) -> None:
2278
+ """Signal the LLM to finish its response gracefully.
2279
+
2280
+ Signals the LLM to complete its current thought and finish naturally, providing a more coherent ending than an immediate stop.
2281
+
2282
+ :param question_id: The ID of the chat question to finish gracefully. (required)
2283
+ :type question_id: str
2284
+ :param _request_timeout: timeout setting for this request. If one
2285
+ number provided, it will be total request
2286
+ timeout. It can also be a pair (tuple) of
2287
+ (connection, read) timeouts.
2288
+ :type _request_timeout: int, tuple(int, int), optional
2289
+ :param _request_auth: set to override the auth_settings for an a single
2290
+ request; this effectively ignores the
2291
+ authentication in the spec for a single request.
2292
+ :type _request_auth: dict, optional
2293
+ :param _content_type: force content-type for the request.
2294
+ :type _content_type: str, Optional
2295
+ :param _headers: set to override the headers for a single
2296
+ request; this effectively ignores the headers
2297
+ in the spec for a single request.
2298
+ :type _headers: dict, optional
2299
+ :param _host_index: set to override the host_index for a single
2300
+ request; this effectively ignores the host_index
2301
+ in the spec for a single request.
2302
+ :type _host_index: int, optional
2303
+ :return: Returns the result object.
2304
+ """ # noqa: E501
2305
+
2306
+ _param = self._finish_chat_message_serialize(
2307
+ question_id=question_id,
2308
+ _request_auth=_request_auth,
2309
+ _content_type=_content_type,
2310
+ _headers=_headers,
2311
+ _host_index=_host_index
2312
+ )
2313
+
2314
+ _response_types_map: Dict[str, Optional[str]] = {
2315
+ '204': None,
2316
+ '401': "EndpointError",
2317
+ }
2318
+ response_data = self.api_client.call_api(
2319
+ *_param,
2320
+ _request_timeout=_request_timeout
2321
+ )
2322
+ response_data.read()
2323
+ return self.api_client.response_deserialize(
2324
+ response_data=response_data,
2325
+ response_types_map=_response_types_map,
2326
+ ).data
2327
+
2328
+
2329
+ @validate_call
2330
+ def finish_chat_message_with_http_info(
2331
+ self,
2332
+ question_id: Annotated[StrictStr, Field(description="The ID of the chat question to finish gracefully.")],
2333
+ _request_timeout: Union[
2334
+ None,
2335
+ Annotated[StrictFloat, Field(gt=0)],
2336
+ Tuple[
2337
+ Annotated[StrictFloat, Field(gt=0)],
2338
+ Annotated[StrictFloat, Field(gt=0)]
2339
+ ]
2340
+ ] = None,
2341
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2342
+ _content_type: Optional[StrictStr] = None,
2343
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2344
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2345
+ ) -> ApiResponse[None]:
2346
+ """Signal the LLM to finish its response gracefully.
2347
+
2348
+ Signals the LLM to complete its current thought and finish naturally, providing a more coherent ending than an immediate stop.
2349
+
2350
+ :param question_id: The ID of the chat question to finish gracefully. (required)
2351
+ :type question_id: str
2352
+ :param _request_timeout: timeout setting for this request. If one
2353
+ number provided, it will be total request
2354
+ timeout. It can also be a pair (tuple) of
2355
+ (connection, read) timeouts.
2356
+ :type _request_timeout: int, tuple(int, int), optional
2357
+ :param _request_auth: set to override the auth_settings for an a single
2358
+ request; this effectively ignores the
2359
+ authentication in the spec for a single request.
2360
+ :type _request_auth: dict, optional
2361
+ :param _content_type: force content-type for the request.
2362
+ :type _content_type: str, Optional
2363
+ :param _headers: set to override the headers for a single
2364
+ request; this effectively ignores the headers
2365
+ in the spec for a single request.
2366
+ :type _headers: dict, optional
2367
+ :param _host_index: set to override the host_index for a single
2368
+ request; this effectively ignores the host_index
2369
+ in the spec for a single request.
2370
+ :type _host_index: int, optional
2371
+ :return: Returns the result object.
2372
+ """ # noqa: E501
2373
+
2374
+ _param = self._finish_chat_message_serialize(
2375
+ question_id=question_id,
2376
+ _request_auth=_request_auth,
2377
+ _content_type=_content_type,
2378
+ _headers=_headers,
2379
+ _host_index=_host_index
2380
+ )
2381
+
2382
+ _response_types_map: Dict[str, Optional[str]] = {
2383
+ '204': None,
2384
+ '401': "EndpointError",
2385
+ }
2386
+ response_data = self.api_client.call_api(
2387
+ *_param,
2388
+ _request_timeout=_request_timeout
2389
+ )
2390
+ response_data.read()
2391
+ return self.api_client.response_deserialize(
2392
+ response_data=response_data,
2393
+ response_types_map=_response_types_map,
2394
+ )
2395
+
2396
+
2397
+ @validate_call
2398
+ def finish_chat_message_without_preload_content(
2399
+ self,
2400
+ question_id: Annotated[StrictStr, Field(description="The ID of the chat question to finish gracefully.")],
2401
+ _request_timeout: Union[
2402
+ None,
2403
+ Annotated[StrictFloat, Field(gt=0)],
2404
+ Tuple[
2405
+ Annotated[StrictFloat, Field(gt=0)],
2406
+ Annotated[StrictFloat, Field(gt=0)]
2407
+ ]
2408
+ ] = None,
2409
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2410
+ _content_type: Optional[StrictStr] = None,
2411
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2412
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2413
+ ) -> RESTResponseType:
2414
+ """Signal the LLM to finish its response gracefully.
2415
+
2416
+ Signals the LLM to complete its current thought and finish naturally, providing a more coherent ending than an immediate stop.
2417
+
2418
+ :param question_id: The ID of the chat question to finish gracefully. (required)
2419
+ :type question_id: str
2420
+ :param _request_timeout: timeout setting for this request. If one
2421
+ number provided, it will be total request
2422
+ timeout. It can also be a pair (tuple) of
2423
+ (connection, read) timeouts.
2424
+ :type _request_timeout: int, tuple(int, int), optional
2425
+ :param _request_auth: set to override the auth_settings for an a single
2426
+ request; this effectively ignores the
2427
+ authentication in the spec for a single request.
2428
+ :type _request_auth: dict, optional
2429
+ :param _content_type: force content-type for the request.
2430
+ :type _content_type: str, Optional
2431
+ :param _headers: set to override the headers for a single
2432
+ request; this effectively ignores the headers
2433
+ in the spec for a single request.
2434
+ :type _headers: dict, optional
2435
+ :param _host_index: set to override the host_index for a single
2436
+ request; this effectively ignores the host_index
2437
+ in the spec for a single request.
2438
+ :type _host_index: int, optional
2439
+ :return: Returns the result object.
2440
+ """ # noqa: E501
2441
+
2442
+ _param = self._finish_chat_message_serialize(
2443
+ question_id=question_id,
2444
+ _request_auth=_request_auth,
2445
+ _content_type=_content_type,
2446
+ _headers=_headers,
2447
+ _host_index=_host_index
2448
+ )
2449
+
2450
+ _response_types_map: Dict[str, Optional[str]] = {
2451
+ '204': None,
2452
+ '401': "EndpointError",
2453
+ }
2454
+ response_data = self.api_client.call_api(
2455
+ *_param,
2456
+ _request_timeout=_request_timeout
2457
+ )
2458
+ return response_data.response
2459
+
2460
+
2461
+ def _finish_chat_message_serialize(
2462
+ self,
2463
+ question_id,
2464
+ _request_auth,
2465
+ _content_type,
2466
+ _headers,
2467
+ _host_index,
2468
+ ) -> RequestSerialized:
2469
+
2470
+ _host = None
2471
+
2472
+ _collection_formats: Dict[str, str] = {
2473
+ }
2474
+
2475
+ _path_params: Dict[str, str] = {}
2476
+ _query_params: List[Tuple[str, str]] = []
2477
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2478
+ _form_params: List[Tuple[str, str]] = []
2479
+ _files: Dict[
2480
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2481
+ ] = {}
2482
+ _body_params: Optional[bytes] = None
2483
+
2484
+ # process the path parameters
2485
+ if question_id is not None:
2486
+ _path_params['question_id'] = question_id
2487
+ # process the query parameters
2488
+ # process the header parameters
2489
+ # process the form parameters
2490
+ # process the body parameter
2491
+
2492
+
2493
+ # set the HTTP header `Accept`
2494
+ if 'Accept' not in _header_params:
2495
+ _header_params['Accept'] = self.api_client.select_header_accept(
2496
+ [
2497
+ 'application/json'
2498
+ ]
2499
+ )
2500
+
2501
+
2502
+ # authentication setting
2503
+ _auth_settings: List[str] = [
2504
+ 'bearerAuth'
2505
+ ]
2506
+
2507
+ return self.api_client.param_serialize(
2508
+ method='POST',
2509
+ resource_path='/messages/{question_id}/finish',
2510
+ path_params=_path_params,
2511
+ query_params=_query_params,
2512
+ header_params=_header_params,
2513
+ body=_body_params,
2514
+ post_params=_form_params,
2515
+ files=_files,
2516
+ auth_settings=_auth_settings,
2517
+ collection_formats=_collection_formats,
2518
+ _host=_host,
2519
+ _request_auth=_request_auth
2520
+ )
2521
+
2522
+
2523
+
2524
+
2261
2525
  @validate_call
2262
2526
  def get_agent_server_directory_stats(
2263
2527
  self,
@@ -5865,10 +6129,9 @@ class ChatApi:
5865
6129
 
5866
6130
 
5867
6131
  @validate_call
5868
- def set_message_votes(
6132
+ def pause_chat_message(
5869
6133
  self,
5870
- message_id: Annotated[StrictStr, Field(description="Id of the chat message.")],
5871
- message_vote_update_request: MessageVoteUpdateRequest,
6134
+ question_id: Annotated[StrictStr, Field(description="The ID of the chat question to pause.")],
5872
6135
  _request_timeout: Union[
5873
6136
  None,
5874
6137
  Annotated[StrictFloat, Field(gt=0)],
@@ -5882,14 +6145,12 @@ class ChatApi:
5882
6145
  _headers: Optional[Dict[StrictStr, Any]] = None,
5883
6146
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
5884
6147
  ) -> None:
5885
- """Changes the vote value of a chat message.
6148
+ """Pause a streaming chat response.
5886
6149
 
5887
- Set the exact value of a vote for a chat message. Any message type can be updated, but only LLM response votes will be visible in the UI. The expectation is 0 - unvoted, -1 - dislike, 1 - like. Values outside of this will not be viewable in the UI.
6150
+ Pauses the streaming generation of a chat message response. The message can be resumed later using the resume endpoint.
5888
6151
 
5889
- :param message_id: Id of the chat message. (required)
5890
- :type message_id: str
5891
- :param message_vote_update_request: (required)
5892
- :type message_vote_update_request: MessageVoteUpdateRequest
6152
+ :param question_id: The ID of the chat question to pause. (required)
6153
+ :type question_id: str
5893
6154
  :param _request_timeout: timeout setting for this request. If one
5894
6155
  number provided, it will be total request
5895
6156
  timeout. It can also be a pair (tuple) of
@@ -5912,9 +6173,8 @@ class ChatApi:
5912
6173
  :return: Returns the result object.
5913
6174
  """ # noqa: E501
5914
6175
 
5915
- _param = self._set_message_votes_serialize(
5916
- message_id=message_id,
5917
- message_vote_update_request=message_vote_update_request,
6176
+ _param = self._pause_chat_message_serialize(
6177
+ question_id=question_id,
5918
6178
  _request_auth=_request_auth,
5919
6179
  _content_type=_content_type,
5920
6180
  _headers=_headers,
@@ -5924,7 +6184,6 @@ class ChatApi:
5924
6184
  _response_types_map: Dict[str, Optional[str]] = {
5925
6185
  '204': None,
5926
6186
  '401': "EndpointError",
5927
- '409': "EndpointError",
5928
6187
  }
5929
6188
  response_data = self.api_client.call_api(
5930
6189
  *_param,
@@ -5938,10 +6197,9 @@ class ChatApi:
5938
6197
 
5939
6198
 
5940
6199
  @validate_call
5941
- def set_message_votes_with_http_info(
6200
+ def pause_chat_message_with_http_info(
5942
6201
  self,
5943
- message_id: Annotated[StrictStr, Field(description="Id of the chat message.")],
5944
- message_vote_update_request: MessageVoteUpdateRequest,
6202
+ question_id: Annotated[StrictStr, Field(description="The ID of the chat question to pause.")],
5945
6203
  _request_timeout: Union[
5946
6204
  None,
5947
6205
  Annotated[StrictFloat, Field(gt=0)],
@@ -5955,13 +6213,547 @@ class ChatApi:
5955
6213
  _headers: Optional[Dict[StrictStr, Any]] = None,
5956
6214
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
5957
6215
  ) -> ApiResponse[None]:
5958
- """Changes the vote value of a chat message.
6216
+ """Pause a streaming chat response.
5959
6217
 
5960
- Set the exact value of a vote for a chat message. Any message type can be updated, but only LLM response votes will be visible in the UI. The expectation is 0 - unvoted, -1 - dislike, 1 - like. Values outside of this will not be viewable in the UI.
6218
+ Pauses the streaming generation of a chat message response. The message can be resumed later using the resume endpoint.
5961
6219
 
5962
- :param message_id: Id of the chat message. (required)
5963
- :type message_id: str
5964
- :param message_vote_update_request: (required)
6220
+ :param question_id: The ID of the chat question to pause. (required)
6221
+ :type question_id: str
6222
+ :param _request_timeout: timeout setting for this request. If one
6223
+ number provided, it will be total request
6224
+ timeout. It can also be a pair (tuple) of
6225
+ (connection, read) timeouts.
6226
+ :type _request_timeout: int, tuple(int, int), optional
6227
+ :param _request_auth: set to override the auth_settings for an a single
6228
+ request; this effectively ignores the
6229
+ authentication in the spec for a single request.
6230
+ :type _request_auth: dict, optional
6231
+ :param _content_type: force content-type for the request.
6232
+ :type _content_type: str, Optional
6233
+ :param _headers: set to override the headers for a single
6234
+ request; this effectively ignores the headers
6235
+ in the spec for a single request.
6236
+ :type _headers: dict, optional
6237
+ :param _host_index: set to override the host_index for a single
6238
+ request; this effectively ignores the host_index
6239
+ in the spec for a single request.
6240
+ :type _host_index: int, optional
6241
+ :return: Returns the result object.
6242
+ """ # noqa: E501
6243
+
6244
+ _param = self._pause_chat_message_serialize(
6245
+ question_id=question_id,
6246
+ _request_auth=_request_auth,
6247
+ _content_type=_content_type,
6248
+ _headers=_headers,
6249
+ _host_index=_host_index
6250
+ )
6251
+
6252
+ _response_types_map: Dict[str, Optional[str]] = {
6253
+ '204': None,
6254
+ '401': "EndpointError",
6255
+ }
6256
+ response_data = self.api_client.call_api(
6257
+ *_param,
6258
+ _request_timeout=_request_timeout
6259
+ )
6260
+ response_data.read()
6261
+ return self.api_client.response_deserialize(
6262
+ response_data=response_data,
6263
+ response_types_map=_response_types_map,
6264
+ )
6265
+
6266
+
6267
+ @validate_call
6268
+ def pause_chat_message_without_preload_content(
6269
+ self,
6270
+ question_id: Annotated[StrictStr, Field(description="The ID of the chat question to pause.")],
6271
+ _request_timeout: Union[
6272
+ None,
6273
+ Annotated[StrictFloat, Field(gt=0)],
6274
+ Tuple[
6275
+ Annotated[StrictFloat, Field(gt=0)],
6276
+ Annotated[StrictFloat, Field(gt=0)]
6277
+ ]
6278
+ ] = None,
6279
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
6280
+ _content_type: Optional[StrictStr] = None,
6281
+ _headers: Optional[Dict[StrictStr, Any]] = None,
6282
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
6283
+ ) -> RESTResponseType:
6284
+ """Pause a streaming chat response.
6285
+
6286
+ Pauses the streaming generation of a chat message response. The message can be resumed later using the resume endpoint.
6287
+
6288
+ :param question_id: The ID of the chat question to pause. (required)
6289
+ :type question_id: str
6290
+ :param _request_timeout: timeout setting for this request. If one
6291
+ number provided, it will be total request
6292
+ timeout. It can also be a pair (tuple) of
6293
+ (connection, read) timeouts.
6294
+ :type _request_timeout: int, tuple(int, int), optional
6295
+ :param _request_auth: set to override the auth_settings for an a single
6296
+ request; this effectively ignores the
6297
+ authentication in the spec for a single request.
6298
+ :type _request_auth: dict, optional
6299
+ :param _content_type: force content-type for the request.
6300
+ :type _content_type: str, Optional
6301
+ :param _headers: set to override the headers for a single
6302
+ request; this effectively ignores the headers
6303
+ in the spec for a single request.
6304
+ :type _headers: dict, optional
6305
+ :param _host_index: set to override the host_index for a single
6306
+ request; this effectively ignores the host_index
6307
+ in the spec for a single request.
6308
+ :type _host_index: int, optional
6309
+ :return: Returns the result object.
6310
+ """ # noqa: E501
6311
+
6312
+ _param = self._pause_chat_message_serialize(
6313
+ question_id=question_id,
6314
+ _request_auth=_request_auth,
6315
+ _content_type=_content_type,
6316
+ _headers=_headers,
6317
+ _host_index=_host_index
6318
+ )
6319
+
6320
+ _response_types_map: Dict[str, Optional[str]] = {
6321
+ '204': None,
6322
+ '401': "EndpointError",
6323
+ }
6324
+ response_data = self.api_client.call_api(
6325
+ *_param,
6326
+ _request_timeout=_request_timeout
6327
+ )
6328
+ return response_data.response
6329
+
6330
+
6331
+ def _pause_chat_message_serialize(
6332
+ self,
6333
+ question_id,
6334
+ _request_auth,
6335
+ _content_type,
6336
+ _headers,
6337
+ _host_index,
6338
+ ) -> RequestSerialized:
6339
+
6340
+ _host = None
6341
+
6342
+ _collection_formats: Dict[str, str] = {
6343
+ }
6344
+
6345
+ _path_params: Dict[str, str] = {}
6346
+ _query_params: List[Tuple[str, str]] = []
6347
+ _header_params: Dict[str, Optional[str]] = _headers or {}
6348
+ _form_params: List[Tuple[str, str]] = []
6349
+ _files: Dict[
6350
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
6351
+ ] = {}
6352
+ _body_params: Optional[bytes] = None
6353
+
6354
+ # process the path parameters
6355
+ if question_id is not None:
6356
+ _path_params['question_id'] = question_id
6357
+ # process the query parameters
6358
+ # process the header parameters
6359
+ # process the form parameters
6360
+ # process the body parameter
6361
+
6362
+
6363
+ # set the HTTP header `Accept`
6364
+ if 'Accept' not in _header_params:
6365
+ _header_params['Accept'] = self.api_client.select_header_accept(
6366
+ [
6367
+ 'application/json'
6368
+ ]
6369
+ )
6370
+
6371
+
6372
+ # authentication setting
6373
+ _auth_settings: List[str] = [
6374
+ 'bearerAuth'
6375
+ ]
6376
+
6377
+ return self.api_client.param_serialize(
6378
+ method='POST',
6379
+ resource_path='/messages/{question_id}/pause',
6380
+ path_params=_path_params,
6381
+ query_params=_query_params,
6382
+ header_params=_header_params,
6383
+ body=_body_params,
6384
+ post_params=_form_params,
6385
+ files=_files,
6386
+ auth_settings=_auth_settings,
6387
+ collection_formats=_collection_formats,
6388
+ _host=_host,
6389
+ _request_auth=_request_auth
6390
+ )
6391
+
6392
+
6393
+
6394
+
6395
+ @validate_call
6396
+ def resume_chat_message(
6397
+ self,
6398
+ question_id: Annotated[StrictStr, Field(description="The ID of the chat question to resume.")],
6399
+ _request_timeout: Union[
6400
+ None,
6401
+ Annotated[StrictFloat, Field(gt=0)],
6402
+ Tuple[
6403
+ Annotated[StrictFloat, Field(gt=0)],
6404
+ Annotated[StrictFloat, Field(gt=0)]
6405
+ ]
6406
+ ] = None,
6407
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
6408
+ _content_type: Optional[StrictStr] = None,
6409
+ _headers: Optional[Dict[StrictStr, Any]] = None,
6410
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
6411
+ ) -> None:
6412
+ """Resume a paused chat response.
6413
+
6414
+ Resumes the streaming generation of a previously paused chat message response.
6415
+
6416
+ :param question_id: The ID of the chat question to resume. (required)
6417
+ :type question_id: str
6418
+ :param _request_timeout: timeout setting for this request. If one
6419
+ number provided, it will be total request
6420
+ timeout. It can also be a pair (tuple) of
6421
+ (connection, read) timeouts.
6422
+ :type _request_timeout: int, tuple(int, int), optional
6423
+ :param _request_auth: set to override the auth_settings for an a single
6424
+ request; this effectively ignores the
6425
+ authentication in the spec for a single request.
6426
+ :type _request_auth: dict, optional
6427
+ :param _content_type: force content-type for the request.
6428
+ :type _content_type: str, Optional
6429
+ :param _headers: set to override the headers for a single
6430
+ request; this effectively ignores the headers
6431
+ in the spec for a single request.
6432
+ :type _headers: dict, optional
6433
+ :param _host_index: set to override the host_index for a single
6434
+ request; this effectively ignores the host_index
6435
+ in the spec for a single request.
6436
+ :type _host_index: int, optional
6437
+ :return: Returns the result object.
6438
+ """ # noqa: E501
6439
+
6440
+ _param = self._resume_chat_message_serialize(
6441
+ question_id=question_id,
6442
+ _request_auth=_request_auth,
6443
+ _content_type=_content_type,
6444
+ _headers=_headers,
6445
+ _host_index=_host_index
6446
+ )
6447
+
6448
+ _response_types_map: Dict[str, Optional[str]] = {
6449
+ '204': None,
6450
+ '401': "EndpointError",
6451
+ }
6452
+ response_data = self.api_client.call_api(
6453
+ *_param,
6454
+ _request_timeout=_request_timeout
6455
+ )
6456
+ response_data.read()
6457
+ return self.api_client.response_deserialize(
6458
+ response_data=response_data,
6459
+ response_types_map=_response_types_map,
6460
+ ).data
6461
+
6462
+
6463
+ @validate_call
6464
+ def resume_chat_message_with_http_info(
6465
+ self,
6466
+ question_id: Annotated[StrictStr, Field(description="The ID of the chat question to resume.")],
6467
+ _request_timeout: Union[
6468
+ None,
6469
+ Annotated[StrictFloat, Field(gt=0)],
6470
+ Tuple[
6471
+ Annotated[StrictFloat, Field(gt=0)],
6472
+ Annotated[StrictFloat, Field(gt=0)]
6473
+ ]
6474
+ ] = None,
6475
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
6476
+ _content_type: Optional[StrictStr] = None,
6477
+ _headers: Optional[Dict[StrictStr, Any]] = None,
6478
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
6479
+ ) -> ApiResponse[None]:
6480
+ """Resume a paused chat response.
6481
+
6482
+ Resumes the streaming generation of a previously paused chat message response.
6483
+
6484
+ :param question_id: The ID of the chat question to resume. (required)
6485
+ :type question_id: str
6486
+ :param _request_timeout: timeout setting for this request. If one
6487
+ number provided, it will be total request
6488
+ timeout. It can also be a pair (tuple) of
6489
+ (connection, read) timeouts.
6490
+ :type _request_timeout: int, tuple(int, int), optional
6491
+ :param _request_auth: set to override the auth_settings for an a single
6492
+ request; this effectively ignores the
6493
+ authentication in the spec for a single request.
6494
+ :type _request_auth: dict, optional
6495
+ :param _content_type: force content-type for the request.
6496
+ :type _content_type: str, Optional
6497
+ :param _headers: set to override the headers for a single
6498
+ request; this effectively ignores the headers
6499
+ in the spec for a single request.
6500
+ :type _headers: dict, optional
6501
+ :param _host_index: set to override the host_index for a single
6502
+ request; this effectively ignores the host_index
6503
+ in the spec for a single request.
6504
+ :type _host_index: int, optional
6505
+ :return: Returns the result object.
6506
+ """ # noqa: E501
6507
+
6508
+ _param = self._resume_chat_message_serialize(
6509
+ question_id=question_id,
6510
+ _request_auth=_request_auth,
6511
+ _content_type=_content_type,
6512
+ _headers=_headers,
6513
+ _host_index=_host_index
6514
+ )
6515
+
6516
+ _response_types_map: Dict[str, Optional[str]] = {
6517
+ '204': None,
6518
+ '401': "EndpointError",
6519
+ }
6520
+ response_data = self.api_client.call_api(
6521
+ *_param,
6522
+ _request_timeout=_request_timeout
6523
+ )
6524
+ response_data.read()
6525
+ return self.api_client.response_deserialize(
6526
+ response_data=response_data,
6527
+ response_types_map=_response_types_map,
6528
+ )
6529
+
6530
+
6531
+ @validate_call
6532
+ def resume_chat_message_without_preload_content(
6533
+ self,
6534
+ question_id: Annotated[StrictStr, Field(description="The ID of the chat question to resume.")],
6535
+ _request_timeout: Union[
6536
+ None,
6537
+ Annotated[StrictFloat, Field(gt=0)],
6538
+ Tuple[
6539
+ Annotated[StrictFloat, Field(gt=0)],
6540
+ Annotated[StrictFloat, Field(gt=0)]
6541
+ ]
6542
+ ] = None,
6543
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
6544
+ _content_type: Optional[StrictStr] = None,
6545
+ _headers: Optional[Dict[StrictStr, Any]] = None,
6546
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
6547
+ ) -> RESTResponseType:
6548
+ """Resume a paused chat response.
6549
+
6550
+ Resumes the streaming generation of a previously paused chat message response.
6551
+
6552
+ :param question_id: The ID of the chat question to resume. (required)
6553
+ :type question_id: str
6554
+ :param _request_timeout: timeout setting for this request. If one
6555
+ number provided, it will be total request
6556
+ timeout. It can also be a pair (tuple) of
6557
+ (connection, read) timeouts.
6558
+ :type _request_timeout: int, tuple(int, int), optional
6559
+ :param _request_auth: set to override the auth_settings for an a single
6560
+ request; this effectively ignores the
6561
+ authentication in the spec for a single request.
6562
+ :type _request_auth: dict, optional
6563
+ :param _content_type: force content-type for the request.
6564
+ :type _content_type: str, Optional
6565
+ :param _headers: set to override the headers for a single
6566
+ request; this effectively ignores the headers
6567
+ in the spec for a single request.
6568
+ :type _headers: dict, optional
6569
+ :param _host_index: set to override the host_index for a single
6570
+ request; this effectively ignores the host_index
6571
+ in the spec for a single request.
6572
+ :type _host_index: int, optional
6573
+ :return: Returns the result object.
6574
+ """ # noqa: E501
6575
+
6576
+ _param = self._resume_chat_message_serialize(
6577
+ question_id=question_id,
6578
+ _request_auth=_request_auth,
6579
+ _content_type=_content_type,
6580
+ _headers=_headers,
6581
+ _host_index=_host_index
6582
+ )
6583
+
6584
+ _response_types_map: Dict[str, Optional[str]] = {
6585
+ '204': None,
6586
+ '401': "EndpointError",
6587
+ }
6588
+ response_data = self.api_client.call_api(
6589
+ *_param,
6590
+ _request_timeout=_request_timeout
6591
+ )
6592
+ return response_data.response
6593
+
6594
+
6595
+ def _resume_chat_message_serialize(
6596
+ self,
6597
+ question_id,
6598
+ _request_auth,
6599
+ _content_type,
6600
+ _headers,
6601
+ _host_index,
6602
+ ) -> RequestSerialized:
6603
+
6604
+ _host = None
6605
+
6606
+ _collection_formats: Dict[str, str] = {
6607
+ }
6608
+
6609
+ _path_params: Dict[str, str] = {}
6610
+ _query_params: List[Tuple[str, str]] = []
6611
+ _header_params: Dict[str, Optional[str]] = _headers or {}
6612
+ _form_params: List[Tuple[str, str]] = []
6613
+ _files: Dict[
6614
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
6615
+ ] = {}
6616
+ _body_params: Optional[bytes] = None
6617
+
6618
+ # process the path parameters
6619
+ if question_id is not None:
6620
+ _path_params['question_id'] = question_id
6621
+ # process the query parameters
6622
+ # process the header parameters
6623
+ # process the form parameters
6624
+ # process the body parameter
6625
+
6626
+
6627
+ # set the HTTP header `Accept`
6628
+ if 'Accept' not in _header_params:
6629
+ _header_params['Accept'] = self.api_client.select_header_accept(
6630
+ [
6631
+ 'application/json'
6632
+ ]
6633
+ )
6634
+
6635
+
6636
+ # authentication setting
6637
+ _auth_settings: List[str] = [
6638
+ 'bearerAuth'
6639
+ ]
6640
+
6641
+ return self.api_client.param_serialize(
6642
+ method='POST',
6643
+ resource_path='/messages/{question_id}/resume',
6644
+ path_params=_path_params,
6645
+ query_params=_query_params,
6646
+ header_params=_header_params,
6647
+ body=_body_params,
6648
+ post_params=_form_params,
6649
+ files=_files,
6650
+ auth_settings=_auth_settings,
6651
+ collection_formats=_collection_formats,
6652
+ _host=_host,
6653
+ _request_auth=_request_auth
6654
+ )
6655
+
6656
+
6657
+
6658
+
6659
+ @validate_call
6660
+ def set_message_votes(
6661
+ self,
6662
+ message_id: Annotated[StrictStr, Field(description="Id of the chat message.")],
6663
+ message_vote_update_request: MessageVoteUpdateRequest,
6664
+ _request_timeout: Union[
6665
+ None,
6666
+ Annotated[StrictFloat, Field(gt=0)],
6667
+ Tuple[
6668
+ Annotated[StrictFloat, Field(gt=0)],
6669
+ Annotated[StrictFloat, Field(gt=0)]
6670
+ ]
6671
+ ] = None,
6672
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
6673
+ _content_type: Optional[StrictStr] = None,
6674
+ _headers: Optional[Dict[StrictStr, Any]] = None,
6675
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
6676
+ ) -> None:
6677
+ """Changes the vote value of a chat message.
6678
+
6679
+ Set the exact value of a vote for a chat message. Any message type can be updated, but only LLM response votes will be visible in the UI. The expectation is 0 - unvoted, -1 - dislike, 1 - like. Values outside of this will not be viewable in the UI.
6680
+
6681
+ :param message_id: Id of the chat message. (required)
6682
+ :type message_id: str
6683
+ :param message_vote_update_request: (required)
6684
+ :type message_vote_update_request: MessageVoteUpdateRequest
6685
+ :param _request_timeout: timeout setting for this request. If one
6686
+ number provided, it will be total request
6687
+ timeout. It can also be a pair (tuple) of
6688
+ (connection, read) timeouts.
6689
+ :type _request_timeout: int, tuple(int, int), optional
6690
+ :param _request_auth: set to override the auth_settings for an a single
6691
+ request; this effectively ignores the
6692
+ authentication in the spec for a single request.
6693
+ :type _request_auth: dict, optional
6694
+ :param _content_type: force content-type for the request.
6695
+ :type _content_type: str, Optional
6696
+ :param _headers: set to override the headers for a single
6697
+ request; this effectively ignores the headers
6698
+ in the spec for a single request.
6699
+ :type _headers: dict, optional
6700
+ :param _host_index: set to override the host_index for a single
6701
+ request; this effectively ignores the host_index
6702
+ in the spec for a single request.
6703
+ :type _host_index: int, optional
6704
+ :return: Returns the result object.
6705
+ """ # noqa: E501
6706
+
6707
+ _param = self._set_message_votes_serialize(
6708
+ message_id=message_id,
6709
+ message_vote_update_request=message_vote_update_request,
6710
+ _request_auth=_request_auth,
6711
+ _content_type=_content_type,
6712
+ _headers=_headers,
6713
+ _host_index=_host_index
6714
+ )
6715
+
6716
+ _response_types_map: Dict[str, Optional[str]] = {
6717
+ '204': None,
6718
+ '401': "EndpointError",
6719
+ '409': "EndpointError",
6720
+ }
6721
+ response_data = self.api_client.call_api(
6722
+ *_param,
6723
+ _request_timeout=_request_timeout
6724
+ )
6725
+ response_data.read()
6726
+ return self.api_client.response_deserialize(
6727
+ response_data=response_data,
6728
+ response_types_map=_response_types_map,
6729
+ ).data
6730
+
6731
+
6732
+ @validate_call
6733
+ def set_message_votes_with_http_info(
6734
+ self,
6735
+ message_id: Annotated[StrictStr, Field(description="Id of the chat message.")],
6736
+ message_vote_update_request: MessageVoteUpdateRequest,
6737
+ _request_timeout: Union[
6738
+ None,
6739
+ Annotated[StrictFloat, Field(gt=0)],
6740
+ Tuple[
6741
+ Annotated[StrictFloat, Field(gt=0)],
6742
+ Annotated[StrictFloat, Field(gt=0)]
6743
+ ]
6744
+ ] = None,
6745
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
6746
+ _content_type: Optional[StrictStr] = None,
6747
+ _headers: Optional[Dict[StrictStr, Any]] = None,
6748
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
6749
+ ) -> ApiResponse[None]:
6750
+ """Changes the vote value of a chat message.
6751
+
6752
+ Set the exact value of a vote for a chat message. Any message type can be updated, but only LLM response votes will be visible in the UI. The expectation is 0 - unvoted, -1 - dislike, 1 - like. Values outside of this will not be viewable in the UI.
6753
+
6754
+ :param message_id: Id of the chat message. (required)
6755
+ :type message_id: str
6756
+ :param message_vote_update_request: (required)
5965
6757
  :type message_vote_update_request: MessageVoteUpdateRequest
5966
6758
  :param _request_timeout: timeout setting for this request. If one
5967
6759
  number provided, it will be total request
@@ -6159,6 +6951,270 @@ class ChatApi:
6159
6951
 
6160
6952
 
6161
6953
 
6954
+ @validate_call
6955
+ def stop_chat_message(
6956
+ self,
6957
+ question_id: Annotated[StrictStr, Field(description="The ID of the chat question to stop.")],
6958
+ _request_timeout: Union[
6959
+ None,
6960
+ Annotated[StrictFloat, Field(gt=0)],
6961
+ Tuple[
6962
+ Annotated[StrictFloat, Field(gt=0)],
6963
+ Annotated[StrictFloat, Field(gt=0)]
6964
+ ]
6965
+ ] = None,
6966
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
6967
+ _content_type: Optional[StrictStr] = None,
6968
+ _headers: Optional[Dict[StrictStr, Any]] = None,
6969
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
6970
+ ) -> None:
6971
+ """Stop a streaming chat response immediately.
6972
+
6973
+ Immediately stops/cancels the streaming generation of a chat message response. This may result in an incomplete sentence or thought.
6974
+
6975
+ :param question_id: The ID of the chat question to stop. (required)
6976
+ :type question_id: str
6977
+ :param _request_timeout: timeout setting for this request. If one
6978
+ number provided, it will be total request
6979
+ timeout. It can also be a pair (tuple) of
6980
+ (connection, read) timeouts.
6981
+ :type _request_timeout: int, tuple(int, int), optional
6982
+ :param _request_auth: set to override the auth_settings for an a single
6983
+ request; this effectively ignores the
6984
+ authentication in the spec for a single request.
6985
+ :type _request_auth: dict, optional
6986
+ :param _content_type: force content-type for the request.
6987
+ :type _content_type: str, Optional
6988
+ :param _headers: set to override the headers for a single
6989
+ request; this effectively ignores the headers
6990
+ in the spec for a single request.
6991
+ :type _headers: dict, optional
6992
+ :param _host_index: set to override the host_index for a single
6993
+ request; this effectively ignores the host_index
6994
+ in the spec for a single request.
6995
+ :type _host_index: int, optional
6996
+ :return: Returns the result object.
6997
+ """ # noqa: E501
6998
+
6999
+ _param = self._stop_chat_message_serialize(
7000
+ question_id=question_id,
7001
+ _request_auth=_request_auth,
7002
+ _content_type=_content_type,
7003
+ _headers=_headers,
7004
+ _host_index=_host_index
7005
+ )
7006
+
7007
+ _response_types_map: Dict[str, Optional[str]] = {
7008
+ '204': None,
7009
+ '401': "EndpointError",
7010
+ }
7011
+ response_data = self.api_client.call_api(
7012
+ *_param,
7013
+ _request_timeout=_request_timeout
7014
+ )
7015
+ response_data.read()
7016
+ return self.api_client.response_deserialize(
7017
+ response_data=response_data,
7018
+ response_types_map=_response_types_map,
7019
+ ).data
7020
+
7021
+
7022
+ @validate_call
7023
+ def stop_chat_message_with_http_info(
7024
+ self,
7025
+ question_id: Annotated[StrictStr, Field(description="The ID of the chat question to stop.")],
7026
+ _request_timeout: Union[
7027
+ None,
7028
+ Annotated[StrictFloat, Field(gt=0)],
7029
+ Tuple[
7030
+ Annotated[StrictFloat, Field(gt=0)],
7031
+ Annotated[StrictFloat, Field(gt=0)]
7032
+ ]
7033
+ ] = None,
7034
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
7035
+ _content_type: Optional[StrictStr] = None,
7036
+ _headers: Optional[Dict[StrictStr, Any]] = None,
7037
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
7038
+ ) -> ApiResponse[None]:
7039
+ """Stop a streaming chat response immediately.
7040
+
7041
+ Immediately stops/cancels the streaming generation of a chat message response. This may result in an incomplete sentence or thought.
7042
+
7043
+ :param question_id: The ID of the chat question to stop. (required)
7044
+ :type question_id: str
7045
+ :param _request_timeout: timeout setting for this request. If one
7046
+ number provided, it will be total request
7047
+ timeout. It can also be a pair (tuple) of
7048
+ (connection, read) timeouts.
7049
+ :type _request_timeout: int, tuple(int, int), optional
7050
+ :param _request_auth: set to override the auth_settings for an a single
7051
+ request; this effectively ignores the
7052
+ authentication in the spec for a single request.
7053
+ :type _request_auth: dict, optional
7054
+ :param _content_type: force content-type for the request.
7055
+ :type _content_type: str, Optional
7056
+ :param _headers: set to override the headers for a single
7057
+ request; this effectively ignores the headers
7058
+ in the spec for a single request.
7059
+ :type _headers: dict, optional
7060
+ :param _host_index: set to override the host_index for a single
7061
+ request; this effectively ignores the host_index
7062
+ in the spec for a single request.
7063
+ :type _host_index: int, optional
7064
+ :return: Returns the result object.
7065
+ """ # noqa: E501
7066
+
7067
+ _param = self._stop_chat_message_serialize(
7068
+ question_id=question_id,
7069
+ _request_auth=_request_auth,
7070
+ _content_type=_content_type,
7071
+ _headers=_headers,
7072
+ _host_index=_host_index
7073
+ )
7074
+
7075
+ _response_types_map: Dict[str, Optional[str]] = {
7076
+ '204': None,
7077
+ '401': "EndpointError",
7078
+ }
7079
+ response_data = self.api_client.call_api(
7080
+ *_param,
7081
+ _request_timeout=_request_timeout
7082
+ )
7083
+ response_data.read()
7084
+ return self.api_client.response_deserialize(
7085
+ response_data=response_data,
7086
+ response_types_map=_response_types_map,
7087
+ )
7088
+
7089
+
7090
+ @validate_call
7091
+ def stop_chat_message_without_preload_content(
7092
+ self,
7093
+ question_id: Annotated[StrictStr, Field(description="The ID of the chat question to stop.")],
7094
+ _request_timeout: Union[
7095
+ None,
7096
+ Annotated[StrictFloat, Field(gt=0)],
7097
+ Tuple[
7098
+ Annotated[StrictFloat, Field(gt=0)],
7099
+ Annotated[StrictFloat, Field(gt=0)]
7100
+ ]
7101
+ ] = None,
7102
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
7103
+ _content_type: Optional[StrictStr] = None,
7104
+ _headers: Optional[Dict[StrictStr, Any]] = None,
7105
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
7106
+ ) -> RESTResponseType:
7107
+ """Stop a streaming chat response immediately.
7108
+
7109
+ Immediately stops/cancels the streaming generation of a chat message response. This may result in an incomplete sentence or thought.
7110
+
7111
+ :param question_id: The ID of the chat question to stop. (required)
7112
+ :type question_id: str
7113
+ :param _request_timeout: timeout setting for this request. If one
7114
+ number provided, it will be total request
7115
+ timeout. It can also be a pair (tuple) of
7116
+ (connection, read) timeouts.
7117
+ :type _request_timeout: int, tuple(int, int), optional
7118
+ :param _request_auth: set to override the auth_settings for an a single
7119
+ request; this effectively ignores the
7120
+ authentication in the spec for a single request.
7121
+ :type _request_auth: dict, optional
7122
+ :param _content_type: force content-type for the request.
7123
+ :type _content_type: str, Optional
7124
+ :param _headers: set to override the headers for a single
7125
+ request; this effectively ignores the headers
7126
+ in the spec for a single request.
7127
+ :type _headers: dict, optional
7128
+ :param _host_index: set to override the host_index for a single
7129
+ request; this effectively ignores the host_index
7130
+ in the spec for a single request.
7131
+ :type _host_index: int, optional
7132
+ :return: Returns the result object.
7133
+ """ # noqa: E501
7134
+
7135
+ _param = self._stop_chat_message_serialize(
7136
+ question_id=question_id,
7137
+ _request_auth=_request_auth,
7138
+ _content_type=_content_type,
7139
+ _headers=_headers,
7140
+ _host_index=_host_index
7141
+ )
7142
+
7143
+ _response_types_map: Dict[str, Optional[str]] = {
7144
+ '204': None,
7145
+ '401': "EndpointError",
7146
+ }
7147
+ response_data = self.api_client.call_api(
7148
+ *_param,
7149
+ _request_timeout=_request_timeout
7150
+ )
7151
+ return response_data.response
7152
+
7153
+
7154
+ def _stop_chat_message_serialize(
7155
+ self,
7156
+ question_id,
7157
+ _request_auth,
7158
+ _content_type,
7159
+ _headers,
7160
+ _host_index,
7161
+ ) -> RequestSerialized:
7162
+
7163
+ _host = None
7164
+
7165
+ _collection_formats: Dict[str, str] = {
7166
+ }
7167
+
7168
+ _path_params: Dict[str, str] = {}
7169
+ _query_params: List[Tuple[str, str]] = []
7170
+ _header_params: Dict[str, Optional[str]] = _headers or {}
7171
+ _form_params: List[Tuple[str, str]] = []
7172
+ _files: Dict[
7173
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
7174
+ ] = {}
7175
+ _body_params: Optional[bytes] = None
7176
+
7177
+ # process the path parameters
7178
+ if question_id is not None:
7179
+ _path_params['question_id'] = question_id
7180
+ # process the query parameters
7181
+ # process the header parameters
7182
+ # process the form parameters
7183
+ # process the body parameter
7184
+
7185
+
7186
+ # set the HTTP header `Accept`
7187
+ if 'Accept' not in _header_params:
7188
+ _header_params['Accept'] = self.api_client.select_header_accept(
7189
+ [
7190
+ 'application/json'
7191
+ ]
7192
+ )
7193
+
7194
+
7195
+ # authentication setting
7196
+ _auth_settings: List[str] = [
7197
+ 'bearerAuth'
7198
+ ]
7199
+
7200
+ return self.api_client.param_serialize(
7201
+ method='POST',
7202
+ resource_path='/messages/{question_id}/stop',
7203
+ path_params=_path_params,
7204
+ query_params=_query_params,
7205
+ header_params=_header_params,
7206
+ body=_body_params,
7207
+ post_params=_form_params,
7208
+ files=_files,
7209
+ auth_settings=_auth_settings,
7210
+ collection_formats=_collection_formats,
7211
+ _host=_host,
7212
+ _request_auth=_request_auth
7213
+ )
7214
+
7215
+
7216
+
7217
+
6162
7218
  @validate_call
6163
7219
  def update_chat_session(
6164
7220
  self,