hindsight-client 0.3.0__py3-none-any.whl → 0.4.1__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 (89) hide show
  1. hindsight_client/__init__.py +9 -8
  2. hindsight_client/hindsight_client.py +394 -59
  3. {hindsight_client-0.3.0.dist-info → hindsight_client-0.4.1.dist-info}/METADATA +1 -1
  4. hindsight_client-0.4.1.dist-info/RECORD +89 -0
  5. hindsight_client_api/__init__.py +26 -2
  6. hindsight_client_api/api/__init__.py +2 -0
  7. hindsight_client_api/api/banks_api.py +998 -132
  8. hindsight_client_api/api/directives_api.py +1619 -0
  9. hindsight_client_api/api/documents_api.py +1 -1
  10. hindsight_client_api/api/entities_api.py +10 -7
  11. hindsight_client_api/api/memory_api.py +1 -1
  12. hindsight_client_api/api/mental_models_api.py +1897 -0
  13. hindsight_client_api/api/monitoring_api.py +247 -1
  14. hindsight_client_api/api/operations_api.py +351 -5
  15. hindsight_client_api/api_client.py +1 -1
  16. hindsight_client_api/configuration.py +2 -2
  17. hindsight_client_api/exceptions.py +1 -1
  18. hindsight_client_api/models/__init__.py +23 -1
  19. hindsight_client_api/models/add_background_request.py +3 -3
  20. hindsight_client_api/models/async_operation_submit_response.py +89 -0
  21. hindsight_client_api/models/background_response.py +11 -4
  22. hindsight_client_api/models/bank_list_item.py +7 -7
  23. hindsight_client_api/models/bank_list_response.py +1 -1
  24. hindsight_client_api/models/bank_profile_response.py +12 -5
  25. hindsight_client_api/models/bank_stats_response.py +16 -5
  26. hindsight_client_api/models/budget.py +1 -1
  27. hindsight_client_api/models/cancel_operation_response.py +1 -1
  28. hindsight_client_api/models/chunk_data.py +1 -1
  29. hindsight_client_api/models/chunk_include_options.py +1 -1
  30. hindsight_client_api/models/chunk_response.py +1 -1
  31. hindsight_client_api/models/consolidation_response.py +89 -0
  32. hindsight_client_api/models/create_bank_request.py +9 -2
  33. hindsight_client_api/models/create_directive_request.py +95 -0
  34. hindsight_client_api/models/create_mental_model_request.py +100 -0
  35. hindsight_client_api/models/create_mental_model_response.py +87 -0
  36. hindsight_client_api/models/delete_document_response.py +1 -1
  37. hindsight_client_api/models/delete_response.py +1 -1
  38. hindsight_client_api/models/directive_list_response.py +95 -0
  39. hindsight_client_api/models/directive_response.py +113 -0
  40. hindsight_client_api/models/disposition_traits.py +1 -1
  41. hindsight_client_api/models/document_response.py +1 -1
  42. hindsight_client_api/models/entity_detail_response.py +1 -1
  43. hindsight_client_api/models/entity_include_options.py +1 -1
  44. hindsight_client_api/models/entity_input.py +1 -1
  45. hindsight_client_api/models/entity_list_item.py +1 -1
  46. hindsight_client_api/models/entity_list_response.py +1 -1
  47. hindsight_client_api/models/entity_observation_response.py +1 -1
  48. hindsight_client_api/models/entity_state_response.py +1 -1
  49. hindsight_client_api/models/features_info.py +91 -0
  50. hindsight_client_api/models/graph_data_response.py +1 -1
  51. hindsight_client_api/models/http_validation_error.py +1 -1
  52. hindsight_client_api/models/include_options.py +1 -1
  53. hindsight_client_api/models/list_documents_response.py +1 -1
  54. hindsight_client_api/models/list_memory_units_response.py +1 -1
  55. hindsight_client_api/models/list_tags_response.py +1 -1
  56. hindsight_client_api/models/memory_item.py +1 -1
  57. hindsight_client_api/models/mental_model_list_response.py +95 -0
  58. hindsight_client_api/models/mental_model_response.py +126 -0
  59. hindsight_client_api/models/mental_model_trigger.py +87 -0
  60. hindsight_client_api/models/operation_response.py +2 -2
  61. hindsight_client_api/models/operation_status_response.py +131 -0
  62. hindsight_client_api/models/operations_list_response.py +9 -3
  63. hindsight_client_api/models/recall_request.py +1 -1
  64. hindsight_client_api/models/recall_response.py +1 -1
  65. hindsight_client_api/models/recall_result.py +1 -1
  66. hindsight_client_api/models/reflect_based_on.py +115 -0
  67. hindsight_client_api/models/reflect_directive.py +91 -0
  68. hindsight_client_api/models/reflect_fact.py +1 -1
  69. hindsight_client_api/models/reflect_include_options.py +14 -3
  70. hindsight_client_api/models/reflect_llm_call.py +89 -0
  71. hindsight_client_api/models/reflect_mental_model.py +96 -0
  72. hindsight_client_api/models/reflect_request.py +1 -1
  73. hindsight_client_api/models/reflect_response.py +24 -12
  74. hindsight_client_api/models/reflect_tool_call.py +100 -0
  75. hindsight_client_api/models/reflect_trace.py +105 -0
  76. hindsight_client_api/models/retain_request.py +1 -1
  77. hindsight_client_api/models/retain_response.py +1 -1
  78. hindsight_client_api/models/tag_item.py +1 -1
  79. hindsight_client_api/models/token_usage.py +1 -1
  80. hindsight_client_api/models/tool_calls_include_options.py +87 -0
  81. hindsight_client_api/models/update_directive_request.py +120 -0
  82. hindsight_client_api/models/update_disposition_request.py +1 -1
  83. hindsight_client_api/models/update_mental_model_request.py +125 -0
  84. hindsight_client_api/models/validation_error.py +1 -1
  85. hindsight_client_api/models/validation_error_loc_inner.py +1 -1
  86. hindsight_client_api/models/version_response.py +93 -0
  87. hindsight_client_api/rest.py +1 -1
  88. hindsight_client-0.3.0.dist-info/RECORD +0 -65
  89. {hindsight_client-0.3.0.dist-info → hindsight_client-0.4.1.dist-info}/WHEEL +0 -0
@@ -5,7 +5,7 @@
5
5
 
6
6
  HTTP API for Hindsight
7
7
 
8
- The version of the OpenAPI document: 0.1.0
8
+ The version of the OpenAPI document: 0.4.0
9
9
  Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
11
  Do not edit the class manually.
@@ -23,6 +23,7 @@ from hindsight_client_api.models.background_response import BackgroundResponse
23
23
  from hindsight_client_api.models.bank_list_response import BankListResponse
24
24
  from hindsight_client_api.models.bank_profile_response import BankProfileResponse
25
25
  from hindsight_client_api.models.bank_stats_response import BankStatsResponse
26
+ from hindsight_client_api.models.consolidation_response import ConsolidationResponse
26
27
  from hindsight_client_api.models.create_bank_request import CreateBankRequest
27
28
  from hindsight_client_api.models.delete_response import DeleteResponse
28
29
  from hindsight_client_api.models.update_disposition_request import UpdateDispositionRequest
@@ -64,9 +65,9 @@ class BanksApi:
64
65
  _headers: Optional[Dict[StrictStr, Any]] = None,
65
66
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
66
67
  ) -> BackgroundResponse:
67
- """Add/merge memory bank background
68
+ """(Deprecated) Add/merge memory bank background (deprecated)
68
69
 
69
- Add new background information or merge with existing. LLM intelligently resolves conflicts, normalizes to first person, and optionally infers disposition traits.
70
+ Deprecated: Use PUT /mission instead. This endpoint now updates the mission field.
70
71
 
71
72
  :param bank_id: (required)
72
73
  :type bank_id: str
@@ -95,6 +96,7 @@ class BanksApi:
95
96
  :type _host_index: int, optional
96
97
  :return: Returns the result object.
97
98
  """ # noqa: E501
99
+ warnings.warn("POST /v1/default/banks/{bank_id}/background is deprecated.", DeprecationWarning)
98
100
 
99
101
  _param = self._add_bank_background_serialize(
100
102
  bank_id=bank_id,
@@ -140,9 +142,9 @@ class BanksApi:
140
142
  _headers: Optional[Dict[StrictStr, Any]] = None,
141
143
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
142
144
  ) -> ApiResponse[BackgroundResponse]:
143
- """Add/merge memory bank background
145
+ """(Deprecated) Add/merge memory bank background (deprecated)
144
146
 
145
- Add new background information or merge with existing. LLM intelligently resolves conflicts, normalizes to first person, and optionally infers disposition traits.
147
+ Deprecated: Use PUT /mission instead. This endpoint now updates the mission field.
146
148
 
147
149
  :param bank_id: (required)
148
150
  :type bank_id: str
@@ -171,6 +173,7 @@ class BanksApi:
171
173
  :type _host_index: int, optional
172
174
  :return: Returns the result object.
173
175
  """ # noqa: E501
176
+ warnings.warn("POST /v1/default/banks/{bank_id}/background is deprecated.", DeprecationWarning)
174
177
 
175
178
  _param = self._add_bank_background_serialize(
176
179
  bank_id=bank_id,
@@ -216,9 +219,9 @@ class BanksApi:
216
219
  _headers: Optional[Dict[StrictStr, Any]] = None,
217
220
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
218
221
  ) -> RESTResponseType:
219
- """Add/merge memory bank background
222
+ """(Deprecated) Add/merge memory bank background (deprecated)
220
223
 
