qanswer_sdk 3.1400.0__py3-none-any.whl → 3.1401.0__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.
qanswer_sdk/__init__.py CHANGED
@@ -14,7 +14,7 @@
14
14
  """ # noqa: E501
15
15
 
16
16
 
17
- __version__ = "3.1400.0"
17
+ __version__ = "3.1401.0"
18
18
 
19
19
  # import apis into sdk package
20
20
  from qanswer_sdk.api.admin_api import AdminApi
@@ -765,6 +765,377 @@ class ConnectorDocumentApi:
765
765
 
766
766
 
767
767
 
768
+ @validate_call
769
+ def document_connector_add_documents_load_test(
770
+ self,
771
+ username: StrictStr,
772
+ dataset: StrictStr,
773
+ file: List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]],
774
+ connector_id: Optional[StrictInt] = None,
775
+ convert_to_pdf: Optional[StrictBool] = None,
776
+ q_answer_api_key: Optional[StrictStr] = None,
777
+ metadata: Optional[DocumentMetadataListWrapper] = None,
778
+ _request_timeout: Union[
779
+ None,
780
+ Annotated[StrictFloat, Field(gt=0)],
781
+ Tuple[
782
+ Annotated[StrictFloat, Field(gt=0)],
783
+ Annotated[StrictFloat, Field(gt=0)]
784
+ ]
785
+ ] = None,
786
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
787
+ _content_type: Optional[StrictStr] = None,
788
+ _headers: Optional[Dict[StrictStr, Any]] = None,
789
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
790
+ ) -> StatusResponse:
791
+ """document_connector_add_documents_load_test
792
+
793
+
794
+ :param username: (required)
795
+ :type username: str
796
+ :param dataset: (required)
797
+ :type dataset: str
798
+ :param file: (required)
799
+ :type file: List[bytearray]
800
+ :param connector_id:
801
+ :type connector_id: int
802
+ :param convert_to_pdf:
803
+ :type convert_to_pdf: bool
804
+ :param q_answer_api_key:
805
+ :type q_answer_api_key: str
806
+ :param metadata:
807
+ :type metadata: DocumentMetadataListWrapper
808
+ :param _request_timeout: timeout setting for this request. If one
809
+ number provided, it will be total request
810
+ timeout. It can also be a pair (tuple) of
811
+ (connection, read) timeouts.
812
+ :type _request_timeout: int, tuple(int, int), optional
813
+ :param _request_auth: set to override the auth_settings for an a single
814
+ request; this effectively ignores the
815
+ authentication in the spec for a single request.
816
+ :type _request_auth: dict, optional
817
+ :param _content_type: force content-type for the request.
818
+ :type _content_type: str, Optional
819
+ :param _headers: set to override the headers for a single
820
+ request; this effectively ignores the headers
821
+ in the spec for a single request.
822
+ :type _headers: dict, optional
823
+ :param _host_index: set to override the host_index for a single
824
+ request; this effectively ignores the host_index
825
+ in the spec for a single request.
826
+ :type _host_index: int, optional
827
+ :return: Returns the result object.
828
+ """ # noqa: E501
829
+
830
+ _param = self._document_connector_add_documents_load_test_serialize(
831
+ username=username,
832
+ dataset=dataset,
833
+ file=file,
834
+ connector_id=connector_id,
835
+ convert_to_pdf=convert_to_pdf,
836
+ q_answer_api_key=q_answer_api_key,
837
+ metadata=metadata,
838
+ _request_auth=_request_auth,
839
+ _content_type=_content_type,
840
+ _headers=_headers,
841
+ _host_index=_host_index
842
+ )
843
+
844
+ _response_types_map: Dict[str, Optional[str]] = {
845
+ '200': "StatusResponse",
846
+ }
847
+ response_data = self.api_client.call_api(
848
+ *_param,
849
+ _request_timeout=_request_timeout
850
+ )
851
+ response_data.read()
852
+ return self.api_client.response_deserialize(
853
+ response_data=response_data,
854
+ response_types_map=_response_types_map,
855
+ ).data
856
+
857
+
858
+ @validate_call
859
+ def document_connector_add_documents_load_test_with_http_info(
860
+ self,
861
+ username: StrictStr,
862
+ dataset: StrictStr,
863
+ file: List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]],
864
+ connector_id: Optional[StrictInt] = None,
865
+ convert_to_pdf: Optional[StrictBool] = None,
866
+ q_answer_api_key: Optional[StrictStr] = None,
867
+ metadata: Optional[DocumentMetadataListWrapper] = None,
868
+ _request_timeout: Union[
869
+ None,
870
+ Annotated[StrictFloat, Field(gt=0)],
871
+ Tuple[
872
+ Annotated[StrictFloat, Field(gt=0)],
873
+ Annotated[StrictFloat, Field(gt=0)]
874
+ ]
875
+ ] = None,
876
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
877
+ _content_type: Optional[StrictStr] = None,
878
+ _headers: Optional[Dict[StrictStr, Any]] = None,
879
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
880
+ ) -> ApiResponse[StatusResponse]:
881
+ """document_connector_add_documents_load_test
882
+
883
+
884
+ :param username: (required)
885
+ :type username: str
886
+ :param dataset: (required)
887
+ :type dataset: str
888
+ :param file: (required)
889
+ :type file: List[bytearray]
890
+ :param connector_id:
891
+ :type connector_id: int
892
+ :param convert_to_pdf:
893
+ :type convert_to_pdf: bool
894
+ :param q_answer_api_key:
895
+ :type q_answer_api_key: str
896
+ :param metadata:
897
+ :type metadata: DocumentMetadataListWrapper
898
+ :param _request_timeout: timeout setting for this request. If one
899
+ number provided, it will be total request
900
+ timeout. It can also be a pair (tuple) of
901
+ (connection, read) timeouts.
902
+ :type _request_timeout: int, tuple(int, int), optional
903
+ :param _request_auth: set to override the auth_settings for an a single
904
+ request; this effectively ignores the
905
+ authentication in the spec for a single request.
906
+ :type _request_auth: dict, optional
907
+ :param _content_type: force content-type for the request.
908
+ :type _content_type: str, Optional
909
+ :param _headers: set to override the headers for a single
910
+ request; this effectively ignores the headers
911
+ in the spec for a single request.
912
+ :type _headers: dict, optional
913
+ :param _host_index: set to override the host_index for a single
914
+ request; this effectively ignores the host_index
915
+ in the spec for a single request.
916
+ :type _host_index: int, optional
917
+ :return: Returns the result object.
918
+ """ # noqa: E501
919
+
920
+ _param = self._document_connector_add_documents_load_test_serialize(
921
+ username=username,
922
+ dataset=dataset,
923
+ file=file,
924
+ connector_id=connector_id,
925
+ convert_to_pdf=convert_to_pdf,
926
+ q_answer_api_key=q_answer_api_key,
927
+ metadata=metadata,
928
+ _request_auth=_request_auth,
929
+ _content_type=_content_type,
930
+ _headers=_headers,
931
+ _host_index=_host_index
932
+ )
933
+
934
+ _response_types_map: Dict[str, Optional[str]] = {
935
+ '200': "StatusResponse",
936
+ }
937
+ response_data = self.api_client.call_api(
938
+ *_param,
939
+ _request_timeout=_request_timeout
940
+ )
941
+ response_data.read()
942
+ return self.api_client.response_deserialize(
943
+ response_data=response_data,
944
+ response_types_map=_response_types_map,
945
+ )
946
+
947
+
948
+ @validate_call
949
+ def document_connector_add_documents_load_test_without_preload_content(
950
+ self,
951
+ username: StrictStr,
952
+ dataset: StrictStr,
953
+ file: List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]],
954
+ connector_id: Optional[StrictInt] = None,
955
+ convert_to_pdf: Optional[StrictBool] = None,
956
+ q_answer_api_key: Optional[StrictStr] = None,
957
+ metadata: Optional[DocumentMetadataListWrapper] = None,
958
+ _request_timeout: Union[
959
+ None,
960
+ Annotated[StrictFloat, Field(gt=0)],
961
+ Tuple[
962
+ Annotated[StrictFloat, Field(gt=0)],
963
+ Annotated[StrictFloat, Field(gt=0)]
964
+ ]
965
+ ] = None,
966
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
967
+ _content_type: Optional[StrictStr] = None,
968
+ _headers: Optional[Dict[StrictStr, Any]] = None,
969
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
970
+ ) -> RESTResponseType:
971
+ """document_connector_add_documents_load_test
972
+
973
+
974
+ :param username: (required)
975
+ :type username: str
976
+ :param dataset: (required)
977
+ :type dataset: str
978
+ :param file: (required)
979
+ :type file: List[bytearray]
980
+ :param connector_id:
981
+ :type connector_id: int
982
+ :param convert_to_pdf:
983
+ :type convert_to_pdf: bool
984
+ :param q_answer_api_key:
985
+ :type q_answer_api_key: str
986
+ :param metadata:
987
+ :type metadata: DocumentMetadataListWrapper
988
+ :param _request_timeout: timeout setting for this request. If one
989
+ number provided, it will be total request
990
+ timeout. It can also be a pair (tuple) of
991
+ (connection, read) timeouts.
992
+ :type _request_timeout: int, tuple(int, int), optional
993
+ :param _request_auth: set to override the auth_settings for an a single
994
+ request; this effectively ignores the
995
+ authentication in the spec for a single request.
996
+ :type _request_auth: dict, optional
997
+ :param _content_type: force content-type for the request.
998
+ :type _content_type: str, Optional
999
+ :param _headers: set to override the headers for a single
1000
+ request; this effectively ignores the headers
1001
+ in the spec for a single request.
1002
+ :type _headers: dict, optional
1003
+ :param _host_index: set to override the host_index for a single
1004
+ request; this effectively ignores the host_index
1005
+ in the spec for a single request.
1006
+ :type _host_index: int, optional
1007
+ :return: Returns the result object.
1008
+ """ # noqa: E501
1009
+
1010
+ _param = self._document_connector_add_documents_load_test_serialize(
1011
+ username=username,
1012
+ dataset=dataset,
1013
+ file=file,
1014
+ connector_id=connector_id,
1015
+ convert_to_pdf=convert_to_pdf,
1016
+ q_answer_api_key=q_answer_api_key,
1017
+ metadata=metadata,
1018
+ _request_auth=_request_auth,
1019
+ _content_type=_content_type,
1020
+ _headers=_headers,
1021
+ _host_index=_host_index
1022
+ )
1023
+
1024
+ _response_types_map: Dict[str, Optional[str]] = {
1025
+ '200': "StatusResponse",
1026
+ }
1027
+ response_data = self.api_client.call_api(
1028
+ *_param,
1029
+ _request_timeout=_request_timeout
1030
+ )
1031
+ return response_data.response
1032
+
1033
+
1034
+ def _document_connector_add_documents_load_test_serialize(
1035
+ self,
1036
+ username,
1037
+ dataset,
1038
+ file,
1039
+ connector_id,
1040
+ convert_to_pdf,
1041
+ q_answer_api_key,
1042
+ metadata,
1043
+ _request_auth,
1044
+ _content_type,
1045
+ _headers,
1046
+ _host_index,
1047
+ ) -> RequestSerialized:
1048
+
1049
+ _host = None
1050
+
1051
+ _collection_formats: Dict[str, str] = {
1052
+ 'file': 'csv',
1053
+ }
1054
+
1055
+ _path_params: Dict[str, str] = {}
1056
+ _query_params: List[Tuple[str, str]] = []
1057
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1058
+ _form_params: List[Tuple[str, str]] = []
1059
+ _files: Dict[
1060
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1061
+ ] = {}
1062
+ _body_params: Optional[bytes] = None
1063
+
1064
+ # process the path parameters
1065
+ # process the query parameters
1066
+ if username is not None:
1067
+
1068
+ _query_params.append(('username', username))
1069
+
1070
+ if dataset is not None:
1071
+
1072
+ _query_params.append(('dataset', dataset))
1073
+
1074
+ if connector_id is not None:
1075
+
1076
+ _query_params.append(('connector_id', connector_id))
1077
+
1078
+ if convert_to_pdf is not None:
1079
+
1080
+ _query_params.append(('convert_to_pdf', convert_to_pdf))
1081
+
1082
+ # process the header parameters
1083
+ if q_answer_api_key is not None:
1084
+ _header_params['QAnswer-Api-Key'] = q_answer_api_key
1085
+ # process the form parameters
1086
+ if file is not None:
1087
+ _files['file'] = file
1088
+ if metadata is not None:
1089
+ _form_params.append(('metadata', metadata))
1090
+ # process the body parameter
1091
+
1092
+
1093
+ # set the HTTP header `Accept`
1094
+ if 'Accept' not in _header_params:
1095
+ _header_params['Accept'] = self.api_client.select_header_accept(
1096
+ [
1097
+ '*/*'
1098
+ ]
1099
+ )
1100
+
1101
+ # set the HTTP header `Content-Type`
1102
+ if _content_type:
1103
+ _header_params['Content-Type'] = _content_type
1104
+ else:
1105
+ _default_content_type = (
1106
+ self.api_client.select_header_content_type(
1107
+ [
1108
+ 'multipart/form-data'
1109
+ ]
1110
+ )
1111
+ )
1112
+ if _default_content_type is not None:
1113
+ _header_params['Content-Type'] = _default_content_type
1114
+
1115
+ # authentication setting
1116
+ _auth_settings: List[str] = [
1117
+ 'QAnswer-Api-Key',
1118
+ 'Bearer'
1119
+ ]
1120
+
1121
+ return self.api_client.param_serialize(
1122
+ method='POST',
1123
+ resource_path='/api/connectors/document/add-async-loadtest',
1124
+ path_params=_path_params,
1125
+ query_params=_query_params,
1126
+ header_params=_header_params,
1127
+ body=_body_params,
1128
+ post_params=_form_params,
1129
+ files=_files,
1130
+ auth_settings=_auth_settings,
1131
+ collection_formats=_collection_formats,
1132
+ _host=_host,
1133
+ _request_auth=_request_auth
1134
+ )
1135
+
1136
+
1137
+
1138
+
768
1139
  @validate_call
769
1140
  def document_connector_add_documents_sync(
770
1141
  self,
qanswer_sdk/api_client.py CHANGED
@@ -90,7 +90,7 @@ class ApiClient:
90
90
  self.default_headers[header_name] = header_value
91
91
  self.cookie = cookie
92
92
  # Set default User-Agent.
93
- self.user_agent = 'OpenAPI-Generator/3.1400.0/python'
93
+ self.user_agent = 'OpenAPI-Generator/3.1401.0/python'
94
94
  self.client_side_validation = configuration.client_side_validation
95
95
 
96
96
  def __enter__(self):
@@ -421,7 +421,7 @@ conf = qanswer_sdk.Configuration(
421
421
  "OS: {env}\n"\
422
422
  "Python Version: {pyversion}\n"\
423
423
  "Version of the API: 1.0\n"\
424
- "SDK Package Version: 3.1400.0".\
424
+ "SDK Package Version: 3.1401.0".\
425
425
  format(env=sys.platform, pyversion=sys.version)
426
426
 
427
427
  def get_host_settings(self):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: qanswer_sdk
3
- Version: 3.1400.0
3
+ Version: 3.1401.0
4
4
  Summary: QAnswer: Api Documentation
5
5
  Home-page: https://github.com/GIT_USER_ID/GIT_REPO_ID
6
6
  License: NoLicense
@@ -228,7 +228,7 @@ print(response.answer)
228
228
  ## 📌 Versioning
229
229
 
230
230
  This SDK follows the version of the QAnswer API.
231
- The current version is: `3.1400.0 (branch: main)`
231
+ The current version is: `3.1401.0 (branch: main)`
232
232
 
233
233
  ---
234
234
 
@@ -1,4 +1,4 @@
1
- qanswer_sdk/__init__.py,sha256=8LRNggwkt0qaT9o1I0mJvRagvCaYGz7W60Vu_UKa5Z8,29998
1
+ qanswer_sdk/__init__.py,sha256=Zg-6vwTGSsI-poIlRzuAjnZKsz8pgmLpwRrR37wqVqM,29998
2
2
  qanswer_sdk/api/__init__.py,sha256=qOjbgvAjL3-0FN477a04p1ZfED9fdwOrNJbpAJ78VDM,3318
3
3
  qanswer_sdk/api/admin_api.py,sha256=mInmqz3poGNoQJ4RDO4hDNXvAYwHpteg0CeK01O0-iw,196215
4
4
  qanswer_sdk/api/ai_assistant_access_rights_api.py,sha256=doVSEXNV8Um-W56e5Pf0TZWuXWwXDuWlRg5zNA8-vl8,198574
@@ -7,7 +7,7 @@ qanswer_sdk/api/bot_slack_api.py,sha256=2Fo_5-0feBmU5yt46QOe6gUnn1vqGftNWtK5eOQo
7
7
  qanswer_sdk/api/branding_api.py,sha256=zDxbpinNDXdRlYUVtPKuhxUx5bnUaPzflAss1MpSR78,202442
8
8
  qanswer_sdk/api/chatbot_api.py,sha256=nq66sd-2K68tSwvfa4f39pdKJzgjOGOxVN-Z3c885nk,41025
9
9
  qanswer_sdk/api/connector_audio_api.py,sha256=HnLEDTnG-fOpIYFyftOhK9P0fLKTB1AMyUFxREM5juE,121356
10
- qanswer_sdk/api/connector_document_api.py,sha256=LMGfMS--89NuYcpvU1hZ_3zoiQIKd10R2R9jJIwyHgs,68753
10
+ qanswer_sdk/api/connector_document_api.py,sha256=MuoRAaZcfztX0kUoaWn39LKgfgH9EYLsoGLKDdyIwV8,82823
11
11
  qanswer_sdk/api/connector_e_consilium_api.py,sha256=lrlUdGiv8y_Pv2MY7casq8KvtSLjRzvdLhuyZ0yTMZc,12493
12
12
  qanswer_sdk/api/connector_e_consilium_search_index_api_api.py,sha256=vF2ohElY1Jmhn5CpRyqVuGieeBWWVBNk7AaGD4Wjcb4,47782
13
13
  qanswer_sdk/api/connector_google_drive_api.py,sha256=9kVHg-uMAIWZ5UAqkKkeuaCaJseHx2GNKkDLQtcM3yY,70104
@@ -49,9 +49,9 @@ qanswer_sdk/api/unit_teams_api.py,sha256=Soc3QkvulKcEUUkz_JIh08qGhO15pMFhTxy8Y0X
49
49
  qanswer_sdk/api/unit_user_api.py,sha256=0Bs5CC8mGziJEbB4fF_hJzqXFf8TvmSTpLZ1KCzinr8,349567
50
50
  qanswer_sdk/api/v1_chat_completion_api.py,sha256=dZb24eHPCa-bG_6K4B2DTuTTqrWLuoKgYFWhAarjB1c,11575
51
51
  qanswer_sdk/api/v1_embeddings_api.py,sha256=Oal0PnTuL3AZACXsPhofY6BuOKoM24ne0HuXhReK_SA,11769
52
- qanswer_sdk/api_client.py,sha256=OohdS8SeqtlEugqI79Q6lnqA_FEyLWk6rsnwvjNH8y0,27387
52
+ qanswer_sdk/api_client.py,sha256=ct4BoXstHUaCqIKwOzGHNCpwYHyqlvsWDXr3KFgviJg,27387
53
53
  qanswer_sdk/api_response.py,sha256=eMxw1mpmJcoGZ3gs9z6jM4oYoZ10Gjk333s9sKxGv7s,652
54
- qanswer_sdk/configuration.py,sha256=VJLQnC718gqUWmU_I5m4mTUMY36IaicXcrJb296eHd4,16184
54
+ qanswer_sdk/configuration.py,sha256=4HR3WzAuvAlyY9btmdtqKON1zzwZYRCajqe_Ckk_55s,16184
55
55
  qanswer_sdk/exceptions.py,sha256=BCaz7REoUyrBq8zuVBNTmEHGvJfM1YyLSyOnkB1XQLU,5907
56
56
  qanswer_sdk/models/__init__.py,sha256=yEotRhUIMY1UlvW1rVI7ryeu9fApdz173_ez-1kZmXg,26208
57
57
  qanswer_sdk/models/access_pdf_payload_model.py,sha256=0oamrJeAIZdpjmcWby_PFmz-GrXD0ObDU3ecRpf7nRI,3626
@@ -407,6 +407,6 @@ qanswer_sdk/models/website_connector_settings.py,sha256=mlKuTG7Nsmv4XyEDUpVlg8ZO
407
407
  qanswer_sdk/models/widget_configs.py,sha256=H38KJ4wCup7MXD-PeTHaF0xnR1VZmCTSIxNNmQzIPVc,3703
408
408
  qanswer_sdk/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
409
409
  qanswer_sdk/rest.py,sha256=9cpA9eEQsfuHcThVnF2c7CEK0HCJYGyGZnWqmfkQpT8,9344
410
- qanswer_sdk-3.1400.0.dist-info/METADATA,sha256=Uo8_72WhJj99lsQaRRUBAaEJAp-CN0iBLKg66xhwdIc,6532
411
- qanswer_sdk-3.1400.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
412
- qanswer_sdk-3.1400.0.dist-info/RECORD,,
410
+ qanswer_sdk-3.1401.0.dist-info/METADATA,sha256=oLjpfKPzt726au8s-VcscO9sDo4UBsxbr_nZSenkxUk,6532
411
+ qanswer_sdk-3.1401.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
412
+ qanswer_sdk-3.1401.0.dist-info/RECORD,,