qanswer_sdk 3.1212.0__py3-none-any.whl → 3.1244.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.1212.0.dist-info → qanswer_sdk-3.1244.0.dist-info}/METADATA +2 -2
- {qanswer_sdk-3.1212.0.dist-info → qanswer_sdk-3.1244.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.1212.0.dist-info → qanswer_sdk-3.1244.0.dist-info}/WHEEL +0 -0
@@ -22,9 +22,9 @@ from typing import Any, ClassVar, Dict, List, Optional, Union
|
|
22
22
|
from typing import Optional, Set
|
23
23
|
from typing_extensions import Self
|
24
24
|
|
25
|
-
class
|
25
|
+
class CostSummaryDto(BaseModel):
|
26
26
|
"""
|
27
|
-
|
27
|
+
CostSummaryDto
|
28
28
|
""" # noqa: E501
|
29
29
|
total_calls: Optional[StrictInt] = Field(default=None, alias="totalCalls")
|
30
30
|
total_input: Optional[StrictInt] = Field(default=None, alias="totalInput")
|
@@ -53,7 +53,7 @@ class CostSummary(BaseModel):
|
|
53
53
|
|
54
54
|
@classmethod
|
55
55
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
56
|
-
"""Create an instance of
|
56
|
+
"""Create an instance of CostSummaryDto from a JSON string"""
|
57
57
|
return cls.from_dict(json.loads(json_str))
|
58
58
|
|
59
59
|
def to_dict(self) -> Dict[str, Any]:
|
@@ -78,7 +78,7 @@ class CostSummary(BaseModel):
|
|
78
78
|
|
79
79
|
@classmethod
|
80
80
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
81
|
-
"""Create an instance of
|
81
|
+
"""Create an instance of CostSummaryDto from a dict"""
|
82
82
|
if obj is None:
|
83
83
|
return None
|
84
84
|
|
@@ -30,7 +30,8 @@ class CreateConnectorRequest(BaseModel):
|
|
30
30
|
dataset: StrictStr
|
31
31
|
connector_name: Optional[StrictStr] = Field(default=None, description="Connector name")
|
32
32
|
conversation_id: Optional[StrictStr] = Field(default=None, description="Conversation ID for the connector creation")
|
33
|
-
|
33
|
+
username_origin: Optional[StrictStr] = Field(default=None, description="Origin of the connector creation")
|
34
|
+
__properties: ClassVar[List[str]] = ["username", "dataset", "connector_name", "conversation_id", "username_origin"]
|
34
35
|
|
35
36
|
model_config = ConfigDict(
|
36
37
|
populate_by_name=True,
|
@@ -86,7 +87,8 @@ class CreateConnectorRequest(BaseModel):
|
|
86
87
|
"username": obj.get("username"),
|
87
88
|
"dataset": obj.get("dataset"),
|
88
89
|
"connector_name": obj.get("connector_name"),
|
89
|
-
"conversation_id": obj.get("conversation_id")
|
90
|
+
"conversation_id": obj.get("conversation_id"),
|
91
|
+
"username_origin": obj.get("username_origin")
|
90
92
|
})
|
91
93
|
return _obj
|
92
94
|
|
@@ -0,0 +1,105 @@
|
|
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, StrictBool, 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 CreateImapConnectorRequest(BaseModel):
|
26
|
+
"""
|
27
|
+
CreateImapConnectorRequest
|
28
|
+
""" # noqa: E501
|
29
|
+
username: StrictStr
|
30
|
+
dataset: StrictStr
|
31
|
+
connector_name: Optional[StrictStr] = Field(default=None, description="Connector name")
|
32
|
+
conversation_id: Optional[StrictStr] = Field(default=None, description="Conversation ID for the connector creation")
|
33
|
+
username_origin: Optional[StrictStr] = Field(default=None, description="Origin of the connector creation")
|
34
|
+
email: StrictStr = Field(description="Email address for IMAP connector")
|
35
|
+
password: StrictStr = Field(description="Password for IMAP connector")
|
36
|
+
imap_server: StrictStr = Field(description="IMAP server address")
|
37
|
+
imap_port: StrictInt = Field(description="IMAP server port")
|
38
|
+
use_ssl: Optional[StrictBool] = Field(default=None, description="Use SSL for IMAP connection")
|
39
|
+
__properties: ClassVar[List[str]] = ["username", "dataset", "connector_name", "conversation_id", "username_origin", "email", "password", "imap_server", "imap_port", "use_ssl"]
|
40
|
+
|
41
|
+
model_config = ConfigDict(
|
42
|
+
populate_by_name=True,
|
43
|
+
validate_assignment=True,
|
44
|
+
protected_namespaces=(),
|
45
|
+
)
|
46
|
+
|
47
|
+
|
48
|
+
def to_str(self) -> str:
|
49
|
+
"""Returns the string representation of the model using alias"""
|
50
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
51
|
+
|
52
|
+
def to_json(self) -> str:
|
53
|
+
"""Returns the JSON representation of the model using alias"""
|
54
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
55
|
+
return json.dumps(self.to_dict())
|
56
|
+
|
57
|
+
@classmethod
|
58
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
59
|
+
"""Create an instance of CreateImapConnectorRequest from a JSON string"""
|
60
|
+
return cls.from_dict(json.loads(json_str))
|
61
|
+
|
62
|
+
def to_dict(self) -> Dict[str, Any]:
|
63
|
+
"""Return the dictionary representation of the model using alias.
|
64
|
+
|
65
|
+
This has the following differences from calling pydantic's
|
66
|
+
`self.model_dump(by_alias=True)`:
|
67
|
+
|
68
|
+
* `None` is only added to the output dict for nullable fields that
|
69
|
+
were set at model initialization. Other fields with value `None`
|
70
|
+
are ignored.
|
71
|
+
"""
|
72
|
+
excluded_fields: Set[str] = set([
|
73
|
+
])
|
74
|
+
|
75
|
+
_dict = self.model_dump(
|
76
|
+
by_alias=True,
|
77
|
+
exclude=excluded_fields,
|
78
|
+
exclude_none=True,
|
79
|
+
)
|
80
|
+
return _dict
|
81
|
+
|
82
|
+
@classmethod
|
83
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
84
|
+
"""Create an instance of CreateImapConnectorRequest from a dict"""
|
85
|
+
if obj is None:
|
86
|
+
return None
|
87
|
+
|
88
|
+
if not isinstance(obj, dict):
|
89
|
+
return cls.model_validate(obj)
|
90
|
+
|
91
|
+
_obj = cls.model_validate({
|
92
|
+
"username": obj.get("username"),
|
93
|
+
"dataset": obj.get("dataset"),
|
94
|
+
"connector_name": obj.get("connector_name"),
|
95
|
+
"conversation_id": obj.get("conversation_id"),
|
96
|
+
"username_origin": obj.get("username_origin"),
|
97
|
+
"email": obj.get("email"),
|
98
|
+
"password": obj.get("password"),
|
99
|
+
"imap_server": obj.get("imap_server"),
|
100
|
+
"imap_port": obj.get("imap_port"),
|
101
|
+
"use_ssl": obj.get("use_ssl")
|
102
|
+
})
|
103
|
+
return _obj
|
104
|
+
|
105
|
+
|
@@ -30,8 +30,9 @@ class CreatePineconeConnectorRequest(BaseModel):
|
|
30
30
|
dataset: StrictStr
|
31
31
|
connector_name: Optional[StrictStr] = Field(default=None, description="Connector name")
|
32
32
|
conversation_id: Optional[StrictStr] = Field(default=None, description="Conversation ID for the connector creation")
|
33
|
+
username_origin: Optional[StrictStr] = Field(default=None, description="Origin of the connector creation")
|
33
34
|
embedding_model: Optional[StrictStr] = Field(default=None, description="Embedding model")
|
34
|
-
__properties: ClassVar[List[str]] = ["username", "dataset", "connector_name", "conversation_id", "embedding_model"]
|
35
|
+
__properties: ClassVar[List[str]] = ["username", "dataset", "connector_name", "conversation_id", "username_origin", "embedding_model"]
|
35
36
|
|
36
37
|
model_config = ConfigDict(
|
37
38
|
populate_by_name=True,
|
@@ -88,6 +89,7 @@ class CreatePineconeConnectorRequest(BaseModel):
|
|
88
89
|
"dataset": obj.get("dataset"),
|
89
90
|
"connector_name": obj.get("connector_name"),
|
90
91
|
"conversation_id": obj.get("conversation_id"),
|
92
|
+
"username_origin": obj.get("username_origin"),
|
91
93
|
"embedding_model": obj.get("embedding_model")
|
92
94
|
})
|
93
95
|
return _obj
|
@@ -30,12 +30,13 @@ class CreateSharepointConnectorFromCertificateRequest(BaseModel):
|
|
30
30
|
dataset: StrictStr
|
31
31
|
connector_name: Optional[StrictStr] = Field(default=None, description="Connector name")
|
32
32
|
conversation_id: Optional[StrictStr] = Field(default=None, description="Conversation ID for the connector creation")
|
33
|
+
username_origin: Optional[StrictStr] = Field(default=None, description="Origin of the connector creation")
|
33
34
|
tenant_id: Optional[StrictStr] = Field(default=None, description="Tenant ID")
|
34
35
|
client_id: Optional[StrictStr] = Field(default=None, description="Client ID")
|
35
36
|
thumbprint: Optional[StrictStr] = Field(default=None, description="Thumbprint")
|
36
37
|
certificate_password: Optional[StrictStr] = Field(default=None, description="Certificate Password")
|
37
38
|
site_ids: Optional[List[Dict[str, Any]]] = Field(default=None, description="Site IDs Supported")
|
38
|
-
__properties: ClassVar[List[str]] = ["username", "dataset", "connector_name", "conversation_id", "tenant_id", "client_id", "thumbprint", "certificate_password", "site_ids"]
|
39
|
+
__properties: ClassVar[List[str]] = ["username", "dataset", "connector_name", "conversation_id", "username_origin", "tenant_id", "client_id", "thumbprint", "certificate_password", "site_ids"]
|
39
40
|
|
40
41
|
model_config = ConfigDict(
|
41
42
|
populate_by_name=True,
|
@@ -92,6 +93,7 @@ class CreateSharepointConnectorFromCertificateRequest(BaseModel):
|
|
92
93
|
"dataset": obj.get("dataset"),
|
93
94
|
"connector_name": obj.get("connector_name"),
|
94
95
|
"conversation_id": obj.get("conversation_id"),
|
96
|
+
"username_origin": obj.get("username_origin"),
|
95
97
|
"tenant_id": obj.get("tenant_id"),
|
96
98
|
"client_id": obj.get("client_id"),
|
97
99
|
"thumbprint": obj.get("thumbprint"),
|
@@ -30,11 +30,12 @@ class CreateSharepointConnectorRequest(BaseModel):
|
|
30
30
|
dataset: StrictStr
|
31
31
|
connector_name: Optional[StrictStr] = Field(default=None, description="Connector name")
|
32
32
|
conversation_id: Optional[StrictStr] = Field(default=None, description="Conversation ID for the connector creation")
|
33
|
+
username_origin: Optional[StrictStr] = Field(default=None, description="Origin of the connector creation")
|
33
34
|
client_id: Optional[StrictStr] = Field(default=None, description="Client ID")
|
34
35
|
client_secret: Optional[StrictStr] = Field(default=None, description="Client Secret")
|
35
36
|
tenant_id: Optional[StrictStr] = Field(default=None, description="Tenant ID")
|
36
37
|
site_ids: Optional[List[Dict[str, Any]]] = Field(default=None, description="Site IDs Supported")
|
37
|
-
__properties: ClassVar[List[str]] = ["username", "dataset", "connector_name", "conversation_id", "client_id", "client_secret", "tenant_id", "site_ids"]
|
38
|
+
__properties: ClassVar[List[str]] = ["username", "dataset", "connector_name", "conversation_id", "username_origin", "client_id", "client_secret", "tenant_id", "site_ids"]
|
38
39
|
|
39
40
|
model_config = ConfigDict(
|
40
41
|
populate_by_name=True,
|
@@ -91,6 +92,7 @@ class CreateSharepointConnectorRequest(BaseModel):
|
|
91
92
|
"dataset": obj.get("dataset"),
|
92
93
|
"connector_name": obj.get("connector_name"),
|
93
94
|
"conversation_id": obj.get("conversation_id"),
|
95
|
+
"username_origin": obj.get("username_origin"),
|
94
96
|
"client_id": obj.get("client_id"),
|
95
97
|
"client_secret": obj.get("client_secret"),
|
96
98
|
"tenant_id": obj.get("tenant_id"),
|
@@ -21,10 +21,13 @@ from datetime import datetime
|
|
21
21
|
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator
|
22
22
|
from typing import Any, ClassVar, Dict, List, Optional
|
23
23
|
from qanswer_sdk.models.dataset_config_request import DatasetConfigRequest
|
24
|
+
from qanswer_sdk.models.entity_description import EntityDescription
|
25
|
+
from qanswer_sdk.models.llm_consumption import LlmConsumption
|
24
26
|
from qanswer_sdk.models.logo import Logo
|
25
27
|
from qanswer_sdk.models.shared_organization_access import SharedOrganizationAccess
|
26
28
|
from qanswer_sdk.models.shared_team_access import SharedTeamAccess
|
27
29
|
from qanswer_sdk.models.user import User
|
30
|
+
from qanswer_sdk.models.user_dataset_shared import UserDatasetShared
|
28
31
|
from typing import Optional, Set
|
29
32
|
from typing_extensions import Self
|
30
33
|
|
@@ -45,11 +48,14 @@ class DatasetDetailKg(BaseModel):
|
|
45
48
|
created: Optional[datetime] = None
|
46
49
|
index_type: Optional[StrictStr] = Field(default=None, alias="indexType")
|
47
50
|
languages: Optional[List[StrictStr]] = None
|
51
|
+
shared_users: Optional[List[UserDatasetShared]] = Field(default=None, alias="sharedUsers")
|
48
52
|
shared_teams: Optional[List[SharedTeamAccess]] = Field(default=None, alias="sharedTeams")
|
49
53
|
shared_organizations: Optional[List[SharedOrganizationAccess]] = Field(default=None, alias="sharedOrganizations")
|
54
|
+
entity_description: Optional[EntityDescription] = Field(default=None, alias="entityDescription")
|
50
55
|
logo: Optional[Logo] = None
|
56
|
+
llm_consumptions: Optional[List[LlmConsumption]] = Field(default=None, alias="llmConsumptions")
|
51
57
|
config: Optional[DatasetConfigRequest] = None
|
52
|
-
__properties: ClassVar[List[str]] = ["id", "dataset", "name", "description", "user", "uploaded", "indexed", "access", "accessType", "size", "created", "indexType", "languages", "sharedTeams", "sharedOrganizations", "logo", "config"]
|
58
|
+
__properties: ClassVar[List[str]] = ["id", "dataset", "name", "description", "user", "uploaded", "indexed", "access", "accessType", "size", "created", "indexType", "languages", "sharedUsers", "sharedTeams", "sharedOrganizations", "entityDescription", "logo", "llmConsumptions", "config"]
|
53
59
|
|
54
60
|
@field_validator('access_type')
|
55
61
|
def access_type_validate_enum(cls, value):
|
@@ -103,6 +109,13 @@ class DatasetDetailKg(BaseModel):
|
|
103
109
|
# override the default output from pydantic by calling `to_dict()` of user
|
104
110
|
if self.user:
|
105
111
|
_dict['user'] = self.user.to_dict()
|
112
|
+
# override the default output from pydantic by calling `to_dict()` of each item in shared_users (list)
|
113
|
+
_items = []
|
114
|
+
if self.shared_users:
|
115
|
+
for _item_shared_users in self.shared_users:
|
116
|
+
if _item_shared_users:
|
117
|
+
_items.append(_item_shared_users.to_dict())
|
118
|
+
_dict['sharedUsers'] = _items
|
106
119
|
# override the default output from pydantic by calling `to_dict()` of each item in shared_teams (list)
|
107
120
|
_items = []
|
108
121
|
if self.shared_teams:
|
@@ -117,9 +130,19 @@ class DatasetDetailKg(BaseModel):
|
|
117
130
|
if _item_shared_organizations:
|
118
131
|
_items.append(_item_shared_organizations.to_dict())
|
119
132
|
_dict['sharedOrganizations'] = _items
|
133
|
+
# override the default output from pydantic by calling `to_dict()` of entity_description
|
134
|
+
if self.entity_description:
|
135
|
+
_dict['entityDescription'] = self.entity_description.to_dict()
|
120
136
|
# override the default output from pydantic by calling `to_dict()` of logo
|
121
137
|
if self.logo:
|
122
138
|
_dict['logo'] = self.logo.to_dict()
|
139
|
+
# override the default output from pydantic by calling `to_dict()` of each item in llm_consumptions (list)
|
140
|
+
_items = []
|
141
|
+
if self.llm_consumptions:
|
142
|
+
for _item_llm_consumptions in self.llm_consumptions:
|
143
|
+
if _item_llm_consumptions:
|
144
|
+
_items.append(_item_llm_consumptions.to_dict())
|
145
|
+
_dict['llmConsumptions'] = _items
|
123
146
|
# override the default output from pydantic by calling `to_dict()` of config
|
124
147
|
if self.config:
|
125
148
|
_dict['config'] = self.config.to_dict()
|
@@ -148,9 +171,12 @@ class DatasetDetailKg(BaseModel):
|
|
148
171
|
"created": obj.get("created"),
|
149
172
|
"indexType": obj.get("indexType"),
|
150
173
|
"languages": obj.get("languages"),
|
174
|
+
"sharedUsers": [UserDatasetShared.from_dict(_item) for _item in obj["sharedUsers"]] if obj.get("sharedUsers") is not None else None,
|
151
175
|
"sharedTeams": [SharedTeamAccess.from_dict(_item) for _item in obj["sharedTeams"]] if obj.get("sharedTeams") is not None else None,
|
152
176
|
"sharedOrganizations": [SharedOrganizationAccess.from_dict(_item) for _item in obj["sharedOrganizations"]] if obj.get("sharedOrganizations") is not None else None,
|
177
|
+
"entityDescription": EntityDescription.from_dict(obj["entityDescription"]) if obj.get("entityDescription") is not None else None,
|
153
178
|
"logo": Logo.from_dict(obj["logo"]) if obj.get("logo") is not None else None,
|
179
|
+
"llmConsumptions": [LlmConsumption.from_dict(_item) for _item in obj["llmConsumptions"]] if obj.get("llmConsumptions") is not None else None,
|
154
180
|
"config": DatasetConfigRequest.from_dict(obj["config"]) if obj.get("config") is not None else None
|
155
181
|
})
|
156
182
|
return _obj
|
@@ -71,7 +71,8 @@ class DatasetSchema(BaseModel):
|
|
71
71
|
dataset_type: Optional[StrictStr] = None
|
72
72
|
widget_configs: WidgetConfigs
|
73
73
|
n_tokens: Optional[StrictInt] = None
|
74
|
-
|
74
|
+
embedding_model_id: Optional[StrictInt] = None
|
75
|
+
__properties: ClassVar[List[str]] = ["id", "dataset", "username", "index_hash", "do_ocr", "language", "is_updating", "use_reader", "use_ranker", "use_fallback", "top_k_retriever", "top_k_reader", "top_k_ranker", "return_no_ans", "no_ans_boost", "max_seq_len", "doc_stride", "max_ans_len", "weight_title", "weight_text", "split_by", "split_len", "split_overlap", "llm_choice", "bot_name", "bot_description", "bot_mode", "bot_knowledge", "bot_answer_length", "bot_seed", "bot_temperature", "prompt", "number_of_references", "stream_speed", "initial_message", "track_geo", "creation_date", "use_training", "embedding_model", "data_storage_preference", "logs_visibility_policy", "dataset_type", "widget_configs", "n_tokens", "embedding_model_id"]
|
75
76
|
|
76
77
|
@field_validator('data_storage_preference')
|
77
78
|
def data_storage_preference_validate_enum(cls, value):
|
@@ -200,7 +201,8 @@ class DatasetSchema(BaseModel):
|
|
200
201
|
"logs_visibility_policy": obj.get("logs_visibility_policy"),
|
201
202
|
"dataset_type": obj.get("dataset_type"),
|
202
203
|
"widget_configs": WidgetConfigs.from_dict(obj["widget_configs"]) if obj.get("widget_configs") is not None else None,
|
203
|
-
"n_tokens": obj.get("n_tokens")
|
204
|
+
"n_tokens": obj.get("n_tokens"),
|
205
|
+
"embedding_model_id": obj.get("embedding_model_id")
|
204
206
|
})
|
205
207
|
return _obj
|
206
208
|
|
@@ -66,12 +66,13 @@ class DatasetUpdateObject(BaseModel):
|
|
66
66
|
widget_offset_x: Optional[StrictInt] = Field(default=None, description="Widget offset X", alias="widget_offsetX")
|
67
67
|
widget_offset_y: Optional[StrictInt] = Field(default=None, description="Widget offset Y", alias="widget_offsetY")
|
68
68
|
widget_show_powered_by: Optional[StrictBool] = Field(default=None, description="Show powered by label in the widget")
|
69
|
+
widget_show_export_conversation: Optional[StrictBool] = Field(default=None, description="Show export conversation button in the widget")
|
69
70
|
track_geo: Optional[StrictBool] = Field(default=None, description="Flag to track geo location")
|
70
71
|
use_training: Optional[StrictBool] = Field(default=None, description="Flag to use training data")
|
71
72
|
split_by: Optional[StrictStr] = Field(default=None, description="Split method")
|
72
73
|
split_len: Optional[StrictInt] = Field(default=None, description="Split length")
|
73
74
|
split_overlap: Optional[StrictInt] = Field(default=None, description="Split overlap")
|
74
|
-
__properties: ClassVar[List[str]] = ["dataset", "username", "is_updating", "use_reader", "use_ranker", "use_fallback", "top_k_retriever", "top_k_reader", "do_ocr", "return_no_ans", "no_ans_boost", "max_seq_len", "doc_stride", "max_ans_len", "weight_title", "weight_text", "llm_choice", "bot_name", "bot_description", "bot_mode", "bot_knowledge", "bot_answer_length", "bot_seed", "bot_temperature", "prompt", "number_of_references", "data_storage_preference", "logs_visibility_policy", "stream_speed", "initial_message", "widget_init_msg", "widget_theme", "widget_open_default", "widget_font", "widget_colorPrimary", "widget_colorSecondary", "widget_align", "widget_offsetX", "widget_offsetY", "widget_show_powered_by", "track_geo", "use_training", "split_by", "split_len", "split_overlap"]
|
75
|
+
__properties: ClassVar[List[str]] = ["dataset", "username", "is_updating", "use_reader", "use_ranker", "use_fallback", "top_k_retriever", "top_k_reader", "do_ocr", "return_no_ans", "no_ans_boost", "max_seq_len", "doc_stride", "max_ans_len", "weight_title", "weight_text", "llm_choice", "bot_name", "bot_description", "bot_mode", "bot_knowledge", "bot_answer_length", "bot_seed", "bot_temperature", "prompt", "number_of_references", "data_storage_preference", "logs_visibility_policy", "stream_speed", "initial_message", "widget_init_msg", "widget_theme", "widget_open_default", "widget_font", "widget_colorPrimary", "widget_colorSecondary", "widget_align", "widget_offsetX", "widget_offsetY", "widget_show_powered_by", "widget_show_export_conversation", "track_geo", "use_training", "split_by", "split_len", "split_overlap"]
|
75
76
|
|
76
77
|
@field_validator('data_storage_preference')
|
77
78
|
def data_storage_preference_validate_enum(cls, value):
|
@@ -184,6 +185,7 @@ class DatasetUpdateObject(BaseModel):
|
|
184
185
|
"widget_offsetX": obj.get("widget_offsetX"),
|
185
186
|
"widget_offsetY": obj.get("widget_offsetY"),
|
186
187
|
"widget_show_powered_by": obj.get("widget_show_powered_by"),
|
188
|
+
"widget_show_export_conversation": obj.get("widget_show_export_conversation"),
|
187
189
|
"track_geo": obj.get("track_geo"),
|
188
190
|
"use_training": obj.get("use_training"),
|
189
191
|
"split_by": obj.get("split_by"),
|
@@ -33,8 +33,8 @@ class DeleteConnectorModel(BaseModel):
|
|
33
33
|
@field_validator('connector_type')
|
34
34
|
def connector_type_validate_enum(cls, value):
|
35
35
|
"""Validates the enum"""
|
36
|
-
if value not in set(['document', 'website', 'qna', 'pinecone', 'rdf', 'websearch', 'econsilium', 'econsilium_search_index', 'publication_office', 'onedrive', 'sharepoint', 'gdrive', 'onenote']):
|
37
|
-
raise ValueError("must be one of enum values ('document', 'website', 'qna', 'pinecone', 'rdf', 'websearch', 'econsilium', 'econsilium_search_index', 'publication_office', 'onedrive', 'sharepoint', 'gdrive', 'onenote')")
|
36
|
+
if value not in set(['document', 'website', 'qna', 'pinecone', 'rdf', 'websearch', 'econsilium', 'econsilium_search_index', 'publication_office', 'onedrive', 'sharepoint', 'gdrive', 'onenote', 'imap']):
|
37
|
+
raise ValueError("must be one of enum values ('document', 'website', 'qna', 'pinecone', 'rdf', 'websearch', 'econsilium', 'econsilium_search_index', 'publication_office', 'onedrive', 'sharepoint', 'gdrive', 'onenote', 'imap')")
|
38
38
|
return value
|
39
39
|
|
40
40
|
model_config = ConfigDict(
|
@@ -28,8 +28,7 @@ class DeleteConnectorsResponse(BaseModel):
|
|
28
28
|
""" # noqa: E501
|
29
29
|
status: Optional[StrictBool] = None
|
30
30
|
message: Optional[StrictStr] = None
|
31
|
-
|
32
|
-
__properties: ClassVar[List[str]] = ["status", "message", "deletion_statuses"]
|
31
|
+
__properties: ClassVar[List[str]] = ["status", "message"]
|
33
32
|
|
34
33
|
model_config = ConfigDict(
|
35
34
|
populate_by_name=True,
|
@@ -83,8 +82,7 @@ class DeleteConnectorsResponse(BaseModel):
|
|
83
82
|
|
84
83
|
_obj = cls.model_validate({
|
85
84
|
"status": obj.get("status"),
|
86
|
-
"message": obj.get("message")
|
87
|
-
"deletion_statuses": obj.get("deletion_statuses")
|
85
|
+
"message": obj.get("message")
|
88
86
|
})
|
89
87
|
return _obj
|
90
88
|
|
qanswer_sdk/models/{json_nullable_source_metadata.py → duplicate_report_template_response.py}
RENAMED
@@ -17,17 +17,18 @@ import pprint
|
|
17
17
|
import re # noqa: F401
|
18
18
|
import json
|
19
19
|
|
20
|
-
from pydantic import BaseModel, ConfigDict,
|
21
|
-
from typing import Any, ClassVar, Dict, List
|
20
|
+
from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
22
22
|
from typing import Optional, Set
|
23
23
|
from typing_extensions import Self
|
24
24
|
|
25
|
-
class
|
25
|
+
class DuplicateReportTemplateResponse(BaseModel):
|
26
26
|
"""
|
27
|
-
|
27
|
+
DuplicateReportTemplateResponse
|
28
28
|
""" # noqa: E501
|
29
|
-
|
30
|
-
|
29
|
+
template_id: StrictInt
|
30
|
+
conversation_id: StrictStr
|
31
|
+
__properties: ClassVar[List[str]] = ["template_id", "conversation_id"]
|
31
32
|
|
32
33
|
model_config = ConfigDict(
|
33
34
|
populate_by_name=True,
|
@@ -47,7 +48,7 @@ class JsonNullableSourceMetadata(BaseModel):
|
|
47
48
|
|
48
49
|
@classmethod
|
49
50
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
50
|
-
"""Create an instance of
|
51
|
+
"""Create an instance of DuplicateReportTemplateResponse from a JSON string"""
|
51
52
|
return cls.from_dict(json.loads(json_str))
|
52
53
|
|
53
54
|
def to_dict(self) -> Dict[str, Any]:
|
@@ -72,7 +73,7 @@ class JsonNullableSourceMetadata(BaseModel):
|
|
72
73
|
|
73
74
|
@classmethod
|
74
75
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
75
|
-
"""Create an instance of
|
76
|
+
"""Create an instance of DuplicateReportTemplateResponse from a dict"""
|
76
77
|
if obj is None:
|
77
78
|
return None
|
78
79
|
|
@@ -80,7 +81,8 @@ class JsonNullableSourceMetadata(BaseModel):
|
|
80
81
|
return cls.model_validate(obj)
|
81
82
|
|
82
83
|
_obj = cls.model_validate({
|
83
|
-
"
|
84
|
+
"template_id": obj.get("template_id"),
|
85
|
+
"conversation_id": obj.get("conversation_id")
|
84
86
|
})
|
85
87
|
return _obj
|
86
88
|
|
@@ -17,17 +17,19 @@ import pprint
|
|
17
17
|
import re # noqa: F401
|
18
18
|
import json
|
19
19
|
|
20
|
-
from pydantic import BaseModel, ConfigDict,
|
20
|
+
from pydantic import BaseModel, ConfigDict, 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 EmailFolder(BaseModel):
|
26
26
|
"""
|
27
|
-
|
27
|
+
EmailFolder
|
28
28
|
""" # noqa: E501
|
29
|
-
|
30
|
-
|
29
|
+
name: StrictStr
|
30
|
+
folder_id: StrictStr
|
31
|
+
count: Optional[StrictInt] = None
|
32
|
+
__properties: ClassVar[List[str]] = ["name", "folder_id", "count"]
|
31
33
|
|
32
34
|
model_config = ConfigDict(
|
33
35
|
populate_by_name=True,
|
@@ -47,7 +49,7 @@ class JsonNullableFileFailureReason(BaseModel):
|
|
47
49
|
|
48
50
|
@classmethod
|
49
51
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
50
|
-
"""Create an instance of
|
52
|
+
"""Create an instance of EmailFolder from a JSON string"""
|
51
53
|
return cls.from_dict(json.loads(json_str))
|
52
54
|
|
53
55
|
def to_dict(self) -> Dict[str, Any]:
|
@@ -72,7 +74,7 @@ class JsonNullableFileFailureReason(BaseModel):
|
|
72
74
|
|
73
75
|
@classmethod
|
74
76
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
75
|
-
"""Create an instance of
|
77
|
+
"""Create an instance of EmailFolder from a dict"""
|
76
78
|
if obj is None:
|
77
79
|
return None
|
78
80
|
|
@@ -80,7 +82,9 @@ class JsonNullableFileFailureReason(BaseModel):
|
|
80
82
|
return cls.model_validate(obj)
|
81
83
|
|
82
84
|
_obj = cls.model_validate({
|
83
|
-
"
|
85
|
+
"name": obj.get("name"),
|
86
|
+
"folder_id": obj.get("folder_id"),
|
87
|
+
"count": obj.get("count")
|
84
88
|
})
|
85
89
|
return _obj
|
86
90
|
|
@@ -17,14 +17,14 @@ import pprint
|
|
17
17
|
import re # noqa: F401
|
18
18
|
import json
|
19
19
|
|
20
|
-
from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr, field_validator
|
21
|
-
from typing import Any, ClassVar, Dict, List, Optional
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional, Union
|
22
22
|
from typing import Optional, Set
|
23
23
|
from typing_extensions import Self
|
24
24
|
|
25
|
-
class
|
25
|
+
class EmbedderDetailedDto(BaseModel):
|
26
26
|
"""
|
27
|
-
|
27
|
+
EmbedderDetailedDto
|
28
28
|
""" # noqa: E501
|
29
29
|
modality: Optional[StrictStr] = None
|
30
30
|
provider: Optional[StrictStr] = None
|
@@ -36,6 +36,7 @@ class EmbeddingEndpoint(BaseModel):
|
|
36
36
|
aws_access_key_id: Optional[StrictStr] = None
|
37
37
|
aws_secret_access_key: Optional[StrictStr] = None
|
38
38
|
aws_region_name: Optional[StrictStr] = None
|
39
|
+
batch_size: Optional[StrictInt] = None
|
39
40
|
display_name: StrictStr
|
40
41
|
engine: StrictStr
|
41
42
|
api_key: Optional[StrictStr] = None
|
@@ -43,7 +44,10 @@ class EmbeddingEndpoint(BaseModel):
|
|
43
44
|
embedding_size: StrictInt
|
44
45
|
context_window: StrictInt
|
45
46
|
id: Optional[StrictInt] = None
|
46
|
-
|
47
|
+
cost_input_token: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="costInputToken")
|
48
|
+
cost_output_token: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="costOutputToken")
|
49
|
+
active: Optional[StrictBool] = None
|
50
|
+
__properties: ClassVar[List[str]] = ["modality", "provider", "endpoint_url", "description", "onpremise", "sensitivity_label", "api_version", "aws_access_key_id", "aws_secret_access_key", "aws_region_name", "batch_size", "display_name", "engine", "api_key", "name", "embedding_size", "context_window", "id", "costInputToken", "costOutputToken", "active"]
|
47
51
|
|
48
52
|
@field_validator('modality')
|
49
53
|
def modality_validate_enum(cls, value):
|
@@ -83,7 +87,7 @@ class EmbeddingEndpoint(BaseModel):
|
|
83
87
|
|
84
88
|
@classmethod
|
85
89
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
86
|
-
"""Create an instance of
|
90
|
+
"""Create an instance of EmbedderDetailedDto from a JSON string"""
|
87
91
|
return cls.from_dict(json.loads(json_str))
|
88
92
|
|
89
93
|
def to_dict(self) -> Dict[str, Any]:
|
@@ -108,7 +112,7 @@ class EmbeddingEndpoint(BaseModel):
|
|
108
112
|
|
109
113
|
@classmethod
|
110
114
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
111
|
-
"""Create an instance of
|
115
|
+
"""Create an instance of EmbedderDetailedDto from a dict"""
|
112
116
|
if obj is None:
|
113
117
|
return None
|
114
118
|
|
@@ -126,13 +130,17 @@ class EmbeddingEndpoint(BaseModel):
|
|
126
130
|
"aws_access_key_id": obj.get("aws_access_key_id"),
|
127
131
|
"aws_secret_access_key": obj.get("aws_secret_access_key"),
|
128
132
|
"aws_region_name": obj.get("aws_region_name"),
|
133
|
+
"batch_size": obj.get("batch_size"),
|
129
134
|
"display_name": obj.get("display_name"),
|
130
135
|
"engine": obj.get("engine"),
|
131
136
|
"api_key": obj.get("api_key"),
|
132
137
|
"name": obj.get("name"),
|
133
138
|
"embedding_size": obj.get("embedding_size"),
|
134
139
|
"context_window": obj.get("context_window"),
|
135
|
-
"id": obj.get("id")
|
140
|
+
"id": obj.get("id"),
|
141
|
+
"costInputToken": obj.get("costInputToken"),
|
142
|
+
"costOutputToken": obj.get("costOutputToken"),
|
143
|
+
"active": obj.get("active")
|
136
144
|
})
|
137
145
|
return _obj
|
138
146
|
|
@@ -17,17 +17,19 @@ import pprint
|
|
17
17
|
import re # noqa: F401
|
18
18
|
import json
|
19
19
|
|
20
|
-
from pydantic import BaseModel, ConfigDict, StrictStr
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, 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 EmbedderDto(BaseModel):
|
26
26
|
"""
|
27
|
-
|
27
|
+
EmbedderDto
|
28
28
|
""" # noqa: E501
|
29
|
+
id: Optional[StrictInt] = None
|
29
30
|
name: Optional[StrictStr] = None
|
30
|
-
|
31
|
+
display_name: Optional[StrictStr] = Field(default=None, alias="displayName")
|
32
|
+
__properties: ClassVar[List[str]] = ["id", "name", "displayName"]
|
31
33
|
|
32
34
|
model_config = ConfigDict(
|
33
35
|
populate_by_name=True,
|
@@ -47,7 +49,7 @@ class TagPayload(BaseModel):
|
|
47
49
|
|
48
50
|
@classmethod
|
49
51
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
50
|
-
"""Create an instance of
|
52
|
+
"""Create an instance of EmbedderDto from a JSON string"""
|
51
53
|
return cls.from_dict(json.loads(json_str))
|
52
54
|
|
53
55
|
def to_dict(self) -> Dict[str, Any]:
|
@@ -72,7 +74,7 @@ class TagPayload(BaseModel):
|
|
72
74
|
|
73
75
|
@classmethod
|
74
76
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
75
|
-
"""Create an instance of
|
77
|
+
"""Create an instance of EmbedderDto from a dict"""
|
76
78
|
if obj is None:
|
77
79
|
return None
|
78
80
|
|
@@ -80,7 +82,9 @@ class TagPayload(BaseModel):
|
|
80
82
|
return cls.model_validate(obj)
|
81
83
|
|
82
84
|
_obj = cls.model_validate({
|
83
|
-
"
|
85
|
+
"id": obj.get("id"),
|
86
|
+
"name": obj.get("name"),
|
87
|
+
"displayName": obj.get("displayName")
|
84
88
|
})
|
85
89
|
return _obj
|
86
90
|
|