qanswer_sdk 3.1213.0__py3-none-any.whl → 3.1245.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 +66 -43
- qanswer_sdk/api/__init__.py +7 -4
- qanswer_sdk/api/admin_api.py +590 -7695
- qanswer_sdk/api/ai_assistant_access_rights_api.py +72 -73
- qanswer_sdk/api/ai_assistant_api.py +567 -46
- qanswer_sdk/api/branding_api.py +4578 -0
- qanswer_sdk/api/chatbot_api.py +72 -87
- qanswer_sdk/api/{tag_api.py → connector_imap_connector_api.py} +415 -997
- qanswer_sdk/api/connector_rdf_api.py +30 -31
- qanswer_sdk/api/connectors_api.py +183 -166
- qanswer_sdk/api/connectors_data_api.py +345 -1
- qanswer_sdk/api/dataset_config_api.py +0 -245
- qanswer_sdk/api/llm_api.py +30 -30
- qanswer_sdk/api/payment_api.py +17 -16
- qanswer_sdk/api/speech_to_text_api.py +2 -2
- qanswer_sdk/api/task_chat_api.py +8 -7
- qanswer_sdk/api/task_rdf_linker_api.py +35 -36
- qanswer_sdk/api/task_rdf_sparql_endpoint_api.py +16 -16
- qanswer_sdk/api/task_report_copilot_api.py +895 -281
- qanswer_sdk/api/task_search_api.py +8 -7
- qanswer_sdk/api/tool_embedder_api.py +4040 -0
- qanswer_sdk/api/{user_api.py → tool_llm_api.py} +735 -2749
- qanswer_sdk/api/unit_organizations_api.py +4547 -0
- qanswer_sdk/api/unit_teams_api.py +3906 -0
- qanswer_sdk/api/{organizations_teams_api.py → unit_user_api.py} +1345 -1394
- qanswer_sdk/api_client.py +1 -1
- qanswer_sdk/configuration.py +1 -1
- qanswer_sdk/models/__init__.py +58 -38
- qanswer_sdk/models/aggregation.py +2 -2
- qanswer_sdk/models/ai_assistant_filter_dto.py +105 -0
- qanswer_sdk/models/{user_profile_paginated.py → ai_assistant_list.py} +18 -18
- qanswer_sdk/models/{embedding_model.py → available_aggregation.py} +13 -11
- qanswer_sdk/models/available_connectors_response.py +2 -2
- qanswer_sdk/models/{branding_data.py → branding_app_title.py} +4 -4
- qanswer_sdk/models/{api_response.py → branding_system_message.py} +8 -8
- qanswer_sdk/models/chat_task_settings.py +12 -12
- qanswer_sdk/models/chat_task_update.py +13 -5
- qanswer_sdk/models/chatbot_chat_payload.py +19 -2
- qanswer_sdk/models/chatbot_conversation_model.py +10 -0
- qanswer_sdk/models/chatbot_response.py +22 -2
- qanswer_sdk/models/{user_chatbot_setting_payload.py → chatbot_setting_dto.py} +12 -13
- qanswer_sdk/models/chatbot_setting_request.py +96 -0
- qanswer_sdk/models/{question_completion.py → clip_connector_file_structure.py} +9 -9
- qanswer_sdk/models/clip_connector_structure.py +97 -0
- qanswer_sdk/models/connector_model.py +2 -2
- qanswer_sdk/models/conversation_message.py +4 -12
- qanswer_sdk/models/{cost_summary.py → cost_summary_dto.py} +4 -4
- qanswer_sdk/models/create_connector_request.py +4 -2
- qanswer_sdk/models/create_imap_connector_request.py +105 -0
- qanswer_sdk/models/create_pinecone_connector_request.py +3 -1
- qanswer_sdk/models/create_sharepoint_connector_from_certificate_request.py +3 -1
- qanswer_sdk/models/create_sharepoint_connector_request.py +3 -1
- qanswer_sdk/models/dataset_detail_kg.py +27 -1
- qanswer_sdk/models/dataset_schema.py +4 -2
- qanswer_sdk/models/dataset_update_object.py +3 -1
- qanswer_sdk/models/delete_connector_model.py +2 -2
- qanswer_sdk/models/delete_connectors_response.py +2 -4
- qanswer_sdk/models/{json_nullable_source_metadata.py → duplicate_report_template_response.py} +11 -9
- qanswer_sdk/models/{json_nullable_file_failure_reason.py → email_folder.py} +12 -8
- qanswer_sdk/models/{embedding_endpoint.py → embedder_detailed_dto.py} +16 -8
- qanswer_sdk/models/{tag_payload.py → embedder_dto.py} +11 -7
- qanswer_sdk/models/{pageable_object.py → embedder_list_dto.py} +20 -20
- qanswer_sdk/models/embedding_endpoint_create.py +3 -1
- qanswer_sdk/models/embedding_endpoint_update.py +4 -2
- qanswer_sdk/models/{sort_object.py → entity_description.py} +16 -12
- qanswer_sdk/models/{dataset_description.py → entity_description_dto.py} +9 -7
- qanswer_sdk/models/file_model.py +2 -2
- qanswer_sdk/models/imap_add_payload.py +103 -0
- qanswer_sdk/models/imap_additional_fields.py +101 -0
- qanswer_sdk/models/imap_file_metadata.py +114 -0
- qanswer_sdk/models/imap_search_response.py +113 -0
- qanswer_sdk/models/llm.py +129 -0
- qanswer_sdk/models/llm_consumption.py +118 -0
- qanswer_sdk/models/{pageable.py → llm_context_ranges.py} +14 -13
- qanswer_sdk/models/{llm_cost.py → llm_cost_filter.py} +11 -7
- qanswer_sdk/models/llm_cost_list.py +101 -0
- qanswer_sdk/models/llm_detailed_dto.py +179 -0
- qanswer_sdk/models/{llm_details.py → llm_dto.py} +14 -18
- qanswer_sdk/models/llm_endpoint.py +8 -2
- qanswer_sdk/models/llm_endpoint_read_input.py +173 -0
- qanswer_sdk/models/llm_endpoint_read_output.py +173 -0
- qanswer_sdk/models/llm_filter_dto.py +99 -0
- qanswer_sdk/models/llm_list_detailed_dto.py +101 -0
- qanswer_sdk/models/llm_list_dto.py +101 -0
- qanswer_sdk/models/modify_connector_request.py +5 -11
- qanswer_sdk/models/{o_auth_service.py → o_auth_service_dto.py} +4 -4
- qanswer_sdk/models/organization_admin.py +95 -0
- qanswer_sdk/models/organization_filter_dto.py +97 -0
- qanswer_sdk/models/organization_list_dto.py +101 -0
- qanswer_sdk/models/organization_llm.py +103 -0
- qanswer_sdk/models/{plan.py → plan_dto.py} +4 -4
- qanswer_sdk/models/prompt_token_count_details.py +3 -3
- qanswer_sdk/models/rag_payload.py +4 -4
- qanswer_sdk/models/rag_response.py +4 -2
- qanswer_sdk/models/relation_extraction_task_settings.py +12 -10
- qanswer_sdk/models/relation_extraction_task_update.py +14 -4
- qanswer_sdk/models/report_copilot_slot_task_settings.py +12 -10
- qanswer_sdk/models/report_copilot_slot_task_update.py +13 -3
- qanswer_sdk/models/report_copilot_task_settings.py +12 -10
- qanswer_sdk/models/report_copilot_task_update.py +14 -4
- qanswer_sdk/models/{report_copilot_template.py → report_template.py} +17 -7
- qanswer_sdk/models/{report_copilot_create_payload.py → report_template_create_payload.py} +4 -4
- qanswer_sdk/models/{report_copilot_template_simplified.py → report_template_simplified.py} +11 -7
- qanswer_sdk/models/{report_copilot_export_template_as_docx_payload_simplified.py → report_template_simplified_payload.py} +4 -4
- qanswer_sdk/models/{report_copilot_update_payload.py → report_template_update_payload.py} +15 -9
- qanswer_sdk/models/search_task_settings.py +12 -12
- qanswer_sdk/models/search_task_update.py +13 -3
- qanswer_sdk/models/{set_logo1_request.py → set_logo2_request.py} +4 -4
- qanswer_sdk/models/shared_organization_access.py +7 -3
- qanswer_sdk/models/shared_team_access.py +10 -4
- qanswer_sdk/models/slot.py +5 -1
- qanswer_sdk/models/slot_update.py +5 -1
- qanswer_sdk/models/socket_conversation_message.py +3 -11
- qanswer_sdk/models/socket_file_metadata.py +17 -11
- qanswer_sdk/models/source_metadata.py +109 -0
- qanswer_sdk/models/{tag_qa_list_payload.py → subscription_response.py} +22 -21
- qanswer_sdk/models/{team_with_count.py → team_admin.py} +8 -8
- qanswer_sdk/models/{team_filter.py → team_filter_dto.py} +16 -6
- qanswer_sdk/models/team_list_dto.py +101 -0
- qanswer_sdk/models/{available_endpoints_response.py → template_clip_structure_input.py} +14 -14
- qanswer_sdk/models/{available_embedding_models_response.py → template_clip_structure_output.py} +14 -14
- qanswer_sdk/models/test_imap_connection_payload.py +95 -0
- qanswer_sdk/models/text2_sparql_payload.py +4 -4
- qanswer_sdk/models/text2_sparql_task_settings.py +12 -10
- qanswer_sdk/models/text2_sparql_task_update.py +14 -4
- qanswer_sdk/models/{user_chatbot_setting_response.py → user_chatbot_setting.py} +24 -24
- qanswer_sdk/models/user_dataset.py +38 -2
- qanswer_sdk/models/{qa_metadata_payload.py → user_dataset_shared.py} +27 -37
- qanswer_sdk/models/{user_filter.py → user_filter_dto.py} +4 -4
- qanswer_sdk/models/{user_profile.py → user_profile_dto.py} +10 -10
- qanswer_sdk/models/user_profile_list_dto.py +3 -3
- qanswer_sdk/models/widget_configs.py +4 -2
- {qanswer_sdk-3.1213.0.dist-info → qanswer_sdk-3.1245.0.dist-info}/METADATA +2 -2
- {qanswer_sdk-3.1213.0.dist-info → qanswer_sdk-3.1245.0.dist-info}/RECORD +135 -112
- qanswer_sdk/api/llm_consumption_controller_api.py +0 -310
- qanswer_sdk/models/organization_filter.py +0 -87
- qanswer_sdk/models/page_organization.py +0 -123
- qanswer_sdk/models/page_team_with_count.py +0 -123
- qanswer_sdk/models/tag_qa_payload.py +0 -91
- {qanswer_sdk-3.1213.0.dist-info → qanswer_sdk-3.1245.0.dist-info}/WHEEL +0 -0
@@ -19,8 +19,7 @@ import json
|
|
19
19
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional, Union
|
22
|
-
from qanswer_sdk.models.
|
23
|
-
from qanswer_sdk.models.json_nullable_source_metadata import JsonNullableSourceMetadata
|
22
|
+
from qanswer_sdk.models.source_metadata import SourceMetadata
|
24
23
|
from typing import Optional, Set
|
25
24
|
from typing_extensions import Self
|
26
25
|
|
@@ -45,7 +44,7 @@ class SocketFileMetadata(BaseModel):
|
|
45
44
|
category: Optional[StrictStr] = None
|
46
45
|
comments: Optional[StrictStr] = None
|
47
46
|
keywords: Optional[StrictStr] = None
|
48
|
-
source_metadata: Optional[
|
47
|
+
source_metadata: Optional[SourceMetadata] = None
|
49
48
|
username: StrictStr = Field(description="Username of the dataset")
|
50
49
|
dataset: StrictStr = Field(description="Name of the dataset")
|
51
50
|
connector_id: StrictInt
|
@@ -53,7 +52,7 @@ class SocketFileMetadata(BaseModel):
|
|
53
52
|
connector_type: StrictStr
|
54
53
|
usage: Optional[StrictInt] = None
|
55
54
|
status: StrictStr
|
56
|
-
failure_reason: Optional[
|
55
|
+
failure_reason: Optional[StrictStr] = None
|
57
56
|
source: StrictStr
|
58
57
|
source_type: Optional[StrictStr] = None
|
59
58
|
weight: Optional[Union[StrictFloat, StrictInt]] = None
|
@@ -70,8 +69,18 @@ class SocketFileMetadata(BaseModel):
|
|
70
69
|
@field_validator('status')
|
71
70
|
def status_validate_enum(cls, value):
|
72
71
|
"""Validates the enum"""
|
73
|
-
if value not in set(['Submitted', 'Uploaded', 'Converted', 'Indexed', 'QuotaExceeded', 'Failed', 'MalwareDetected']):
|
74
|
-
raise ValueError("must be one of enum values ('Submitted', 'Uploaded', 'Converted', 'Indexed', 'QuotaExceeded', 'Failed', 'MalwareDetected')")
|
72
|
+
if value not in set(['Submitted', 'Uploaded', 'Converted', 'Indexed', 'QuotaExceeded', 'Failed', 'MalwareDetected', 'NeedsToBeUploaded']):
|
73
|
+
raise ValueError("must be one of enum values ('Submitted', 'Uploaded', 'Converted', 'Indexed', 'QuotaExceeded', 'Failed', 'MalwareDetected', 'NeedsToBeUploaded')")
|
74
|
+
return value
|
75
|
+
|
76
|
+
@field_validator('failure_reason')
|
77
|
+
def failure_reason_validate_enum(cls, value):
|
78
|
+
"""Validates the enum"""
|
79
|
+
if value is None:
|
80
|
+
return value
|
81
|
+
|
82
|
+
if value not in set(['format_not_supported', 'file_empty', 'pdf_conversion_failed', 'embedding_failed', 'indexing_failed', 'quota_exceeded', 'illegal_filename', 'malware_detected', 'duplicate_filename', 'unknown_error', 'website_not_reachable', 'remote_file_rejected', 'other']):
|
83
|
+
raise ValueError("must be one of enum values ('format_not_supported', 'file_empty', 'pdf_conversion_failed', 'embedding_failed', 'indexing_failed', 'quota_exceeded', 'illegal_filename', 'malware_detected', 'duplicate_filename', 'unknown_error', 'website_not_reachable', 'remote_file_rejected', 'other')")
|
75
84
|
return value
|
76
85
|
|
77
86
|
model_config = ConfigDict(
|
@@ -116,9 +125,6 @@ class SocketFileMetadata(BaseModel):
|
|
116
125
|
# override the default output from pydantic by calling `to_dict()` of source_metadata
|
117
126
|
if self.source_metadata:
|
118
127
|
_dict['source_metadata'] = self.source_metadata.to_dict()
|
119
|
-
# override the default output from pydantic by calling `to_dict()` of failure_reason
|
120
|
-
if self.failure_reason:
|
121
|
-
_dict['failure_reason'] = self.failure_reason.to_dict()
|
122
128
|
return _dict
|
123
129
|
|
124
130
|
@classmethod
|
@@ -148,7 +154,7 @@ class SocketFileMetadata(BaseModel):
|
|
148
154
|
"category": obj.get("category"),
|
149
155
|
"comments": obj.get("comments"),
|
150
156
|
"keywords": obj.get("keywords"),
|
151
|
-
"source_metadata":
|
157
|
+
"source_metadata": SourceMetadata.from_dict(obj["source_metadata"]) if obj.get("source_metadata") is not None else None,
|
152
158
|
"username": obj.get("username"),
|
153
159
|
"dataset": obj.get("dataset"),
|
154
160
|
"connector_id": obj.get("connector_id"),
|
@@ -156,7 +162,7 @@ class SocketFileMetadata(BaseModel):
|
|
156
162
|
"connector_type": obj.get("connector_type"),
|
157
163
|
"usage": obj.get("usage"),
|
158
164
|
"status": obj.get("status"),
|
159
|
-
"failure_reason":
|
165
|
+
"failure_reason": obj.get("failure_reason"),
|
160
166
|
"source": obj.get("source"),
|
161
167
|
"source_type": obj.get("source_type"),
|
162
168
|
"weight": obj.get("weight"),
|
@@ -0,0 +1,109 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
QAnswer: Api Documentation
|
5
|
+
|
6
|
+
APIs provided by QAnswer
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 1.0
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
+
|
11
|
+
Do not edit the class manually.
|
12
|
+
""" # noqa: E501
|
13
|
+
|
14
|
+
|
15
|
+
from __future__ import annotations
|
16
|
+
import pprint
|
17
|
+
import re # noqa: F401
|
18
|
+
import json
|
19
|
+
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
22
|
+
from typing import Optional, Set
|
23
|
+
from typing_extensions import Self
|
24
|
+
|
25
|
+
class SourceMetadata(BaseModel):
|
26
|
+
"""
|
27
|
+
SourceMetadata
|
28
|
+
""" # noqa: E501
|
29
|
+
created_date_time: Optional[StrictStr] = Field(default=None, alias="createdDateTime")
|
30
|
+
last_modified_date_time: Optional[StrictStr] = Field(default=None, alias="lastModifiedDateTime")
|
31
|
+
id: Optional[StrictStr] = None
|
32
|
+
name: Optional[StrictStr] = None
|
33
|
+
size: Optional[StrictInt] = None
|
34
|
+
web_url: Optional[StrictStr] = Field(default=None, alias="webUrl")
|
35
|
+
display_name: Optional[StrictStr] = Field(default=None, alias="displayName")
|
36
|
+
parent_reference: Optional[Dict[str, Any]] = Field(default=None, alias="parentReference")
|
37
|
+
site_id: Optional[StrictStr] = None
|
38
|
+
drive_id: Optional[StrictStr] = None
|
39
|
+
path: Optional[StrictStr] = None
|
40
|
+
file_type: Optional[StrictStr] = None
|
41
|
+
__properties: ClassVar[List[str]] = ["createdDateTime", "lastModifiedDateTime", "id", "name", "size", "webUrl", "displayName", "parentReference", "site_id", "drive_id", "path", "file_type"]
|
42
|
+
|
43
|
+
model_config = ConfigDict(
|
44
|
+
populate_by_name=True,
|
45
|
+
validate_assignment=True,
|
46
|
+
protected_namespaces=(),
|
47
|
+
)
|
48
|
+
|
49
|
+
|
50
|
+
def to_str(self) -> str:
|
51
|
+
"""Returns the string representation of the model using alias"""
|
52
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
53
|
+
|
54
|
+
def to_json(self) -> str:
|
55
|
+
"""Returns the JSON representation of the model using alias"""
|
56
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
57
|
+
return json.dumps(self.to_dict())
|
58
|
+
|
59
|
+
@classmethod
|
60
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
61
|
+
"""Create an instance of SourceMetadata from a JSON string"""
|
62
|
+
return cls.from_dict(json.loads(json_str))
|
63
|
+
|
64
|
+
def to_dict(self) -> Dict[str, Any]:
|
65
|
+
"""Return the dictionary representation of the model using alias.
|
66
|
+
|
67
|
+
This has the following differences from calling pydantic's
|
68
|
+
`self.model_dump(by_alias=True)`:
|
69
|
+
|
70
|
+
* `None` is only added to the output dict for nullable fields that
|
71
|
+
were set at model initialization. Other fields with value `None`
|
72
|
+
are ignored.
|
73
|
+
"""
|
74
|
+
excluded_fields: Set[str] = set([
|
75
|
+
])
|
76
|
+
|
77
|
+
_dict = self.model_dump(
|
78
|
+
by_alias=True,
|
79
|
+
exclude=excluded_fields,
|
80
|
+
exclude_none=True,
|
81
|
+
)
|
82
|
+
return _dict
|
83
|
+
|
84
|
+
@classmethod
|
85
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
86
|
+
"""Create an instance of SourceMetadata from a dict"""
|
87
|
+
if obj is None:
|
88
|
+
return None
|
89
|
+
|
90
|
+
if not isinstance(obj, dict):
|
91
|
+
return cls.model_validate(obj)
|
92
|
+
|
93
|
+
_obj = cls.model_validate({
|
94
|
+
"createdDateTime": obj.get("createdDateTime"),
|
95
|
+
"lastModifiedDateTime": obj.get("lastModifiedDateTime"),
|
96
|
+
"id": obj.get("id"),
|
97
|
+
"name": obj.get("name"),
|
98
|
+
"size": obj.get("size"),
|
99
|
+
"webUrl": obj.get("webUrl"),
|
100
|
+
"displayName": obj.get("displayName"),
|
101
|
+
"parentReference": obj.get("parentReference"),
|
102
|
+
"site_id": obj.get("site_id"),
|
103
|
+
"drive_id": obj.get("drive_id"),
|
104
|
+
"path": obj.get("path"),
|
105
|
+
"file_type": obj.get("file_type")
|
106
|
+
})
|
107
|
+
return _obj
|
108
|
+
|
109
|
+
|
@@ -17,18 +17,29 @@ import pprint
|
|
17
17
|
import re # noqa: F401
|
18
18
|
import json
|
19
19
|
|
20
|
-
from pydantic import BaseModel, ConfigDict, StrictBool
|
20
|
+
from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr, field_validator
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
22
22
|
from typing import Optional, Set
|
23
23
|
from typing_extensions import Self
|
24
24
|
|
25
|
-
class
|
25
|
+
class SubscriptionResponse(BaseModel):
|
26
26
|
"""
|
27
|
-
|
27
|
+
SubscriptionResponse
|
28
28
|
""" # noqa: E501
|
29
|
-
|
30
|
-
|
31
|
-
|
29
|
+
success: Optional[StrictBool] = None
|
30
|
+
status: Optional[StrictStr] = None
|
31
|
+
message: Optional[StrictStr] = None
|
32
|
+
__properties: ClassVar[List[str]] = ["success", "status", "message"]
|
33
|
+
|
34
|
+
@field_validator('status')
|
35
|
+
def status_validate_enum(cls, value):
|
36
|
+
"""Validates the enum"""
|
37
|
+
if value is None:
|
38
|
+
return value
|
39
|
+
|
40
|
+
if value not in set(['CREATED', 'UPDATED', 'CANCELLED', 'FAILED']):
|
41
|
+
raise ValueError("must be one of enum values ('CREATED', 'UPDATED', 'CANCELLED', 'FAILED')")
|
42
|
+
return value
|
32
43
|
|
33
44
|
model_config = ConfigDict(
|
34
45
|
populate_by_name=True,
|
@@ -48,7 +59,7 @@ class TagQAListPayload(BaseModel):
|
|
48
59
|
|
49
60
|
@classmethod
|
50
61
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
51
|
-
"""Create an instance of
|
62
|
+
"""Create an instance of SubscriptionResponse from a JSON string"""
|
52
63
|
return cls.from_dict(json.loads(json_str))
|
53
64
|
|
54
65
|
def to_dict(self) -> Dict[str, Any]:
|
@@ -60,10 +71,8 @@ class TagQAListPayload(BaseModel):
|
|
60
71
|
* `None` is only added to the output dict for nullable fields that
|
61
72
|
were set at model initialization. Other fields with value `None`
|
62
73
|
are ignored.
|
63
|
-
* Fields in `self.additional_properties` are added to the output dict.
|
64
74
|
"""
|
65
75
|
excluded_fields: Set[str] = set([
|
66
|
-
"additional_properties",
|
67
76
|
])
|
68
77
|
|
69
78
|
_dict = self.model_dump(
|
@@ -71,16 +80,11 @@ class TagQAListPayload(BaseModel):
|
|
71
80
|
exclude=excluded_fields,
|
72
81
|
exclude_none=True,
|
73
82
|
)
|
74
|
-
# puts key-value pairs in additional_properties in the top level
|
75
|
-
if self.additional_properties is not None:
|
76
|
-
for _key, _value in self.additional_properties.items():
|
77
|
-
_dict[_key] = _value
|
78
|
-
|
79
83
|
return _dict
|
80
84
|
|
81
85
|
@classmethod
|
82
86
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
83
|
-
"""Create an instance of
|
87
|
+
"""Create an instance of SubscriptionResponse from a dict"""
|
84
88
|
if obj is None:
|
85
89
|
return None
|
86
90
|
|
@@ -88,13 +92,10 @@ class TagQAListPayload(BaseModel):
|
|
88
92
|
return cls.model_validate(obj)
|
89
93
|
|
90
94
|
_obj = cls.model_validate({
|
91
|
-
"
|
95
|
+
"success": obj.get("success"),
|
96
|
+
"status": obj.get("status"),
|
97
|
+
"message": obj.get("message")
|
92
98
|
})
|
93
|
-
# store additional fields in additional_properties
|
94
|
-
for _key in obj.keys():
|
95
|
-
if _key not in cls.__properties:
|
96
|
-
_obj.additional_properties[_key] = obj.get(_key)
|
97
|
-
|
98
99
|
return _obj
|
99
100
|
|
100
101
|
|
@@ -17,21 +17,21 @@ import pprint
|
|
17
17
|
import re # noqa: F401
|
18
18
|
import json
|
19
19
|
|
20
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
22
22
|
from typing import Optional, Set
|
23
23
|
from typing_extensions import Self
|
24
24
|
|
25
|
-
class
|
25
|
+
class TeamAdmin(BaseModel):
|
26
26
|
"""
|
27
|
-
Represents a team within an organization
|
27
|
+
Represents a team within an organization and the role.
|
28
28
|
""" # noqa: E501
|
29
29
|
name: Optional[StrictStr] = Field(default=None, description="Team Name")
|
30
30
|
description: Optional[StrictStr] = Field(default=None, description="Brief explanation of the team's purpose.")
|
31
31
|
id: Optional[StrictInt] = Field(default=None, description="Unique identifier")
|
32
32
|
organization_id: Optional[StrictInt] = Field(default=None, description="Unique identifier of the organization", alias="organizationId")
|
33
|
-
|
34
|
-
__properties: ClassVar[List[str]] = ["name", "description", "id", "organizationId", "
|
33
|
+
admin: Optional[StrictBool] = Field(default=None, description="Indicates if the user is an admin or not")
|
34
|
+
__properties: ClassVar[List[str]] = ["name", "description", "id", "organizationId", "admin"]
|
35
35
|
|
36
36
|
model_config = ConfigDict(
|
37
37
|
populate_by_name=True,
|
@@ -51,7 +51,7 @@ class TeamWithCount(BaseModel):
|
|
51
51
|
|
52
52
|
@classmethod
|
53
53
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
54
|
-
"""Create an instance of
|
54
|
+
"""Create an instance of TeamAdmin from a JSON string"""
|
55
55
|
return cls.from_dict(json.loads(json_str))
|
56
56
|
|
57
57
|
def to_dict(self) -> Dict[str, Any]:
|
@@ -76,7 +76,7 @@ class TeamWithCount(BaseModel):
|
|
76
76
|
|
77
77
|
@classmethod
|
78
78
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
79
|
-
"""Create an instance of
|
79
|
+
"""Create an instance of TeamAdmin from a dict"""
|
80
80
|
if obj is None:
|
81
81
|
return None
|
82
82
|
|
@@ -88,7 +88,7 @@ class TeamWithCount(BaseModel):
|
|
88
88
|
"description": obj.get("description"),
|
89
89
|
"id": obj.get("id"),
|
90
90
|
"organizationId": obj.get("organizationId"),
|
91
|
-
"
|
91
|
+
"admin": obj.get("admin")
|
92
92
|
})
|
93
93
|
return _obj
|
94
94
|
|
@@ -22,14 +22,19 @@ from typing import Any, ClassVar, Dict, List, Optional
|
|
22
22
|
from typing import Optional, Set
|
23
23
|
from typing_extensions import Self
|
24
24
|
|
25
|
-
class
|
25
|
+
class TeamFilterDto(BaseModel):
|
26
26
|
"""
|
27
|
-
|
27
|
+
TeamFilterDto
|
28
28
|
""" # noqa: E501
|
29
29
|
search: Optional[StrictStr] = Field(default='The QA Company', description="Search to filter over the team name")
|
30
30
|
organization_id: Optional[StrictInt] = Field(default=None, description="Search to filter over the organizationId", alias="organizationId")
|
31
31
|
team_id: Optional[StrictInt] = Field(default=None, description="Search to filter over the organizationId", alias="teamId")
|
32
|
-
|
32
|
+
user_id: Optional[StrictInt] = Field(default=None, description="The user id to filter over the teams the user is a member of", alias="userId")
|
33
|
+
page: Optional[StrictInt] = None
|
34
|
+
size: Optional[StrictInt] = None
|
35
|
+
sort_by: Optional[StrictStr] = Field(default=None, alias="sortBy")
|
36
|
+
sort_dir: Optional[StrictStr] = Field(default=None, alias="sortDir")
|
37
|
+
__properties: ClassVar[List[str]] = ["search", "organizationId", "teamId", "userId", "page", "size", "sortBy", "sortDir"]
|
33
38
|
|
34
39
|
model_config = ConfigDict(
|
35
40
|
populate_by_name=True,
|
@@ -49,7 +54,7 @@ class TeamFilter(BaseModel):
|
|
49
54
|
|
50
55
|
@classmethod
|
51
56
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
52
|
-
"""Create an instance of
|
57
|
+
"""Create an instance of TeamFilterDto from a JSON string"""
|
53
58
|
return cls.from_dict(json.loads(json_str))
|
54
59
|
|
55
60
|
def to_dict(self) -> Dict[str, Any]:
|
@@ -74,7 +79,7 @@ class TeamFilter(BaseModel):
|
|
74
79
|
|
75
80
|
@classmethod
|
76
81
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
77
|
-
"""Create an instance of
|
82
|
+
"""Create an instance of TeamFilterDto from a dict"""
|
78
83
|
if obj is None:
|
79
84
|
return None
|
80
85
|
|
@@ -84,7 +89,12 @@ class TeamFilter(BaseModel):
|
|
84
89
|
_obj = cls.model_validate({
|
85
90
|
"search": obj.get("search") if obj.get("search") is not None else 'The QA Company',
|
86
91
|
"organizationId": obj.get("organizationId"),
|
87
|
-
"teamId": obj.get("teamId")
|
92
|
+
"teamId": obj.get("teamId"),
|
93
|
+
"userId": obj.get("userId"),
|
94
|
+
"page": obj.get("page"),
|
95
|
+
"size": obj.get("size"),
|
96
|
+
"sortBy": obj.get("sortBy"),
|
97
|
+
"sortDir": obj.get("sortDir")
|
88
98
|
})
|
89
99
|
return _obj
|
90
100
|
|
@@ -0,0 +1,101 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
QAnswer: Api Documentation
|
5
|
+
|
6
|
+
APIs provided by QAnswer
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 1.0
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
+
|
11
|
+
Do not edit the class manually.
|
12
|
+
""" # noqa: E501
|
13
|
+
|
14
|
+
|
15
|
+
from __future__ import annotations
|
16
|
+
import pprint
|
17
|
+
import re # noqa: F401
|
18
|
+
import json
|
19
|
+
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
22
|
+
from qanswer_sdk.models.team import Team
|
23
|
+
from typing import Optional, Set
|
24
|
+
from typing_extensions import Self
|
25
|
+
|
26
|
+
class TeamListDto(BaseModel):
|
27
|
+
"""
|
28
|
+
TeamListDto
|
29
|
+
""" # noqa: E501
|
30
|
+
teams: Optional[List[Team]] = None
|
31
|
+
page: Optional[StrictInt] = None
|
32
|
+
page_size: Optional[StrictInt] = Field(default=None, alias="pageSize")
|
33
|
+
total: Optional[StrictInt] = None
|
34
|
+
__properties: ClassVar[List[str]] = ["teams", "page", "pageSize", "total"]
|
35
|
+
|
36
|
+
model_config = ConfigDict(
|
37
|
+
populate_by_name=True,
|
38
|
+
validate_assignment=True,
|
39
|
+
protected_namespaces=(),
|
40
|
+
)
|
41
|
+
|
42
|
+
|
43
|
+
def to_str(self) -> str:
|
44
|
+
"""Returns the string representation of the model using alias"""
|
45
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
46
|
+
|
47
|
+
def to_json(self) -> str:
|
48
|
+
"""Returns the JSON representation of the model using alias"""
|
49
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
50
|
+
return json.dumps(self.to_dict())
|
51
|
+
|
52
|
+
@classmethod
|
53
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
54
|
+
"""Create an instance of TeamListDto from a JSON string"""
|
55
|
+
return cls.from_dict(json.loads(json_str))
|
56
|
+
|
57
|
+
def to_dict(self) -> Dict[str, Any]:
|
58
|
+
"""Return the dictionary representation of the model using alias.
|
59
|
+
|
60
|
+
This has the following differences from calling pydantic's
|
61
|
+
`self.model_dump(by_alias=True)`:
|
62
|
+
|
63
|
+
* `None` is only added to the output dict for nullable fields that
|
64
|
+
were set at model initialization. Other fields with value `None`
|
65
|
+
are ignored.
|
66
|
+
"""
|
67
|
+
excluded_fields: Set[str] = set([
|
68
|
+
])
|
69
|
+
|
70
|
+
_dict = self.model_dump(
|
71
|
+
by_alias=True,
|
72
|
+
exclude=excluded_fields,
|
73
|
+
exclude_none=True,
|
74
|
+
)
|
75
|
+
# override the default output from pydantic by calling `to_dict()` of each item in teams (list)
|
76
|
+
_items = []
|
77
|
+
if self.teams:
|
78
|
+
for _item_teams in self.teams:
|
79
|
+
if _item_teams:
|
80
|
+
_items.append(_item_teams.to_dict())
|
81
|
+
_dict['teams'] = _items
|
82
|
+
return _dict
|
83
|
+
|
84
|
+
@classmethod
|
85
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
86
|
+
"""Create an instance of TeamListDto from a dict"""
|
87
|
+
if obj is None:
|
88
|
+
return None
|
89
|
+
|
90
|
+
if not isinstance(obj, dict):
|
91
|
+
return cls.model_validate(obj)
|
92
|
+
|
93
|
+
_obj = cls.model_validate({
|
94
|
+
"teams": [Team.from_dict(_item) for _item in obj["teams"]] if obj.get("teams") is not None else None,
|
95
|
+
"page": obj.get("page"),
|
96
|
+
"pageSize": obj.get("pageSize"),
|
97
|
+
"total": obj.get("total")
|
98
|
+
})
|
99
|
+
return _obj
|
100
|
+
|
101
|
+
|
@@ -19,16 +19,16 @@ import json
|
|
19
19
|
|
20
20
|
from pydantic import BaseModel, ConfigDict
|
21
21
|
from typing import Any, ClassVar, Dict, List
|
22
|
-
from qanswer_sdk.models.
|
22
|
+
from qanswer_sdk.models.clip_connector_structure import ClipConnectorStructure
|
23
23
|
from typing import Optional, Set
|
24
24
|
from typing_extensions import Self
|
25
25
|
|
26
|
-
class
|
26
|
+
class TemplateClipStructureInput(BaseModel):
|
27
27
|
"""
|
28
|
-
|
28
|
+
TemplateClipStructureInput
|
29
29
|
""" # noqa: E501
|
30
|
-
|
31
|
-
__properties: ClassVar[List[str]] = ["
|
30
|
+
connectors: List[ClipConnectorStructure]
|
31
|
+
__properties: ClassVar[List[str]] = ["connectors"]
|
32
32
|
|
33
33
|
model_config = ConfigDict(
|
34
34
|
populate_by_name=True,
|
@@ -48,7 +48,7 @@ class AvailableEndpointsResponse(BaseModel):
|
|
48
48
|
|
49
49
|
@classmethod
|
50
50
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
51
|
-
"""Create an instance of
|
51
|
+
"""Create an instance of TemplateClipStructureInput from a JSON string"""
|
52
52
|
return cls.from_dict(json.loads(json_str))
|
53
53
|
|
54
54
|
def to_dict(self) -> Dict[str, Any]:
|
@@ -69,18 +69,18 @@ class AvailableEndpointsResponse(BaseModel):
|
|
69
69
|
exclude=excluded_fields,
|
70
70
|
exclude_none=True,
|
71
71
|
)
|
72
|
-
# override the default output from pydantic by calling `to_dict()` of each item in
|
72
|
+
# override the default output from pydantic by calling `to_dict()` of each item in connectors (list)
|
73
73
|
_items = []
|
74
|
-
if self.
|
75
|
-
for
|
76
|
-
if
|
77
|
-
_items.append(
|
78
|
-
_dict['
|
74
|
+
if self.connectors:
|
75
|
+
for _item_connectors in self.connectors:
|
76
|
+
if _item_connectors:
|
77
|
+
_items.append(_item_connectors.to_dict())
|
78
|
+
_dict['connectors'] = _items
|
79
79
|
return _dict
|
80
80
|
|
81
81
|
@classmethod
|
82
82
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
83
|
-
"""Create an instance of
|
83
|
+
"""Create an instance of TemplateClipStructureInput from a dict"""
|
84
84
|
if obj is None:
|
85
85
|
return None
|
86
86
|
|
@@ -88,7 +88,7 @@ class AvailableEndpointsResponse(BaseModel):
|
|
88
88
|
return cls.model_validate(obj)
|
89
89
|
|
90
90
|
_obj = cls.model_validate({
|
91
|
-
"
|
91
|
+
"connectors": [ClipConnectorStructure.from_dict(_item) for _item in obj["connectors"]] if obj.get("connectors") is not None else None
|
92
92
|
})
|
93
93
|
return _obj
|
94
94
|
|
qanswer_sdk/models/{available_embedding_models_response.py → template_clip_structure_output.py}
RENAMED
@@ -19,16 +19,16 @@ import json
|
|
19
19
|
|
20
20
|
from pydantic import BaseModel, ConfigDict
|
21
21
|
from typing import Any, ClassVar, Dict, List
|
22
|
-
from qanswer_sdk.models.
|
22
|
+
from qanswer_sdk.models.clip_connector_structure import ClipConnectorStructure
|
23
23
|
from typing import Optional, Set
|
24
24
|
from typing_extensions import Self
|
25
25
|
|
26
|
-
class
|
26
|
+
class TemplateClipStructureOutput(BaseModel):
|
27
27
|
"""
|
28
|
-
|
28
|
+
TemplateClipStructureOutput
|
29
29
|
""" # noqa: E501
|
30
|
-
|
31
|
-
__properties: ClassVar[List[str]] = ["
|
30
|
+
connectors: List[ClipConnectorStructure]
|
31
|
+
__properties: ClassVar[List[str]] = ["connectors"]
|
32
32
|
|
33
33
|
model_config = ConfigDict(
|
34
34
|
populate_by_name=True,
|
@@ -48,7 +48,7 @@ class AvailableEmbeddingModelsResponse(BaseModel):
|
|
48
48
|
|
49
49
|
@classmethod
|
50
50
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
51
|
-
"""Create an instance of
|
51
|
+
"""Create an instance of TemplateClipStructureOutput from a JSON string"""
|
52
52
|
return cls.from_dict(json.loads(json_str))
|
53
53
|
|
54
54
|
def to_dict(self) -> Dict[str, Any]:
|
@@ -69,18 +69,18 @@ class AvailableEmbeddingModelsResponse(BaseModel):
|
|
69
69
|
exclude=excluded_fields,
|
70
70
|
exclude_none=True,
|
71
71
|
)
|
72
|
-
# override the default output from pydantic by calling `to_dict()` of each item in
|
72
|
+
# override the default output from pydantic by calling `to_dict()` of each item in connectors (list)
|
73
73
|
_items = []
|
74
|
-
if self.
|
75
|
-
for
|
76
|
-
if
|
77
|
-
_items.append(
|
78
|
-
_dict['
|
74
|
+
if self.connectors:
|
75
|
+
for _item_connectors in self.connectors:
|
76
|
+
if _item_connectors:
|
77
|
+
_items.append(_item_connectors.to_dict())
|
78
|
+
_dict['connectors'] = _items
|
79
79
|
return _dict
|
80
80
|
|
81
81
|
@classmethod
|
82
82
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
83
|
-
"""Create an instance of
|
83
|
+
"""Create an instance of TemplateClipStructureOutput from a dict"""
|
84
84
|
if obj is None:
|
85
85
|
return None
|
86
86
|
|
@@ -88,7 +88,7 @@ class AvailableEmbeddingModelsResponse(BaseModel):
|
|
88
88
|
return cls.model_validate(obj)
|
89
89
|
|
90
90
|
_obj = cls.model_validate({
|
91
|
-
"
|
91
|
+
"connectors": [ClipConnectorStructure.from_dict(_item) for _item in obj["connectors"]] if obj.get("connectors") is not None else None
|
92
92
|
})
|
93
93
|
return _obj
|
94
94
|
|