221
- Add new background information or merge with existing. LLM intelligently resolves conflicts, normalizes to first person, and optionally infers disposition traits.
224
+ Deprecated: Use PUT /mission instead. This endpoint now updates the mission field.
222
225
 
223
226
  :param bank_id: (required)
224
227
  :type bank_id: str
@@ -247,6 +250,7 @@ class BanksApi:
247
250
  :type _host_index: int, optional
248
251
  :return: Returns the result object.
249
252
  """ # noqa: E501
253
+ warnings.warn("POST /v1/default/banks/{bank_id}/background is deprecated.", DeprecationWarning)
250
254
 
251
255
  _param = self._add_bank_background_serialize(
252
256
  bank_id=bank_id,
@@ -352,10 +356,9 @@ class BanksApi:
352
356
 
353
357
 
354
358
  @validate_call
355
- async def create_or_update_bank(
359
+ async def clear_observations(
356
360
  self,
357
361
  bank_id: StrictStr,
358
- create_bank_request: CreateBankRequest,
359
362
  authorization: Optional[StrictStr] = None,
360
363
  _request_timeout: Union[
361
364
  None,
@@ -369,15 +372,13 @@ class BanksApi:
369
372
  _content_type: Optional[StrictStr] = None,
370
373
  _headers: Optional[Dict[StrictStr, Any]] = None,
371
374
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
372
- ) -> BankProfileResponse:
373
- """Create or update memory bank
375
+ ) -> DeleteResponse:
376
+ """Clear all observations
374
377
 
375
- Create a new agent or update existing agent with disposition and background. Auto-fills missing fields with defaults.
378
+ Delete all observations for a memory bank. This is useful for resetting the consolidated knowledge.
376
379
 
377
380
  :param bank_id: (required)
378
381
  :type bank_id: str
379
- :param create_bank_request: (required)
380
- :type create_bank_request: CreateBankRequest
381
382
  :param authorization:
382
383
  :type authorization: str
383
384
  :param _request_timeout: timeout setting for this request. If one
@@ -402,9 +403,8 @@ class BanksApi:
402
403
  :return: Returns the result object.
403
404
  """ # noqa: E501
404
405
 
405
- _param = self._create_or_update_bank_serialize(
406
+ _param = self._clear_observations_serialize(
406
407
  bank_id=bank_id,
407
- create_bank_request=create_bank_request,
408
408
  authorization=authorization,
409
409
  _request_auth=_request_auth,
410
410
  _content_type=_content_type,
@@ -413,7 +413,7 @@ class BanksApi:
413
413
  )
414
414
 
415
415
  _response_types_map: Dict[str, Optional[str]] = {
416
- '200': "BankProfileResponse",
416
+ '200': "DeleteResponse",
417
417
  '422': "HTTPValidationError",
418
418
  }
419
419
  response_data = await self.api_client.call_api(
@@ -428,10 +428,9 @@ class BanksApi:
428
428
 
429
429
 
430
430
  @validate_call
431
- async def create_or_update_bank_with_http_info(
431
+ async def clear_observations_with_http_info(
432
432
  self,
433
433
  bank_id: StrictStr,
434
- create_bank_request: CreateBankRequest,
435
434
  authorization: Optional[StrictStr] = None,
436
435
  _request_timeout: Union[
437
436
  None,
@@ -445,15 +444,13 @@ class BanksApi:
445
444
  _content_type: Optional[StrictStr] = None,
446
445
  _headers: Optional[Dict[StrictStr, Any]] = None,
447
446
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
448
- ) -> ApiResponse[BankProfileResponse]:
449
- """Create or update memory bank
447
+ ) -> ApiResponse[DeleteResponse]:
448
+ """Clear all observations
450
449
 
451
- Create a new agent or update existing agent with disposition and background. Auto-fills missing fields with defaults.
450
+ Delete all observations for a memory bank. This is useful for resetting the consolidated knowledge.
452
451
 
453
452
  :param bank_id: (required)
454
453
  :type bank_id: str
455
- :param create_bank_request: (required)
456
- :type create_bank_request: CreateBankRequest
457
454
  :param authorization:
458
455
  :type authorization: str
459
456
  :param _request_timeout: timeout setting for this request. If one
@@ -478,9 +475,8 @@ class BanksApi:
478
475
  :return: Returns the result object.
479
476
  """ # noqa: E501
480
477
 
481
- _param = self._create_or_update_bank_serialize(
478
+ _param = self._clear_observations_serialize(
482
479
  bank_id=bank_id,
483
- create_bank_request=create_bank_request,
484
480
  authorization=authorization,
485
481
  _request_auth=_request_auth,
486
482
  _content_type=_content_type,
@@ -489,7 +485,7 @@ class BanksApi:
489
485
  )
490
486
 
491
487
  _response_types_map: Dict[str, Optional[str]] = {
492
- '200': "BankProfileResponse",
488
+ '200': "DeleteResponse",
493
489
  '422': "HTTPValidationError",
494
490
  }
495
491
  response_data = await self.api_client.call_api(
@@ -504,10 +500,9 @@ class BanksApi:
504
500
 
505
501
 
506
502
  @validate_call
507
- async def create_or_update_bank_without_preload_content(
503
+ async def clear_observations_without_preload_content(
508
504
  self,
509
505
  bank_id: StrictStr,
510
- create_bank_request: CreateBankRequest,
511
506
  authorization: Optional[StrictStr] = None,
512
507
  _request_timeout: Union[
513
508
  None,
@@ -522,14 +517,12 @@ class BanksApi:
522
517
  _headers: Optional[Dict[StrictStr, Any]] = None,
523
518
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
524
519
  ) -> RESTResponseType:
525
- """Create or update memory bank
520
+ """Clear all observations
526
521
 
527
- Create a new agent or update existing agent with disposition and background. Auto-fills missing fields with defaults.
522
+ Delete all observations for a memory bank. This is useful for resetting the consolidated knowledge.
528
523
 
529
524
  :param bank_id: (required)
530
525
  :type bank_id: str
531
- :param create_bank_request: (required)
532
- :type create_bank_request: CreateBankRequest
533
526
  :param authorization:
534
527
  :type authorization: str
535
528
  :param _request_timeout: timeout setting for this request. If one
@@ -554,9 +547,8 @@ class BanksApi:
554
547
  :return: Returns the result object.
555
548
  """ # noqa: E501
556
549
 
557
- _param = self._create_or_update_bank_serialize(
550
+ _param = self._clear_observations_serialize(
558
551
  bank_id=bank_id,
559
- create_bank_request=create_bank_request,
560
552
  authorization=authorization,
561
553
  _request_auth=_request_auth,
562
554
  _content_type=_content_type,
@@ -565,7 +557,7 @@ class BanksApi:
565
557
  )
566
558
 
567
559
  _response_types_map: Dict[str, Optional[str]] = {
568
- '200': "BankProfileResponse",
560
+ '200': "DeleteResponse",
569
561
  '422': "HTTPValidationError",
570
562
  }
571
563
  response_data = await self.api_client.call_api(
@@ -575,10 +567,9 @@ class BanksApi:
575
567
  return response_data.response
576
568
 
577
569
 
578
- def _create_or_update_bank_serialize(
570
+ def _clear_observations_serialize(
579
571
  self,
580
572
  bank_id,
581
- create_bank_request,
582
573
  authorization,
583
574
  _request_auth,
584
575
  _content_type,
@@ -609,8 +600,6 @@ class BanksApi:
609
600
  _header_params['authorization'] = authorization
610
601
  # process the form parameters
611
602
  # process the body parameter
612
- if create_bank_request is not None:
613
- _body_params = create_bank_request
614
603
 
615
604
 
616
605
  # set the HTTP header `Accept`
@@ -621,27 +610,14 @@ class BanksApi:
621
610
  ]
622
611
  )
623
612
 
624
- # set the HTTP header `Content-Type`
625
- if _content_type:
626
- _header_params['Content-Type'] = _content_type
627
- else:
628
- _default_content_type = (
629
- self.api_client.select_header_content_type(
630
- [
631
- 'application/json'
632
- ]
633
- )
634
- )
635
- if _default_content_type is not None:
636
- _header_params['Content-Type'] = _default_content_type
637
613
 
638
614
  # authentication setting
639
615
  _auth_settings: List[str] = [
640
616
  ]
641
617
 
642
618
  return self.api_client.param_serialize(
643
- method='PUT',
644
- resource_path='/v1/default/banks/{bank_id}',
619
+ method='DELETE',
620
+ resource_path='/v1/default/banks/{bank_id}/observations',
645
621
  path_params=_path_params,
646
622
  query_params=_query_params,
647
623
  header_params=_header_params,
@@ -658,9 +634,10 @@ class BanksApi:
658
634
 
659
635
 
660
636
  @validate_call
661
- async def delete_bank(
637
+ async def create_or_update_bank(
662
638
  self,
663
639
  bank_id: StrictStr,
640
+ create_bank_request: CreateBankRequest,
664
641
  authorization: Optional[StrictStr] = None,
665
642
  _request_timeout: Union[
666
643
  None,
@@ -674,13 +651,15 @@ class BanksApi:
674
651
  _content_type: Optional[StrictStr] = None,
675
652
  _headers: Optional[Dict[StrictStr, Any]] = None,
676
653
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
677
- ) -> DeleteResponse:
678
- """Delete memory bank
654
+ ) -> BankProfileResponse:
655
+ """Create or update memory bank
679
656
 
680
- Delete an entire memory bank including all memories, entities, documents, and the bank profile itself. This is a destructive operation that cannot be undone.
657
+ Create a new agent or update existing agent with disposition and mission. Auto-fills missing fields with defaults.
681
658
 
682
659
  :param bank_id: (required)
683
660
  :type bank_id: str
661
+ :param create_bank_request: (required)
662
+ :type create_bank_request: CreateBankRequest
684
663
  :param authorization:
685
664
  :type authorization: str
686
665
  :param _request_timeout: timeout setting for this request. If one
@@ -705,8 +684,9 @@ class BanksApi:
705
684
  :return: Returns the result object.
706
685
  """ # noqa: E501
707
686
 
708
- _param = self._delete_bank_serialize(
687
+ _param = self._create_or_update_bank_serialize(
709
688
  bank_id=bank_id,
689
+ create_bank_request=create_bank_request,
710
690
  authorization=authorization,
711
691
  _request_auth=_request_auth,
712
692
  _content_type=_content_type,
@@ -715,7 +695,7 @@ class BanksApi:
715
695
  )
716
696
 
717
697
  _response_types_map: Dict[str, Optional[str]] = {
718
- '200': "DeleteResponse",
698
+ '200': "BankProfileResponse",
719
699
  '422': "HTTPValidationError",
720
700
  }
721
701
  response_data = await self.api_client.call_api(
@@ -730,9 +710,10 @@ class BanksApi:
730
710
 
731
711
 
732
712
  @validate_call
733
- async def delete_bank_with_http_info(
713
+ async def create_or_update_bank_with_http_info(
734
714
  self,
735
715
  bank_id: StrictStr,
716
+ create_bank_request: CreateBankRequest,
736
717
  authorization: Optional[StrictStr] = None,
737
718
  _request_timeout: Union[
738
719
  None,
@@ -746,13 +727,15 @@ class BanksApi:
746
727
  _content_type: Optional[StrictStr] = None,
747
728
  _headers: Optional[Dict[StrictStr, Any]] = None,
748
729
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
749
- ) -> ApiResponse[DeleteResponse]:
750
- """Delete memory bank
730
+ ) -> ApiResponse[BankProfileResponse]:
731
+ """Create or update memory bank
751
732
 
752
- Delete an entire memory bank including all memories, entities, documents, and the bank profile itself. This is a destructive operation that cannot be undone.
733
+ Create a new agent or update existing agent with disposition and mission. Auto-fills missing fields with defaults.
753
734
 
754
735
  :param bank_id: (required)
755
736
  :type bank_id: str
737
+ :param create_bank_request: (required)
738
+ :type create_bank_request: CreateBankRequest
756
739
  :param authorization:
757
740
  :type authorization: str
758
741
  :param _request_timeout: timeout setting for this request. If one
@@ -777,8 +760,9 @@ class BanksApi:
777
760
  :return: Returns the result object.
778
761
  """ # noqa: E501
779
762
 
780
- _param = self._delete_bank_serialize(
763
+ _param = self._create_or_update_bank_serialize(
781
764
  bank_id=bank_id,
765
+ create_bank_request=create_bank_request,
782
766
  authorization=authorization,
783
767
  _request_auth=_request_auth,
784
768
  _content_type=_content_type,
@@ -787,7 +771,7 @@ class BanksApi:
787
771
  )
788
772
 
789
773
  _response_types_map: Dict[str, Optional[str]] = {
790
- '200': "DeleteResponse",
774
+ '200': "BankProfileResponse",
791
775
  '422': "HTTPValidationError",
792
776
  }
793
777
  response_data = await self.api_client.call_api(
@@ -802,9 +786,10 @@ class BanksApi:
802
786
 
803
787
 
804
788
  @validate_call
805
- async def delete_bank_without_preload_content(
789
+ async def create_or_update_bank_without_preload_content(
806
790
  self,
807
791
  bank_id: StrictStr,
792
+ create_bank_request: CreateBankRequest,
808
793
  authorization: Optional[StrictStr] = None,
809
794
  _request_timeout: Union[
810
795
  None,
@@ -819,12 +804,14 @@ class BanksApi:
819
804
  _headers: Optional[Dict[StrictStr, Any]] = None,
820
805
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
821
806
  ) -> RESTResponseType:
822
- """Delete memory bank
807
+ """Create or update memory bank
823
808
 
824
- Delete an entire memory bank including all memories, entities, documents, and the bank profile itself. This is a destructive operation that cannot be undone.
809
+ Create a new agent or update existing agent with disposition and mission. Auto-fills missing fields with defaults.
825
810
 
826
811
  :param bank_id: (required)
827
812
  :type bank_id: str
813
+ :param create_bank_request: (required)
814
+ :type create_bank_request: CreateBankRequest
828
815
  :param authorization:
829
816
  :type authorization: str
830
817
  :param _request_timeout: timeout setting for this request. If one
@@ -849,8 +836,9 @@ class BanksApi:
849
836
  :return: Returns the result object.
850
837
  """ # noqa: E501
851
838
 
852
- _param = self._delete_bank_serialize(
839
+ _param = self._create_or_update_bank_serialize(
853
840
  bank_id=bank_id,
841
+ create_bank_request=create_bank_request,
854
842
  authorization=authorization,
855
843
  _request_auth=_request_auth,
856
844
  _content_type=_content_type,
@@ -859,7 +847,7 @@ class BanksApi:
859
847
  )
860
848
 
861
849
  _response_types_map: Dict[str, Optional[str]] = {
862
- '200': "DeleteResponse",
850
+ '200': "BankProfileResponse",
863
851
  '422': "HTTPValidationError",
864
852
  }
865
853
  response_data = await self.api_client.call_api(
@@ -869,9 +857,10 @@ class BanksApi:
869
857
  return response_data.response
870
858
 
871
859
 
872
- def _delete_bank_serialize(
860
+ def _create_or_update_bank_serialize(
873
861
  self,
874
862
  bank_id,
863
+ create_bank_request,
875
864
  authorization,
876
865
  _request_auth,
877
866
  _content_type,
@@ -902,6 +891,8 @@ class BanksApi:
902
891
  _header_params['authorization'] = authorization
903
892
  # process the form parameters
904
893
  # process the body parameter
894
+ if create_bank_request is not None:
895
+ _body_params = create_bank_request
905
896
 
906
897
 
907
898
  # set the HTTP header `Accept`
@@ -912,13 +903,26 @@ class BanksApi:
912
903
  ]
913
904
  )
914
905
 
906
+ # set the HTTP header `Content-Type`
907
+ if _content_type:
908
+ _header_params['Content-Type'] = _content_type
909
+ else:
910
+ _default_content_type = (
911
+ self.api_client.select_header_content_type(
912
+ [
913
+ 'application/json'
914
+ ]
915
+ )
916
+ )
917
+ if _default_content_type is not None:
918
+ _header_params['Content-Type'] = _default_content_type
915
919
 
916
920
  # authentication setting
917
921
  _auth_settings: List[str] = [
918
922
  ]
919
923
 
920
924
  return self.api_client.param_serialize(
921
- method='DELETE',
925
+ method='PUT',
922
926
  resource_path='/v1/default/banks/{bank_id}',
923
927
  path_params=_path_params,
924
928
  query_params=_query_params,
@@ -936,7 +940,7 @@ class BanksApi:
936
940
 
937
941
 
938
942
  @validate_call
939
- async def get_agent_stats(
943
+ async def delete_bank(
940
944
  self,
941
945
  bank_id: StrictStr,
942
946
  authorization: Optional[StrictStr] = None,
@@ -952,10 +956,10 @@ class BanksApi:
952
956
  _content_type: Optional[StrictStr] = None,
953
957
  _headers: Optional[Dict[StrictStr, Any]] = None,
954
958
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
955
- ) -> BankStatsResponse:
956
- """Get statistics for memory bank
959
+ ) -> DeleteResponse:
960
+ """Delete memory bank
957
961
 
958
- Get statistics about nodes and links for a specific agent
962
+ Delete an entire memory bank including all memories, entities, documents, and the bank profile itself. This is a destructive operation that cannot be undone.
959
963
 
960
964
  :param bank_id: (required)
961
965
  :type bank_id: str
@@ -983,7 +987,7 @@ class BanksApi:
983
987
  :return: Returns the result object.
984
988
  """ # noqa: E501
985
989
 
986
- _param = self._get_agent_stats_serialize(
990
+ _param = self._delete_bank_serialize(
987
991
  bank_id=bank_id,
988
992
  authorization=authorization,
989
993
  _request_auth=_request_auth,
@@ -993,7 +997,7 @@ class BanksApi:
993
997
  )
994
998
 
995
999
  _response_types_map: Dict[str, Optional[str]] = {
996
- '200': "BankStatsResponse",
1000
+ '200': "DeleteResponse",
997
1001
  '422': "HTTPValidationError",
998
1002
  }
999
1003
  response_data = await self.api_client.call_api(
@@ -1008,7 +1012,7 @@ class BanksApi:
1008
1012
 
1009
1013
 
1010
1014
  @validate_call
1011
- async def get_agent_stats_with_http_info(
1015
+ async def delete_bank_with_http_info(
1012
1016
  self,
1013
1017
  bank_id: StrictStr,
1014
1018
  authorization: Optional[StrictStr] = None,
@@ -1024,10 +1028,10 @@ class BanksApi:
1024
1028
  _content_type: Optional[StrictStr] = None,
1025
1029
  _headers: Optional[Dict[StrictStr, Any]] = None,
1026
1030
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1027
- ) -> ApiResponse[BankStatsResponse]:
1028
- """Get statistics for memory bank
1031
+ ) -> ApiResponse[DeleteResponse]:
1032
+ """Delete memory bank
1029
1033
 
1030
- Get statistics about nodes and links for a specific agent
1034
+ Delete an entire memory bank including all memories, entities, documents, and the bank profile itself. This is a destructive operation that cannot be undone.
1031
1035
 
1032
1036
  :param bank_id: (required)
1033
1037
  :type bank_id: str
@@ -1055,7 +1059,7 @@ class BanksApi:
1055
1059
  :return: Returns the result object.
1056
1060
  """ # noqa: E501
1057
1061
 
1058
- _param = self._get_agent_stats_serialize(
1062
+ _param = self._delete_bank_serialize(
1059
1063
  bank_id=bank_id,
1060
1064
  authorization=authorization,
1061
1065
  _request_auth=_request_auth,
@@ -1065,7 +1069,7 @@ class BanksApi:
1065
1069
  )
1066
1070
 
1067
1071
  _response_types_map: Dict[str, Optional[str]] = {
1068
- '200': "BankStatsResponse",
1072
+ '200': "DeleteResponse",
1069
1073
  '422': "HTTPValidationError",
1070
1074
  }
1071
1075
  response_data = await self.api_client.call_api(
@@ -1080,7 +1084,7 @@ class BanksApi:
1080
1084
 
1081
1085
 
1082
1086
  @validate_call
1083
- async def get_agent_stats_without_preload_content(
1087
+ async def delete_bank_without_preload_content(
1084
1088
  self,
1085
1089
  bank_id: StrictStr,
1086
1090
  authorization: Optional[StrictStr] = None,
@@ -1097,9 +1101,9 @@ class BanksApi:
1097
1101
  _headers: Optional[Dict[StrictStr, Any]] = None,
1098
1102
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1099
1103
  ) -> RESTResponseType:
1100
- """Get statistics for memory bank
1104
+ """Delete memory bank
1101
1105
 
1102
- Get statistics about nodes and links for a specific agent
1106
+ Delete an entire memory bank including all memories, entities, documents, and the bank profile itself. This is a destructive operation that cannot be undone.
1103
1107
 
1104
1108
  :param bank_id: (required)
1105
1109
  :type bank_id: str
@@ -1127,7 +1131,7 @@ class BanksApi:
1127
1131
  :return: Returns the result object.
1128
1132
  """ # noqa: E501
1129
1133
 
1130
- _param = self._get_agent_stats_serialize(
1134
+ _param = self._delete_bank_serialize(
1131
1135
  bank_id=bank_id,
1132
1136
  authorization=authorization,
1133
1137
  _request_auth=_request_auth,
@@ -1137,7 +1141,7 @@ class BanksApi:
1137
1141
  )
1138
1142
 
1139
1143
  _response_types_map: Dict[str, Optional[str]] = {
1140
- '200': "BankStatsResponse",
1144
+ '200': "DeleteResponse",
1141
1145
  '422': "HTTPValidationError",
1142
1146
  }
1143
1147
  response_data = await self.api_client.call_api(
@@ -1147,7 +1151,7 @@ class BanksApi:
1147
1151
  return response_data.response
1148
1152
 
1149
1153
 
1150
- def _get_agent_stats_serialize(
1154
+ def _delete_bank_serialize(
1151
1155
  self,
1152
1156
  bank_id,
1153
1157
  authorization,
@@ -1196,8 +1200,8 @@ class BanksApi:
1196
1200
  ]
1197
1201
 
1198
1202
  return self.api_client.param_serialize(
1199
- method='GET',
1200
- resource_path='/v1/default/banks/{bank_id}/stats',
1203
+ method='DELETE',
1204
+ resource_path='/v1/default/banks/{bank_id}',
1201
1205
  path_params=_path_params,
1202
1206
  query_params=_query_params,
1203
1207
  header_params=_header_params,
@@ -1214,7 +1218,7 @@ class BanksApi:
1214
1218
 
1215
1219
 
1216
1220
  @validate_call
1217
- async def get_bank_profile(
1221
+ async def get_agent_stats(
1218
1222
  self,
1219
1223
  bank_id: StrictStr,
1220
1224
  authorization: Optional[StrictStr] = None,
@@ -1230,10 +1234,10 @@ class BanksApi:
1230
1234
  _content_type: Optional[StrictStr] = None,
1231
1235
  _headers: Optional[Dict[StrictStr, Any]] = None,
1232
1236
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1233
- ) -> BankProfileResponse:
1234
- """Get memory bank profile
1237
+ ) -> BankStatsResponse:
1238
+ """Get statistics for memory bank
1235
1239
 
1236
- Get disposition traits and background for a memory bank. Auto-creates agent with defaults if not exists.
1240
+ Get statistics about nodes and links for a specific agent
1237
1241
 
1238
1242
  :param bank_id: (required)
1239
1243
  :type bank_id: str
@@ -1261,7 +1265,7 @@ class BanksApi:
1261
1265
  :return: Returns the result object.
1262
1266
  """ # noqa: E501
1263
1267
 
1264
- _param = self._get_bank_profile_serialize(
1268
+ _param = self._get_agent_stats_serialize(
1265
1269
  bank_id=bank_id,
1266
1270
  authorization=authorization,
1267
1271
  _request_auth=_request_auth,
@@ -1271,7 +1275,7 @@ class BanksApi:
1271
1275
  )
1272
1276
 
1273
1277
  _response_types_map: Dict[str, Optional[str]] = {
1274
- '200': "BankProfileResponse",
1278
+ '200': "BankStatsResponse",
1275
1279
  '422': "HTTPValidationError",
1276
1280
  }
1277
1281
  response_data = await self.api_client.call_api(
@@ -1286,7 +1290,7 @@ class BanksApi:
1286
1290
 
1287
1291
 
1288
1292
  @validate_call
1289
- async def get_bank_profile_with_http_info(
1293
+ async def get_agent_stats_with_http_info(
1290
1294
  self,
1291
1295
  bank_id: StrictStr,
1292
1296
  authorization: Optional[StrictStr] = None,
@@ -1302,10 +1306,10 @@ class BanksApi:
1302
1306
  _content_type: Optional[StrictStr] = None,
1303
1307
  _headers: Optional[Dict[StrictStr, Any]] = None,
1304
1308
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1305
- ) -> ApiResponse[BankProfileResponse]:
1306
- """Get memory bank profile
1309
+ ) -> ApiResponse[BankStatsResponse]:
1310
+ """Get statistics for memory bank
1307
1311
 
1308
- Get disposition traits and background for a memory bank. Auto-creates agent with defaults if not exists.
1312
+ Get statistics about nodes and links for a specific agent
1309
1313
 
1310
1314
  :param bank_id: (required)
1311
1315
  :type bank_id: str
@@ -1333,7 +1337,7 @@ class BanksApi:
1333
1337
  :return: Returns the result object.
1334
1338
  """ # noqa: E501
1335
1339
 
1336
- _param = self._get_bank_profile_serialize(
1340
+ _param = self._get_agent_stats_serialize(
1337
1341
  bank_id=bank_id,
1338
1342
  authorization=authorization,
1339
1343
  _request_auth=_request_auth,
@@ -1343,7 +1347,7 @@ class BanksApi:
1343
1347
  )
1344
1348
 
1345
1349
  _response_types_map: Dict[str, Optional[str]] = {
1346
- '200': "BankProfileResponse",
1350
+ '200': "BankStatsResponse",
1347
1351
  '422': "HTTPValidationError",
1348
1352
  }
1349
1353
  response_data = await self.api_client.call_api(
@@ -1358,7 +1362,7 @@ class BanksApi:
1358
1362
 
1359
1363
 
1360
1364
  @validate_call
1361
- async def get_bank_profile_without_preload_content(
1365
+ async def get_agent_stats_without_preload_content(
1362
1366
  self,
1363
1367
  bank_id: StrictStr,
1364
1368
  authorization: Optional[StrictStr] = None,
@@ -1375,9 +1379,9 @@ class BanksApi:
1375
1379
  _headers: Optional[Dict[StrictStr, Any]] = None,
1376
1380
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1377
1381
  ) -> RESTResponseType:
1378
- """Get memory bank profile
1382
+ """Get statistics for memory bank
1379
1383
 
1380
- Get disposition traits and background for a memory bank. Auto-creates agent with defaults if not exists.
1384
+ Get statistics about nodes and links for a specific agent
1381
1385
 
1382
1386
  :param bank_id: (required)
1383
1387
  :type bank_id: str
@@ -1405,7 +1409,7 @@ class BanksApi:
1405
1409
  :return: Returns the result object.
1406
1410
  """ # noqa: E501
1407
1411
 
1408
- _param = self._get_bank_profile_serialize(
1412
+ _param = self._get_agent_stats_serialize(
1409
1413
  bank_id=bank_id,
1410
1414
  authorization=authorization,
1411
1415
  _request_auth=_request_auth,
@@ -1415,7 +1419,7 @@ class BanksApi:
1415
1419
  )
1416
1420
 
1417
1421
  _response_types_map: Dict[str, Optional[str]] = {
1418
- '200': "BankProfileResponse",
1422
+ '200': "BankStatsResponse",
1419
1423
  '422': "HTTPValidationError",
1420
1424
  }
1421
1425
  response_data = await self.api_client.call_api(
@@ -1425,7 +1429,7 @@ class BanksApi:
1425
1429
  return response_data.response
1426
1430
 
1427
1431
 
1428
- def _get_bank_profile_serialize(
1432
+ def _get_agent_stats_serialize(
1429
1433
  self,
1430
1434
  bank_id,
1431
1435
  authorization,
@@ -1475,7 +1479,7 @@ class BanksApi:
1475
1479
 
1476
1480
  return self.api_client.param_serialize(
1477
1481
  method='GET',
1478
- resource_path='/v1/default/banks/{bank_id}/profile',
1482
+ resource_path='/v1/default/banks/{bank_id}/stats',
1479
1483
  path_params=_path_params,
1480
1484
  query_params=_query_params,
1481
1485
  header_params=_header_params,
@@ -1492,8 +1496,9 @@ class BanksApi:
1492
1496
 
1493
1497
 
1494
1498
  @validate_call
1495
- async def list_banks(
1499
+ async def get_bank_profile(
1496
1500
  self,
1501
+ bank_id: StrictStr,
1497
1502
  authorization: Optional[StrictStr] = None,
1498
1503
  _request_timeout: Union[
1499
1504
  None,
@@ -1507,11 +1512,13 @@ class BanksApi:
1507
1512
  _content_type: Optional[StrictStr] = None,
1508
1513
  _headers: Optional[Dict[StrictStr, Any]] = None,
1509
1514
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1510
- ) -> BankListResponse:
1511
- """List all memory banks
1515
+ ) -> BankProfileResponse:
1516
+ """Get memory bank profile
1512
1517
 
1513
- Get a list of all agents with their profiles
1518
+ Get disposition traits and mission for a memory bank. Auto-creates agent with defaults if not exists.
1514
1519
 
1520
+ :param bank_id: (required)
1521
+ :type bank_id: str
1515
1522
  :param authorization:
1516
1523
  :type authorization: str
1517
1524
  :param _request_timeout: timeout setting for this request. If one
@@ -1536,7 +1543,8 @@ class BanksApi:
1536
1543
  :return: Returns the result object.
1537
1544
  """ # noqa: E501
1538
1545
 
1539
- _param = self._list_banks_serialize(
1546
+ _param = self._get_bank_profile_serialize(
1547
+ bank_id=bank_id,
1540
1548
  authorization=authorization,
1541
1549
  _request_auth=_request_auth,
1542
1550
  _content_type=_content_type,
@@ -1545,7 +1553,7 @@ class BanksApi:
1545
1553
  )
1546
1554
 
1547
1555
  _response_types_map: Dict[str, Optional[str]] = {
1548
- '200': "BankListResponse",
1556
+ '200': "BankProfileResponse",
1549
1557
  '422': "HTTPValidationError",
1550
1558
  }
1551
1559
  response_data = await self.api_client.call_api(
@@ -1560,8 +1568,9 @@ class BanksApi:
1560
1568
 
1561
1569
 
1562
1570
  @validate_call
1563
- async def list_banks_with_http_info(
1571
+ async def get_bank_profile_with_http_info(
1564
1572
  self,
1573
+ bank_id: StrictStr,
1565
1574
  authorization: Optional[StrictStr] = None,
1566
1575
  _request_timeout: Union[
1567
1576
  None,
@@ -1575,11 +1584,13 @@ class BanksApi:
1575
1584
  _content_type: Optional[StrictStr] = None,
1576
1585
  _headers: Optional[Dict[StrictStr, Any]] = None,
1577
1586
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1578
- ) -> ApiResponse[BankListResponse]:
1579
- """List all memory banks
1587
+ ) -> ApiResponse[BankProfileResponse]:
1588
+ """Get memory bank profile
1580
1589
 
1581
- Get a list of all agents with their profiles
1590
+ Get disposition traits and mission for a memory bank. Auto-creates agent with defaults if not exists.
1582
1591
 
1592
+ :param bank_id: (required)
1593
+ :type bank_id: str
1583
1594
  :param authorization:
1584
1595
  :type authorization: str
1585
1596
  :param _request_timeout: timeout setting for this request. If one
@@ -1604,7 +1615,8 @@ class BanksApi:
1604
1615
  :return: Returns the result object.
1605
1616
  """ # noqa: E501
1606
1617
 
1607
- _param = self._list_banks_serialize(
1618
+ _param = self._get_bank_profile_serialize(
1619
+ bank_id=bank_id,
1608
1620
  authorization=authorization,
1609
1621
  _request_auth=_request_auth,
1610
1622
  _content_type=_content_type,
@@ -1613,7 +1625,7 @@ class BanksApi:
1613
1625
  )
1614
1626
 
1615
1627
  _response_types_map: Dict[str, Optional[str]] = {
1616
- '200': "BankListResponse",
1628
+ '200': "BankProfileResponse",
1617
1629
  '422': "HTTPValidationError",
1618
1630
  }
1619
1631
  response_data = await self.api_client.call_api(
@@ -1628,8 +1640,9 @@ class BanksApi:
1628
1640
 
1629
1641
 
1630
1642
  @validate_call
1631
- async def list_banks_without_preload_content(
1643
+ async def get_bank_profile_without_preload_content(
1632
1644
  self,
1645
+ bank_id: StrictStr,
1633
1646
  authorization: Optional[StrictStr] = None,
1634
1647
  _request_timeout: Union[
1635
1648
  None,
@@ -1644,10 +1657,12 @@ class BanksApi:
1644
1657
  _headers: Optional[Dict[StrictStr, Any]] = None,
1645
1658
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1646
1659
  ) -> RESTResponseType:
1647
- """List all memory banks
1660
+ """Get memory bank profile
1648
1661
 
1649
- Get a list of all agents with their profiles
1662
+ Get disposition traits and mission for a memory bank. Auto-creates agent with defaults if not exists.
1650
1663
 
1664
+ :param bank_id: (required)
1665
+ :type bank_id: str
1651
1666
  :param authorization:
1652
1667
  :type authorization: str
1653
1668
  :param _request_timeout: timeout setting for this request. If one
@@ -1672,7 +1687,8 @@ class BanksApi:
1672
1687
  :return: Returns the result object.
1673
1688
  """ # noqa: E501
1674
1689
 
1675
- _param = self._list_banks_serialize(
1690
+ _param = self._get_bank_profile_serialize(
1691
+ bank_id=bank_id,
1676
1692
  authorization=authorization,
1677
1693
  _request_auth=_request_auth,
1678
1694
  _content_type=_content_type,
@@ -1681,7 +1697,7 @@ class BanksApi:
1681
1697
  )
1682
1698
 
1683
1699
  _response_types_map: Dict[str, Optional[str]] = {
1684
- '200': "BankListResponse",
1700
+ '200': "BankProfileResponse",
1685
1701
  '422': "HTTPValidationError",
1686
1702
  }
1687
1703
  response_data = await self.api_client.call_api(
@@ -1691,8 +1707,9 @@ class BanksApi:
1691
1707
  return response_data.response
1692
1708
 
1693
1709
 
1694
- def _list_banks_serialize(
1710
+ def _get_bank_profile_serialize(
1695
1711
  self,
1712
+ bank_id,
1696
1713
  authorization,
1697
1714
  _request_auth,
1698
1715
  _content_type,
@@ -1715,6 +1732,8 @@ class BanksApi:
1715
1732
  _body_params: Optional[bytes] = None
1716
1733
 
1717
1734
  # process the path parameters
1735
+ if bank_id is not None:
1736
+ _path_params['bank_id'] = bank_id
1718
1737
  # process the query parameters
1719
1738
  # process the header parameters
1720
1739
  if authorization is not None:
@@ -1738,7 +1757,854 @@ class BanksApi:
1738
1757
 
1739
1758
  return self.api_client.param_serialize(
1740
1759
  method='GET',
1741
- resource_path='/v1/default/banks',
1760
+ resource_path='/v1/default/banks/{bank_id}/profile',
1761
+ path_params=_path_params,
1762
+ query_params=_query_params,
1763
+ header_params=_header_params,
1764
+ body=_body_params,
1765
+ post_params=_form_params,
1766
+ files=_files,
1767
+ auth_settings=_auth_settings,
1768
+ collection_formats=_collection_formats,
1769
+ _host=_host,
1770
+ _request_auth=_request_auth
1771
+ )
1772
+
1773
+
1774
+
1775
+
1776
+ @validate_call
1777
+ async def list_banks(
1778
+ self,
1779
+ authorization: Optional[StrictStr] = None,
1780
+ _request_timeout: Union[
1781
+ None,
1782
+ Annotated[StrictFloat, Field(gt=0)],
1783
+ Tuple[
1784
+ Annotated[StrictFloat, Field(gt=0)],
1785
+ Annotated[StrictFloat, Field(gt=0)]
1786
+ ]
1787
+ ] = None,
1788
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1789
+ _content_type: Optional[StrictStr] = None,
1790
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1791
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1792
+ ) -> BankListResponse:
1793
+ """List all memory banks
1794
+
1795
+ Get a list of all agents with their profiles
1796
+
1797
+ :param authorization:
1798
+ :type authorization: str
1799
+ :param _request_timeout: timeout setting for this request. If one
1800
+ number provided, it will be total request
1801
+ timeout. It can also be a pair (tuple) of
1802
+ (connection, read) timeouts.
1803
+ :type _request_timeout: int, tuple(int, int), optional
1804
+ :param _request_auth: set to override the auth_settings for an a single
1805
+ request; this effectively ignores the
1806
+ authentication in the spec for a single request.
1807
+ :type _request_auth: dict, optional
1808
+ :param _content_type: force content-type for the request.
1809
+ :type _content_type: str, Optional
1810
+ :param _headers: set to override the headers for a single
1811
+ request; this effectively ignores the headers
1812
+ in the spec for a single request.
1813
+ :type _headers: dict, optional
1814
+ :param _host_index: set to override the host_index for a single
1815
+ request; this effectively ignores the host_index
1816
+ in the spec for a single request.
1817
+ :type _host_index: int, optional
1818
+ :return: Returns the result object.
1819
+ """ # noqa: E501
1820
+
1821
+ _param = self._list_banks_serialize(
1822
+ authorization=authorization,
1823
+ _request_auth=_request_auth,
1824
+ _content_type=_content_type,
1825
+ _headers=_headers,
1826
+ _host_index=_host_index
1827
+ )
1828
+
1829
+ _response_types_map: Dict[str, Optional[str]] = {
1830
+ '200': "BankListResponse",
1831
+ '422': "HTTPValidationError",
1832
+ }
1833
+ response_data = await self.api_client.call_api(
1834
+ *_param,
1835
+ _request_timeout=_request_timeout
1836
+ )
1837
+ await response_data.read()
1838
+ return self.api_client.response_deserialize(
1839
+ response_data=response_data,
1840
+ response_types_map=_response_types_map,
1841
+ ).data
1842
+
1843
+
1844
+ @validate_call
1845
+ async def list_banks_with_http_info(
1846
+ self,
1847
+ authorization: Optional[StrictStr] = None,
1848
+ _request_timeout: Union[
1849
+ None,
1850
+ Annotated[StrictFloat, Field(gt=0)],
1851
+ Tuple[
1852
+ Annotated[StrictFloat, Field(gt=0)],
1853
+ Annotated[StrictFloat, Field(gt=0)]
1854
+ ]
1855
+ ] = None,
1856
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1857
+ _content_type: Optional[StrictStr] = None,
1858
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1859
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1860
+ ) -> ApiResponse[BankListResponse]:
1861
+ """List all memory banks
1862
+
1863
+ Get a list of all agents with their profiles
1864
+
1865
+ :param authorization:
1866
+ :type authorization: str
1867
+ :param _request_timeout: timeout setting for this request. If one
1868
+ number provided, it will be total request
1869
+ timeout. It can also be a pair (tuple) of
1870
+ (connection, read) timeouts.
1871
+ :type _request_timeout: int, tuple(int, int), optional
1872
+ :param _request_auth: set to override the auth_settings for an a single
1873
+ request; this effectively ignores the
1874
+ authentication in the spec for a single request.
1875
+ :type _request_auth: dict, optional
1876
+ :param _content_type: force content-type for the request.
1877
+ :type _content_type: str, Optional
1878
+ :param _headers: set to override the headers for a single
1879
+ request; this effectively ignores the headers
1880
+ in the spec for a single request.
1881
+ :type _headers: dict, optional
1882
+ :param _host_index: set to override the host_index for a single
1883
+ request; this effectively ignores the host_index
1884
+ in the spec for a single request.
1885
+ :type _host_index: int, optional
1886
+ :return: Returns the result object.
1887
+ """ # noqa: E501
1888
+
1889
+ _param = self._list_banks_serialize(
1890
+ authorization=authorization,
1891
+ _request_auth=_request_auth,
1892
+ _content_type=_content_type,
1893
+ _headers=_headers,
1894
+ _host_index=_host_index
1895
+ )
1896
+
1897
+ _response_types_map: Dict[str, Optional[str]] = {
1898
+ '200': "BankListResponse",
1899
+ '422': "HTTPValidationError",
1900
+ }
1901
+ response_data = await self.api_client.call_api(
1902
+ *_param,
1903
+ _request_timeout=_request_timeout
1904
+ )
1905
+ await response_data.read()
1906
+ return self.api_client.response_deserialize(
1907
+ response_data=response_data,
1908
+ response_types_map=_response_types_map,
1909
+ )
1910
+
1911
+
1912
+ @validate_call
1913
+ async def list_banks_without_preload_content(
1914
+ self,
1915
+ authorization: Optional[StrictStr] = None,
1916
+ _request_timeout: Union[
1917
+ None,
1918
+ Annotated[StrictFloat, Field(gt=0)],
1919
+ Tuple[
1920
+ Annotated[StrictFloat, Field(gt=0)],
1921
+ Annotated[StrictFloat, Field(gt=0)]
1922
+ ]
1923
+ ] = None,
1924
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1925
+ _content_type: Optional[StrictStr] = None,
1926
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1927
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1928
+ ) -> RESTResponseType:
1929
+ """List all memory banks
1930
+
1931
+ Get a list of all agents with their profiles
1932
+
1933
+ :param authorization:
1934
+ :type authorization: str
1935
+ :param _request_timeout: timeout setting for this request. If one
1936
+ number provided, it will be total request
1937
+ timeout. It can also be a pair (tuple) of
1938
+ (connection, read) timeouts.
1939
+ :type _request_timeout: int, tuple(int, int), optional
1940
+ :param _request_auth: set to override the auth_settings for an a single
1941
+ request; this effectively ignores the
1942
+ authentication in the spec for a single request.
1943
+ :type _request_auth: dict, optional
1944
+ :param _content_type: force content-type for the request.
1945
+ :type _content_type: str, Optional
1946
+ :param _headers: set to override the headers for a single
1947
+ request; this effectively ignores the headers
1948
+ in the spec for a single request.
1949
+ :type _headers: dict, optional
1950
+ :param _host_index: set to override the host_index for a single
1951
+ request; this effectively ignores the host_index
1952
+ in the spec for a single request.
1953
+ :type _host_index: int, optional
1954
+ :return: Returns the result object.
1955
+ """ # noqa: E501
1956
+
1957
+ _param = self._list_banks_serialize(
1958
+ authorization=authorization,
1959
+ _request_auth=_request_auth,
1960
+ _content_type=_content_type,
1961
+ _headers=_headers,
1962
+ _host_index=_host_index
1963
+ )
1964
+
1965
+ _response_types_map: Dict[str, Optional[str]] = {
1966
+ '200': "BankListResponse",
1967
+ '422': "HTTPValidationError",
1968
+ }
1969
+ response_data = await self.api_client.call_api(
1970
+ *_param,
1971
+ _request_timeout=_request_timeout
1972
+ )
1973
+ return response_data.response
1974
+
1975
+
1976
+ def _list_banks_serialize(
1977
+ self,
1978
+ authorization,
1979
+ _request_auth,
1980
+ _content_type,
1981
+ _headers,
1982
+ _host_index,
1983
+ ) -> RequestSerialized:
1984
+
1985
+ _host = None
1986
+
1987
+ _collection_formats: Dict[str, str] = {
1988
+ }
1989
+
1990
+ _path_params: Dict[str, str] = {}
1991
+ _query_params: List[Tuple[str, str]] = []
1992
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1993
+ _form_params: List[Tuple[str, str]] = []
1994
+ _files: Dict[
1995
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1996
+ ] = {}
1997
+ _body_params: Optional[bytes] = None
1998
+
1999
+ # process the path parameters
2000
+ # process the query parameters
2001
+ # process the header parameters
2002
+ if authorization is not None:
2003
+ _header_params['authorization'] = authorization
2004
+ # process the form parameters
2005
+ # process the body parameter
2006
+
2007
+
2008
+ # set the HTTP header `Accept`
2009
+ if 'Accept' not in _header_params:
2010
+ _header_params['Accept'] = self.api_client.select_header_accept(
2011
+ [
2012
+ 'application/json'
2013
+ ]
2014
+ )
2015
+
2016
+
2017
+ # authentication setting
2018
+ _auth_settings: List[str] = [
2019
+ ]
2020
+
2021
+ return self.api_client.param_serialize(
2022
+ method='GET',
2023
+ resource_path='/v1/default/banks',
2024
+ path_params=_path_params,
2025
+ query_params=_query_params,
2026
+ header_params=_header_params,
2027
+ body=_body_params,
2028
+ post_params=_form_params,
2029
+ files=_files,
2030
+ auth_settings=_auth_settings,
2031
+ collection_formats=_collection_formats,
2032
+ _host=_host,
2033
+ _request_auth=_request_auth
2034
+ )
2035
+
2036
+
2037
+
2038
+
2039
+ @validate_call
2040
+ async def trigger_consolidation(
2041
+ self,
2042
+ bank_id: StrictStr,
2043
+ authorization: Optional[StrictStr] = None,
2044
+ _request_timeout: Union[
2045
+ None,
2046
+ Annotated[StrictFloat, Field(gt=0)],
2047
+ Tuple[
2048
+ Annotated[StrictFloat, Field(gt=0)],
2049
+ Annotated[StrictFloat, Field(gt=0)]
2050
+ ]
2051
+ ] = None,
2052
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2053
+ _content_type: Optional[StrictStr] = None,
2054
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2055
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2056
+ ) -> ConsolidationResponse:
2057
+ """Trigger consolidation
2058
+
2059
+ Run memory consolidation to create/update observations from recent memories.
2060
+
2061
+ :param bank_id: (required)
2062
+ :type bank_id: str
2063
+ :param authorization:
2064
+ :type authorization: str
2065
+ :param _request_timeout: timeout setting for this request. If one
2066
+ number provided, it will be total request
2067
+ timeout. It can also be a pair (tuple) of
2068
+ (connection, read) timeouts.
2069
+ :type _request_timeout: int, tuple(int, int), optional
2070
+ :param _request_auth: set to override the auth_settings for an a single
2071
+ request; this effectively ignores the
2072
+ authentication in the spec for a single request.
2073
+ :type _request_auth: dict, optional
2074
+ :param _content_type: force content-type for the request.
2075
+ :type _content_type: str, Optional
2076
+ :param _headers: set to override the headers for a single
2077
+ request; this effectively ignores the headers
2078
+ in the spec for a single request.
2079
+ :type _headers: dict, optional
2080
+ :param _host_index: set to override the host_index for a single
2081
+ request; this effectively ignores the host_index
2082
+ in the spec for a single request.
2083
+ :type _host_index: int, optional
2084
+ :return: Returns the result object.
2085
+ """ # noqa: E501
2086
+
2087
+ _param = self._trigger_consolidation_serialize(
2088
+ bank_id=bank_id,
2089
+ authorization=authorization,
2090
+ _request_auth=_request_auth,
2091
+ _content_type=_content_type,
2092
+ _headers=_headers,
2093
+ _host_index=_host_index
2094
+ )
2095
+
2096
+ _response_types_map: Dict[str, Optional[str]] = {
2097
+ '200': "ConsolidationResponse",
2098
+ '422': "HTTPValidationError",
2099
+ }
2100
+ response_data = await self.api_client.call_api(
2101
+ *_param,
2102
+ _request_timeout=_request_timeout
2103
+ )
2104
+ await response_data.read()
2105
+ return self.api_client.response_deserialize(
2106
+ response_data=response_data,
2107
+ response_types_map=_response_types_map,
2108
+ ).data
2109
+
2110
+
2111
+ @validate_call
2112
+ async def trigger_consolidation_with_http_info(
2113
+ self,
2114
+ bank_id: StrictStr,
2115
+ authorization: Optional[StrictStr] = None,
2116
+ _request_timeout: Union[
2117
+ None,
2118
+ Annotated[StrictFloat, Field(gt=0)],
2119
+ Tuple[
2120
+ Annotated[StrictFloat, Field(gt=0)],
2121
+ Annotated[StrictFloat, Field(gt=0)]
2122
+ ]
2123
+ ] = None,
2124
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2125
+ _content_type: Optional[StrictStr] = None,
2126
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2127
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2128
+ ) -> ApiResponse[ConsolidationResponse]:
2129
+ """Trigger consolidation
2130
+
2131
+ Run memory consolidation to create/update observations from recent memories.
2132
+
2133
+ :param bank_id: (required)
2134
+ :type bank_id: str
2135
+ :param authorization:
2136
+ :type authorization: str
2137
+ :param _request_timeout: timeout setting for this request. If one
2138
+ number provided, it will be total request
2139
+ timeout. It can also be a pair (tuple) of
2140
+ (connection, read) timeouts.
2141
+ :type _request_timeout: int, tuple(int, int), optional
2142
+ :param _request_auth: set to override the auth_settings for an a single
2143
+ request; this effectively ignores the
2144
+ authentication in the spec for a single request.
2145
+ :type _request_auth: dict, optional
2146
+ :param _content_type: force content-type for the request.
2147
+ :type _content_type: str, Optional
2148
+ :param _headers: set to override the headers for a single
2149
+ request; this effectively ignores the headers
2150
+ in the spec for a single request.
2151
+ :type _headers: dict, optional
2152
+ :param _host_index: set to override the host_index for a single
2153
+ request; this effectively ignores the host_index
2154
+ in the spec for a single request.
2155
+ :type _host_index: int, optional
2156
+ :return: Returns the result object.
2157
+ """ # noqa: E501
2158
+
2159
+ _param = self._trigger_consolidation_serialize(
2160
+ bank_id=bank_id,
2161
+ authorization=authorization,
2162
+ _request_auth=_request_auth,
2163
+ _content_type=_content_type,
2164
+ _headers=_headers,
2165
+ _host_index=_host_index
2166
+ )
2167
+
2168
+ _response_types_map: Dict[str, Optional[str]] = {
2169
+ '200': "ConsolidationResponse",
2170
+ '422': "HTTPValidationError",
2171
+ }
2172
+ response_data = await self.api_client.call_api(
2173
+ *_param,
2174
+ _request_timeout=_request_timeout
2175
+ )
2176
+ await response_data.read()
2177
+ return self.api_client.response_deserialize(
2178
+ response_data=response_data,
2179
+ response_types_map=_response_types_map,
2180
+ )
2181
+
2182
+
2183
+ @validate_call
2184
+ async def trigger_consolidation_without_preload_content(
2185
+ self,
2186
+ bank_id: StrictStr,
2187
+ authorization: Optional[StrictStr] = None,
2188
+ _request_timeout: Union[
2189
+ None,
2190
+ Annotated[StrictFloat, Field(gt=0)],
2191
+ Tuple[
2192
+ Annotated[StrictFloat, Field(gt=0)],
2193
+ Annotated[StrictFloat, Field(gt=0)]
2194
+ ]
2195
+ ] = None,
2196
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2197
+ _content_type: Optional[StrictStr] = None,
2198
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2199
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2200
+ ) -> RESTResponseType:
2201
+ """Trigger consolidation
2202
+
2203
+ Run memory consolidation to create/update observations from recent memories.
2204
+
2205
+ :param bank_id: (required)
2206
+ :type bank_id: str
2207
+ :param authorization:
2208
+ :type authorization: str
2209
+ :param _request_timeout: timeout setting for this request. If one
2210
+ number provided, it will be total request
2211
+ timeout. It can also be a pair (tuple) of
2212
+ (connection, read) timeouts.
2213
+ :type _request_timeout: int, tuple(int, int), optional
2214
+ :param _request_auth: set to override the auth_settings for an a single
2215
+ request; this effectively ignores the
2216
+ authentication in the spec for a single request.
2217
+ :type _request_auth: dict, optional
2218
+ :param _content_type: force content-type for the request.
2219
+ :type _content_type: str, Optional
2220
+ :param _headers: set to override the headers for a single
2221
+ request; this effectively ignores the headers
2222
+ in the spec for a single request.
2223
+ :type _headers: dict, optional
2224
+ :param _host_index: set to override the host_index for a single
2225
+ request; this effectively ignores the host_index
2226
+ in the spec for a single request.
2227
+ :type _host_index: int, optional
2228
+ :return: Returns the result object.
2229
+ """ # noqa: E501
2230
+
2231
+ _param = self._trigger_consolidation_serialize(
2232
+ bank_id=bank_id,
2233
+ authorization=authorization,
2234
+ _request_auth=_request_auth,
2235
+ _content_type=_content_type,
2236
+ _headers=_headers,
2237
+ _host_index=_host_index
2238
+ )
2239
+
2240
+ _response_types_map: Dict[str, Optional[str]] = {
2241
+ '200': "ConsolidationResponse",
2242
+ '422': "HTTPValidationError",
2243
+ }
2244
+ response_data = await self.api_client.call_api(
2245
+ *_param,
2246
+ _request_timeout=_request_timeout
2247
+ )
2248
+ return response_data.response
2249
+
2250
+
2251
+ def _trigger_consolidation_serialize(
2252
+ self,
2253
+ bank_id,
2254
+ authorization,
2255
+ _request_auth,
2256
+ _content_type,
2257
+ _headers,
2258
+ _host_index,
2259
+ ) -> RequestSerialized:
2260
+
2261
+ _host = None
2262
+
2263
+ _collection_formats: Dict[str, str] = {
2264
+ }
2265
+
2266
+ _path_params: Dict[str, str] = {}
2267
+ _query_params: List[Tuple[str, str]] = []
2268
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2269
+ _form_params: List[Tuple[str, str]] = []
2270
+ _files: Dict[
2271
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2272
+ ] = {}
2273
+ _body_params: Optional[bytes] = None
2274
+
2275
+ # process the path parameters
2276
+ if bank_id is not None:
2277
+ _path_params['bank_id'] = bank_id
2278
+ # process the query parameters
2279
+ # process the header parameters
2280
+ if authorization is not None:
2281
+ _header_params['authorization'] = authorization
2282
+ # process the form parameters
2283
+ # process the body parameter
2284
+
2285
+
2286
+ # set the HTTP header `Accept`
2287
+ if 'Accept' not in _header_params:
2288
+ _header_params['Accept'] = self.api_client.select_header_accept(
2289
+ [
2290
+ 'application/json'
2291
+ ]
2292
+ )
2293
+
2294
+
2295
+ # authentication setting
2296
+ _auth_settings: List[str] = [
2297
+ ]
2298
+
2299
+ return self.api_client.param_serialize(
2300
+ method='POST',
2301
+ resource_path='/v1/default/banks/{bank_id}/consolidate',
2302
+ path_params=_path_params,
2303
+ query_params=_query_params,
2304
+ header_params=_header_params,
2305
+ body=_body_params,
2306
+ post_params=_form_params,
2307
+ files=_files,
2308
+ auth_settings=_auth_settings,
2309
+ collection_formats=_collection_formats,
2310
+ _host=_host,
2311
+ _request_auth=_request_auth
2312
+ )
2313
+
2314
+
2315
+
2316
+
2317
+ @validate_call
2318
+ async def update_bank(
2319
+ self,
2320
+ bank_id: StrictStr,
2321
+ create_bank_request: CreateBankRequest,
2322
+ authorization: Optional[StrictStr] = None,
2323
+ _request_timeout: Union[
2324
+ None,
2325
+ Annotated[StrictFloat, Field(gt=0)],
2326
+ Tuple[
2327
+ Annotated[StrictFloat, Field(gt=0)],
2328
+ Annotated[StrictFloat, Field(gt=0)]
2329
+ ]
2330
+ ] = None,
2331
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2332
+ _content_type: Optional[StrictStr] = None,
2333
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2334
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2335
+ ) -> BankProfileResponse:
2336
+ """Partial update memory bank
2337
+
2338
+ Partially update an agent's profile. Only provided fields will be updated.
2339
+
2340
+ :param bank_id: (required)
2341
+ :type bank_id: str
2342
+ :param create_bank_request: (required)
2343
+ :type create_bank_request: CreateBankRequest
2344
+ :param authorization:
2345
+ :type authorization: str
2346
+ :param _request_timeout: timeout setting for this request. If one
2347
+ number provided, it will be total request
2348
+ timeout. It can also be a pair (tuple) of
2349
+ (connection, read) timeouts.
2350
+ :type _request_timeout: int, tuple(int, int), optional
2351
+ :param _request_auth: set to override the auth_settings for an a single
2352
+ request; this effectively ignores the
2353
+ authentication in the spec for a single request.
2354
+ :type _request_auth: dict, optional
2355
+ :param _content_type: force content-type for the request.
2356
+ :type _content_type: str, Optional
2357
+ :param _headers: set to override the headers for a single
2358
+ request; this effectively ignores the headers
2359
+ in the spec for a single request.
2360
+ :type _headers: dict, optional
2361
+ :param _host_index: set to override the host_index for a single
2362
+ request; this effectively ignores the host_index
2363
+ in the spec for a single request.
2364
+ :type _host_index: int, optional
2365
+ :return: Returns the result object.
2366
+ """ # noqa: E501
2367
+
2368
+ _param = self._update_bank_serialize(
2369
+ bank_id=bank_id,
2370
+ create_bank_request=create_bank_request,
2371
+ authorization=authorization,
2372
+ _request_auth=_request_auth,
2373
+ _content_type=_content_type,
2374
+ _headers=_headers,
2375
+ _host_index=_host_index
2376
+ )
2377
+
2378
+ _response_types_map: Dict[str, Optional[str]] = {
2379
+ '200': "BankProfileResponse",
2380
+ '422': "HTTPValidationError",
2381
+ }
2382
+ response_data = await self.api_client.call_api(
2383
+ *_param,
2384
+ _request_timeout=_request_timeout
2385
+ )
2386
+ await response_data.read()
2387
+ return self.api_client.response_deserialize(
2388
+ response_data=response_data,
2389
+ response_types_map=_response_types_map,
2390
+ ).data
2391
+
2392
+
2393
+ @validate_call
2394
+ async def update_bank_with_http_info(
2395
+ self,
2396
+ bank_id: StrictStr,
2397
+ create_bank_request: CreateBankRequest,
2398
+ authorization: Optional[StrictStr] = None,
2399
+ _request_timeout: Union[
2400
+ None,
2401
+ Annotated[StrictFloat, Field(gt=0)],
2402
+ Tuple[
2403
+ Annotated[StrictFloat, Field(gt=0)],
2404
+ Annotated[StrictFloat, Field(gt=0)]
2405
+ ]
2406
+ ] = None,
2407
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2408
+ _content_type: Optional[StrictStr] = None,
2409
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2410
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2411
+ ) -> ApiResponse[BankProfileResponse]:
2412
+ """Partial update memory bank
2413
+
2414
+ Partially update an agent's profile. Only provided fields will be updated.
2415
+
2416
+ :param bank_id: (required)
2417
+ :type bank_id: str
2418
+ :param create_bank_request: (required)
2419
+ :type create_bank_request: CreateBankRequest
2420
+ :param authorization:
2421
+ :type authorization: str
2422
+ :param _request_timeout: timeout setting for this request. If one
2423
+ number provided, it will be total request
2424
+ timeout. It can also be a pair (tuple) of
2425
+ (connection, read) timeouts.
2426
+ :type _request_timeout: int, tuple(int, int), optional
2427
+ :param _request_auth: set to override the auth_settings for an a single
2428
+ request; this effectively ignores the
2429
+ authentication in the spec for a single request.
2430
+ :type _request_auth: dict, optional
2431
+ :param _content_type: force content-type for the request.
2432
+ :type _content_type: str, Optional
2433
+ :param _headers: set to override the headers for a single
2434
+ request; this effectively ignores the headers
2435
+ in the spec for a single request.
2436
+ :type _headers: dict, optional
2437
+ :param _host_index: set to override the host_index for a single
2438
+ request; this effectively ignores the host_index
2439
+ in the spec for a single request.
2440
+ :type _host_index: int, optional
2441
+ :return: Returns the result object.
2442
+ """ # noqa: E501
2443
+
2444
+ _param = self._update_bank_serialize(
2445
+ bank_id=bank_id,
2446
+ create_bank_request=create_bank_request,
2447
+ authorization=authorization,
2448
+ _request_auth=_request_auth,
2449
+ _content_type=_content_type,
2450
+ _headers=_headers,
2451
+ _host_index=_host_index
2452
+ )
2453
+
2454
+ _response_types_map: Dict[str, Optional[str]] = {
2455
+ '200': "BankProfileResponse",
2456
+ '422': "HTTPValidationError",
2457
+ }
2458
+ response_data = await self.api_client.call_api(
2459
+ *_param,
2460
+ _request_timeout=_request_timeout
2461
+ )
2462
+ await response_data.read()
2463
+ return self.api_client.response_deserialize(
2464
+ response_data=response_data,
2465
+ response_types_map=_response_types_map,
2466
+ )
2467
+
2468
+
2469
+ @validate_call
2470
+ async def update_bank_without_preload_content(
2471
+ self,
2472
+ bank_id: StrictStr,
2473
+ create_bank_request: CreateBankRequest,
2474
+ authorization: Optional[StrictStr] = None,
2475
+ _request_timeout: Union[
2476
+ None,
2477
+ Annotated[StrictFloat, Field(gt=0)],
2478
+ Tuple[
2479
+ Annotated[StrictFloat, Field(gt=0)],
2480
+ Annotated[StrictFloat, Field(gt=0)]
2481
+ ]
2482
+ ] = None,
2483
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2484
+ _content_type: Optional[StrictStr] = None,
2485
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2486
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2487
+ ) -> RESTResponseType:
2488
+ """Partial update memory bank
2489
+
2490
+ Partially update an agent's profile. Only provided fields will be updated.
2491
+
2492
+ :param bank_id: (required)
2493
+ :type bank_id: str
2494
+ :param create_bank_request: (required)
2495
+ :type create_bank_request: CreateBankRequest
2496
+ :param authorization:
2497
+ :type authorization: str
2498
+ :param _request_timeout: timeout setting for this request. If one
2499
+ number provided, it will be total request
2500
+ timeout. It can also be a pair (tuple) of
2501
+ (connection, read) timeouts.
2502
+ :type _request_timeout: int, tuple(int, int), optional
2503
+ :param _request_auth: set to override the auth_settings for an a single
2504
+ request; this effectively ignores the
2505
+ authentication in the spec for a single request.
2506
+ :type _request_auth: dict, optional
2507
+ :param _content_type: force content-type for the request.
2508
+ :type _content_type: str, Optional
2509
+ :param _headers: set to override the headers for a single
2510
+ request; this effectively ignores the headers
2511
+ in the spec for a single request.
2512
+ :type _headers: dict, optional
2513
+ :param _host_index: set to override the host_index for a single
2514
+ request; this effectively ignores the host_index
2515
+ in the spec for a single request.
2516
+ :type _host_index: int, optional
2517
+ :return: Returns the result object.
2518
+ """ # noqa: E501
2519
+
2520
+ _param = self._update_bank_serialize(
2521
+ bank_id=bank_id,
2522
+ create_bank_request=create_bank_request,
2523
+ authorization=authorization,
2524
+ _request_auth=_request_auth,
2525
+ _content_type=_content_type,
2526
+ _headers=_headers,
2527
+ _host_index=_host_index
2528
+ )
2529
+
2530
+ _response_types_map: Dict[str, Optional[str]] = {
2531
+ '200': "BankProfileResponse",
2532
+ '422': "HTTPValidationError",
2533
+ }
2534
+ response_data = await self.api_client.call_api(
2535
+ *_param,
2536
+ _request_timeout=_request_timeout
2537
+ )
2538
+ return response_data.response
2539
+
2540
+
2541
+ def _update_bank_serialize(
2542
+ self,
2543
+ bank_id,
2544
+ create_bank_request,
2545
+ authorization,
2546
+ _request_auth,
2547
+ _content_type,
2548
+ _headers,
2549
+ _host_index,
2550
+ ) -> RequestSerialized:
2551
+
2552
+ _host = None
2553
+
2554
+ _collection_formats: Dict[str, str] = {
2555
+ }
2556
+
2557
+ _path_params: Dict[str, str] = {}
2558
+ _query_params: List[Tuple[str, str]] = []
2559
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2560
+ _form_params: List[Tuple[str, str]] = []
2561
+ _files: Dict[
2562
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2563
+ ] = {}
2564
+ _body_params: Optional[bytes] = None
2565
+
2566
+ # process the path parameters
2567
+ if bank_id is not None:
2568
+ _path_params['bank_id'] = bank_id
2569
+ # process the query parameters
2570
+ # process the header parameters
2571
+ if authorization is not None:
2572
+ _header_params['authorization'] = authorization
2573
+ # process the form parameters
2574
+ # process the body parameter
2575
+ if create_bank_request is not None:
2576
+ _body_params = create_bank_request
2577
+
2578
+
2579
+ # set the HTTP header `Accept`
2580
+ if 'Accept' not in _header_params:
2581
+ _header_params['Accept'] = self.api_client.select_header_accept(
2582
+ [
2583
+ 'application/json'
2584
+ ]
2585
+ )
2586
+
2587
+ # set the HTTP header `Content-Type`
2588
+ if _content_type:
2589
+ _header_params['Content-Type'] = _content_type
2590
+ else:
2591
+ _default_content_type = (
2592
+ self.api_client.select_header_content_type(
2593
+ [
2594
+ 'application/json'
2595
+ ]
2596
+ )
2597
+ )
2598
+ if _default_content_type is not None:
2599
+ _header_params['Content-Type'] = _default_content_type
2600
+
2601
+ # authentication setting
2602
+ _auth_settings: List[str] = [
2603
+ ]
2604
+
2605
+ return self.api_client.param_serialize(
2606
+ method='PATCH',
2607
+ resource_path='/v1/default/banks/{bank_id}',
1742
2608
  path_params=_path_params,
1743
2609
  query_params=_query_params,
1744
2610
  header_params=_header_params,