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
@@ -18,23 +18,27 @@ import re # noqa: F401
|
|
18
18
|
import json
|
19
19
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
|
21
|
-
from typing import Any, ClassVar, Dict, List
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
22
22
|
from qanswer_sdk.models.slot import Slot
|
23
|
+
from qanswer_sdk.models.template_clip_structure_output import TemplateClipStructureOutput
|
23
24
|
from typing import Optional, Set
|
24
25
|
from typing_extensions import Self
|
25
26
|
|
26
|
-
class
|
27
|
+
class ReportTemplate(BaseModel):
|
27
28
|
"""
|
28
|
-
|
29
|
+
ReportTemplate
|
29
30
|
""" # noqa: E501
|
30
31
|
id: StrictInt
|
31
32
|
username: StrictStr
|
32
33
|
template_name: StrictStr
|
33
34
|
creation_date: StrictStr
|
34
35
|
last_updated: StrictStr
|
36
|
+
shared_to: Optional[StrictStr] = None
|
37
|
+
conversation_id: Optional[StrictStr] = None
|
35
38
|
template_with_slots: StrictStr
|
36
39
|
slots: List[Slot]
|
37
|
-
|
40
|
+
clip_structure: Optional[TemplateClipStructureOutput] = None
|
41
|
+
__properties: ClassVar[List[str]] = ["id", "username", "template_name", "creation_date", "last_updated", "shared_to", "conversation_id", "template_with_slots", "slots", "clip_structure"]
|
38
42
|
|
39
43
|
model_config = ConfigDict(
|
40
44
|
populate_by_name=True,
|
@@ -54,7 +58,7 @@ class ReportCopilotTemplate(BaseModel):
|
|
54
58
|
|
55
59
|
@classmethod
|
56
60
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
57
|
-
"""Create an instance of
|
61
|
+
"""Create an instance of ReportTemplate from a JSON string"""
|
58
62
|
return cls.from_dict(json.loads(json_str))
|
59
63
|
|
60
64
|
def to_dict(self) -> Dict[str, Any]:
|
@@ -82,11 +86,14 @@ class ReportCopilotTemplate(BaseModel):
|
|
82
86
|
if _item_slots:
|
83
87
|
_items.append(_item_slots.to_dict())
|
84
88
|
_dict['slots'] = _items
|
89
|
+
# override the default output from pydantic by calling `to_dict()` of clip_structure
|
90
|
+
if self.clip_structure:
|
91
|
+
_dict['clip_structure'] = self.clip_structure.to_dict()
|
85
92
|
return _dict
|
86
93
|
|
87
94
|
@classmethod
|
88
95
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
89
|
-
"""Create an instance of
|
96
|
+
"""Create an instance of ReportTemplate from a dict"""
|
90
97
|
if obj is None:
|
91
98
|
return None
|
92
99
|
|
@@ -99,8 +106,11 @@ class ReportCopilotTemplate(BaseModel):
|
|
99
106
|
"template_name": obj.get("template_name"),
|
100
107
|
"creation_date": obj.get("creation_date"),
|
101
108
|
"last_updated": obj.get("last_updated"),
|
109
|
+
"shared_to": obj.get("shared_to"),
|
110
|
+
"conversation_id": obj.get("conversation_id"),
|
102
111
|
"template_with_slots": obj.get("template_with_slots"),
|
103
|
-
"slots": [Slot.from_dict(_item) for _item in obj["slots"]] if obj.get("slots") is not None else None
|
112
|
+
"slots": [Slot.from_dict(_item) for _item in obj["slots"]] if obj.get("slots") is not None else None,
|
113
|
+
"clip_structure": TemplateClipStructureOutput.from_dict(obj["clip_structure"]) if obj.get("clip_structure") is not None else None
|
104
114
|
})
|
105
115
|
return _obj
|
106
116
|
|
@@ -23,9 +23,9 @@ from qanswer_sdk.models.slot_update import SlotUpdate
|
|
23
23
|
from typing import Optional, Set
|
24
24
|
from typing_extensions import Self
|
25
25
|
|
26
|
-
class
|
26
|
+
class ReportTemplateCreatePayload(BaseModel):
|
27
27
|
"""
|
28
|
-
|
28
|
+
ReportTemplateCreatePayload
|
29
29
|
""" # noqa: E501
|
30
30
|
username: StrictStr
|
31
31
|
dataset: StrictStr
|
@@ -52,7 +52,7 @@ class ReportCopilotCreatePayload(BaseModel):
|
|
52
52
|
|
53
53
|
@classmethod
|
54
54
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
55
|
-
"""Create an instance of
|
55
|
+
"""Create an instance of ReportTemplateCreatePayload from a JSON string"""
|
56
56
|
return cls.from_dict(json.loads(json_str))
|
57
57
|
|
58
58
|
def to_dict(self) -> Dict[str, Any]:
|
@@ -84,7 +84,7 @@ class ReportCopilotCreatePayload(BaseModel):
|
|
84
84
|
|
85
85
|
@classmethod
|
86
86
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
87
|
-
"""Create an instance of
|
87
|
+
"""Create an instance of ReportTemplateCreatePayload from a dict"""
|
88
88
|
if obj is None:
|
89
89
|
return None
|
90
90
|
|
@@ -18,20 +18,22 @@ import re # noqa: F401
|
|
18
18
|
import json
|
19
19
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
|
21
|
-
from typing import Any, ClassVar, Dict, List
|
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 ReportTemplateSimplified(BaseModel):
|
26
26
|
"""
|
27
|
-
|
27
|
+
ReportTemplateSimplified
|
28
28
|
""" # noqa: E501
|
29
29
|
id: StrictInt
|
30
30
|
username: StrictStr
|
31
31
|
template_name: StrictStr
|
32
32
|
creation_date: StrictStr
|
33
33
|
last_updated: StrictStr
|
34
|
-
|
34
|
+
shared_to: Optional[StrictStr] = None
|
35
|
+
conversation_id: Optional[StrictStr] = None
|
36
|
+
__properties: ClassVar[List[str]] = ["id", "username", "template_name", "creation_date", "last_updated", "shared_to", "conversation_id"]
|
35
37
|
|
36
38
|
model_config = ConfigDict(
|
37
39
|
populate_by_name=True,
|
@@ -51,7 +53,7 @@ class ReportCopilotTemplateSimplified(BaseModel):
|
|
51
53
|
|
52
54
|
@classmethod
|
53
55
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
54
|
-
"""Create an instance of
|
56
|
+
"""Create an instance of ReportTemplateSimplified from a JSON string"""
|
55
57
|
return cls.from_dict(json.loads(json_str))
|
56
58
|
|
57
59
|
def to_dict(self) -> Dict[str, Any]:
|
@@ -76,7 +78,7 @@ class ReportCopilotTemplateSimplified(BaseModel):
|
|
76
78
|
|
77
79
|
@classmethod
|
78
80
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
79
|
-
"""Create an instance of
|
81
|
+
"""Create an instance of ReportTemplateSimplified from a dict"""
|
80
82
|
if obj is None:
|
81
83
|
return None
|
82
84
|
|
@@ -88,7 +90,9 @@ class ReportCopilotTemplateSimplified(BaseModel):
|
|
88
90
|
"username": obj.get("username"),
|
89
91
|
"template_name": obj.get("template_name"),
|
90
92
|
"creation_date": obj.get("creation_date"),
|
91
|
-
"last_updated": obj.get("last_updated")
|
93
|
+
"last_updated": obj.get("last_updated"),
|
94
|
+
"shared_to": obj.get("shared_to"),
|
95
|
+
"conversation_id": obj.get("conversation_id")
|
92
96
|
})
|
93
97
|
return _obj
|
94
98
|
|
@@ -22,9 +22,9 @@ 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 ReportTemplateSimplifiedPayload(BaseModel):
|
26
26
|
"""
|
27
|
-
|
27
|
+
ReportTemplateSimplifiedPayload
|
28
28
|
""" # noqa: E501
|
29
29
|
username: Optional[StrictStr] = None
|
30
30
|
dataset: Optional[StrictStr] = None
|
@@ -49,7 +49,7 @@ class ReportCopilotExportTemplateAsDocxPayloadSimplified(BaseModel):
|
|
49
49
|
|
50
50
|
@classmethod
|
51
51
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
52
|
-
"""Create an instance of
|
52
|
+
"""Create an instance of ReportTemplateSimplifiedPayload from a JSON string"""
|
53
53
|
return cls.from_dict(json.loads(json_str))
|
54
54
|
|
55
55
|
def to_dict(self) -> Dict[str, Any]:
|
@@ -74,7 +74,7 @@ class ReportCopilotExportTemplateAsDocxPayloadSimplified(BaseModel):
|
|
74
74
|
|
75
75
|
@classmethod
|
76
76
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
77
|
-
"""Create an instance of
|
77
|
+
"""Create an instance of ReportTemplateSimplifiedPayload from a dict"""
|
78
78
|
if obj is None:
|
79
79
|
return None
|
80
80
|
|
@@ -18,20 +18,22 @@ import re # noqa: F401
|
|
18
18
|
import json
|
19
19
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, StrictStr
|
21
|
-
from typing import Any, ClassVar, Dict, List
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
22
22
|
from qanswer_sdk.models.slot_update import SlotUpdate
|
23
|
+
from qanswer_sdk.models.template_clip_structure_input import TemplateClipStructureInput
|
23
24
|
from typing import Optional, Set
|
24
25
|
from typing_extensions import Self
|
25
26
|
|
26
|
-
class
|
27
|
+
class ReportTemplateUpdatePayload(BaseModel):
|
27
28
|
"""
|
28
|
-
|
29
|
+
ReportTemplateUpdatePayload
|
29
30
|
""" # noqa: E501
|
30
31
|
username: StrictStr
|
31
32
|
dataset: StrictStr
|
32
|
-
template_with_slots: StrictStr
|
33
|
-
slots: List[SlotUpdate]
|
34
|
-
|
33
|
+
template_with_slots: Optional[StrictStr] = None
|
34
|
+
slots: Optional[List[SlotUpdate]] = None
|
35
|
+
clip_structure: Optional[TemplateClipStructureInput] = None
|
36
|
+
__properties: ClassVar[List[str]] = ["username", "dataset", "template_with_slots", "slots", "clip_structure"]
|
35
37
|
|
36
38
|
model_config = ConfigDict(
|
37
39
|
populate_by_name=True,
|
@@ -51,7 +53,7 @@ class ReportCopilotUpdatePayload(BaseModel):
|
|
51
53
|
|
52
54
|
@classmethod
|
53
55
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
54
|
-
"""Create an instance of
|
56
|
+
"""Create an instance of ReportTemplateUpdatePayload from a JSON string"""
|
55
57
|
return cls.from_dict(json.loads(json_str))
|
56
58
|
|
57
59
|
def to_dict(self) -> Dict[str, Any]:
|
@@ -79,11 +81,14 @@ class ReportCopilotUpdatePayload(BaseModel):
|
|
79
81
|
if _item_slots:
|
80
82
|
_items.append(_item_slots.to_dict())
|
81
83
|
_dict['slots'] = _items
|
84
|
+
# override the default output from pydantic by calling `to_dict()` of clip_structure
|
85
|
+
if self.clip_structure:
|
86
|
+
_dict['clip_structure'] = self.clip_structure.to_dict()
|
82
87
|
return _dict
|
83
88
|
|
84
89
|
@classmethod
|
85
90
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
86
|
-
"""Create an instance of
|
91
|
+
"""Create an instance of ReportTemplateUpdatePayload from a dict"""
|
87
92
|
if obj is None:
|
88
93
|
return None
|
89
94
|
|
@@ -94,7 +99,8 @@ class ReportCopilotUpdatePayload(BaseModel):
|
|
94
99
|
"username": obj.get("username"),
|
95
100
|
"dataset": obj.get("dataset"),
|
96
101
|
"template_with_slots": obj.get("template_with_slots"),
|
97
|
-
"slots": [SlotUpdate.from_dict(_item) for _item in obj["slots"]] if obj.get("slots") is not None else None
|
102
|
+
"slots": [SlotUpdate.from_dict(_item) for _item in obj["slots"]] if obj.get("slots") is not None else None,
|
103
|
+
"clip_structure": TemplateClipStructureInput.from_dict(obj["clip_structure"]) if obj.get("clip_structure") is not None else None
|
98
104
|
})
|
99
105
|
return _obj
|
100
106
|
|
@@ -17,9 +17,9 @@ import pprint
|
|
17
17
|
import re # noqa: F401
|
18
18
|
import json
|
19
19
|
|
20
|
-
from pydantic import BaseModel, ConfigDict, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator
|
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.
|
22
|
+
from qanswer_sdk.models.llm_endpoint_read_output import LLMEndpointReadOutput
|
23
23
|
from typing import Optional, Set
|
24
24
|
from typing_extensions import Self
|
25
25
|
|
@@ -28,7 +28,6 @@ class SearchTaskSettings(BaseModel):
|
|
28
28
|
SearchTaskSettings
|
29
29
|
""" # noqa: E501
|
30
30
|
prompt: Optional[StrictStr] = None
|
31
|
-
llm_choice: Optional[StrictStr] = None
|
32
31
|
bot_seed: Optional[StrictInt] = None
|
33
32
|
bot_temperature: Optional[Union[StrictFloat, StrictInt]] = None
|
34
33
|
bot_answer_length: Optional[StrictStr] = None
|
@@ -36,14 +35,15 @@ class SearchTaskSettings(BaseModel):
|
|
36
35
|
stream_speed: Optional[Union[StrictFloat, StrictInt]] = None
|
37
36
|
context_window: Optional[StrictInt] = None
|
38
37
|
max_tokens: Optional[StrictInt] = None
|
38
|
+
slots_values: Optional[Dict[str, StrictStr]] = None
|
39
39
|
bot_name: Optional[StrictStr] = None
|
40
40
|
bot_description: Optional[StrictStr] = None
|
41
|
-
|
41
|
+
llm_id: Optional[StrictInt] = Field(default=None, description="The LLM ID. This field is populated based on the llm_choice.")
|
42
|
+
llm_endpoint: Optional[LLMEndpointReadOutput] = None
|
42
43
|
query_expansion_prompt: Optional[StrictStr] = None
|
43
44
|
show_date_in_sources: Optional[StrictBool] = None
|
44
|
-
slots_values: Optional[Dict[str, StrictStr]] = None
|
45
45
|
selected_aggregations: Optional[List[StrictStr]] = None
|
46
|
-
__properties: ClassVar[List[str]] = ["prompt", "
|
46
|
+
__properties: ClassVar[List[str]] = ["prompt", "bot_seed", "bot_temperature", "bot_answer_length", "number_of_references", "stream_speed", "context_window", "max_tokens", "slots_values", "bot_name", "bot_description", "llm_id", "llm_endpoint", "query_expansion_prompt", "show_date_in_sources", "selected_aggregations"]
|
47
47
|
|
48
48
|
@field_validator('bot_answer_length')
|
49
49
|
def bot_answer_length_validate_enum(cls, value):
|
@@ -94,9 +94,9 @@ class SearchTaskSettings(BaseModel):
|
|
94
94
|
exclude=excluded_fields,
|
95
95
|
exclude_none=True,
|
96
96
|
)
|
97
|
-
# override the default output from pydantic by calling `to_dict()` of
|
98
|
-
if self.
|
99
|
-
_dict['
|
97
|
+
# override the default output from pydantic by calling `to_dict()` of llm_endpoint
|
98
|
+
if self.llm_endpoint:
|
99
|
+
_dict['llm_endpoint'] = self.llm_endpoint.to_dict()
|
100
100
|
return _dict
|
101
101
|
|
102
102
|
@classmethod
|
@@ -110,7 +110,6 @@ class SearchTaskSettings(BaseModel):
|
|
110
110
|
|
111
111
|
_obj = cls.model_validate({
|
112
112
|
"prompt": obj.get("prompt"),
|
113
|
-
"llm_choice": obj.get("llm_choice"),
|
114
113
|
"bot_seed": obj.get("bot_seed"),
|
115
114
|
"bot_temperature": obj.get("bot_temperature"),
|
116
115
|
"bot_answer_length": obj.get("bot_answer_length"),
|
@@ -118,12 +117,13 @@ class SearchTaskSettings(BaseModel):
|
|
118
117
|
"stream_speed": obj.get("stream_speed"),
|
119
118
|
"context_window": obj.get("context_window"),
|
120
119
|
"max_tokens": obj.get("max_tokens"),
|
120
|
+
"slots_values": obj.get("slots_values"),
|
121
121
|
"bot_name": obj.get("bot_name"),
|
122
122
|
"bot_description": obj.get("bot_description"),
|
123
|
-
"
|
123
|
+
"llm_id": obj.get("llm_id"),
|
124
|
+
"llm_endpoint": LLMEndpointReadOutput.from_dict(obj["llm_endpoint"]) if obj.get("llm_endpoint") is not None else None,
|
124
125
|
"query_expansion_prompt": obj.get("query_expansion_prompt"),
|
125
126
|
"show_date_in_sources": obj.get("show_date_in_sources"),
|
126
|
-
"slots_values": obj.get("slots_values"),
|
127
127
|
"selected_aggregations": obj.get("selected_aggregations")
|
128
128
|
})
|
129
129
|
return _obj
|
@@ -17,8 +17,9 @@ import pprint
|
|
17
17
|
import re # noqa: F401
|
18
18
|
import json
|
19
19
|
|
20
|
-
from pydantic import BaseModel, ConfigDict, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator
|
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.llm_endpoint_read_input import LLMEndpointReadInput
|
22
23
|
from typing import Optional, Set
|
23
24
|
from typing_extensions import Self
|
24
25
|
|
@@ -27,7 +28,7 @@ class SearchTaskUpdate(BaseModel):
|
|
27
28
|
SearchTaskUpdate
|
28
29
|
""" # noqa: E501
|
29
30
|
prompt: Optional[StrictStr] = None
|
30
|
-
llm_choice: Optional[StrictStr] = None
|
31
|
+
llm_choice: Optional[StrictStr] = Field(default=None, description="The LLM choice. If not provided, the system default will be used.")
|
31
32
|
bot_seed: Optional[StrictInt] = None
|
32
33
|
bot_temperature: Optional[Union[StrictFloat, StrictInt]] = None
|
33
34
|
bot_answer_length: Optional[StrictStr] = None
|
@@ -35,12 +36,15 @@ class SearchTaskUpdate(BaseModel):
|
|
35
36
|
stream_speed: Optional[Union[StrictFloat, StrictInt]] = None
|
36
37
|
context_window: Optional[StrictInt] = None
|
37
38
|
max_tokens: Optional[StrictInt] = None
|
39
|
+
slots_values: Optional[Dict[str, StrictStr]] = None
|
38
40
|
bot_name: Optional[StrictStr] = None
|
39
41
|
bot_description: Optional[StrictStr] = None
|
42
|
+
llm_id: Optional[StrictInt] = Field(default=None, description="The LLM ID. This field is populated based on the llm_choice.")
|
43
|
+
llm_endpoint: Optional[LLMEndpointReadInput] = None
|
40
44
|
query_expansion_prompt: Optional[StrictStr] = None
|
41
45
|
show_date_in_sources: Optional[StrictBool] = None
|
42
46
|
selected_aggregations: Optional[List[StrictStr]] = None
|
43
|
-
__properties: ClassVar[List[str]] = ["prompt", "llm_choice", "bot_seed", "bot_temperature", "bot_answer_length", "number_of_references", "stream_speed", "context_window", "max_tokens", "bot_name", "bot_description", "query_expansion_prompt", "show_date_in_sources", "selected_aggregations"]
|
47
|
+
__properties: ClassVar[List[str]] = ["prompt", "llm_choice", "bot_seed", "bot_temperature", "bot_answer_length", "number_of_references", "stream_speed", "context_window", "max_tokens", "slots_values", "bot_name", "bot_description", "llm_id", "llm_endpoint", "query_expansion_prompt", "show_date_in_sources", "selected_aggregations"]
|
44
48
|
|
45
49
|
@field_validator('bot_answer_length')
|
46
50
|
def bot_answer_length_validate_enum(cls, value):
|
@@ -91,6 +95,9 @@ class SearchTaskUpdate(BaseModel):
|
|
91
95
|
exclude=excluded_fields,
|
92
96
|
exclude_none=True,
|
93
97
|
)
|
98
|
+
# override the default output from pydantic by calling `to_dict()` of llm_endpoint
|
99
|
+
if self.llm_endpoint:
|
100
|
+
_dict['llm_endpoint'] = self.llm_endpoint.to_dict()
|
94
101
|
return _dict
|
95
102
|
|
96
103
|
@classmethod
|
@@ -112,8 +119,11 @@ class SearchTaskUpdate(BaseModel):
|
|
112
119
|
"stream_speed": obj.get("stream_speed"),
|
113
120
|
"context_window": obj.get("context_window"),
|
114
121
|
"max_tokens": obj.get("max_tokens"),
|
122
|
+
"slots_values": obj.get("slots_values"),
|
115
123
|
"bot_name": obj.get("bot_name"),
|
116
124
|
"bot_description": obj.get("bot_description"),
|
125
|
+
"llm_id": obj.get("llm_id"),
|
126
|
+
"llm_endpoint": LLMEndpointReadInput.from_dict(obj["llm_endpoint"]) if obj.get("llm_endpoint") is not None else None,
|
117
127
|
"query_expansion_prompt": obj.get("query_expansion_prompt"),
|
118
128
|
"show_date_in_sources": obj.get("show_date_in_sources"),
|
119
129
|
"selected_aggregations": obj.get("selected_aggregations")
|
@@ -22,9 +22,9 @@ from typing import Any, ClassVar, Dict, List, Tuple, Union
|
|
22
22
|
from typing import Optional, Set
|
23
23
|
from typing_extensions import Self
|
24
24
|
|
25
|
-
class
|
25
|
+
class SetLogo2Request(BaseModel):
|
26
26
|
"""
|
27
|
-
|
27
|
+
SetLogo2Request
|
28
28
|
""" # noqa: E501
|
29
29
|
file: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]
|
30
30
|
__properties: ClassVar[List[str]] = ["file"]
|
@@ -47,7 +47,7 @@ class SetLogo1Request(BaseModel):
|
|
47
47
|
|
48
48
|
@classmethod
|
49
49
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
50
|
-
"""Create an instance of
|
50
|
+
"""Create an instance of SetLogo2Request from a JSON string"""
|
51
51
|
return cls.from_dict(json.loads(json_str))
|
52
52
|
|
53
53
|
def to_dict(self) -> Dict[str, Any]:
|
@@ -72,7 +72,7 @@ class SetLogo1Request(BaseModel):
|
|
72
72
|
|
73
73
|
@classmethod
|
74
74
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
75
|
-
"""Create an instance of
|
75
|
+
"""Create an instance of SetLogo2Request from a dict"""
|
76
76
|
if obj is None:
|
77
77
|
return None
|
78
78
|
|
@@ -19,6 +19,7 @@ import json
|
|
19
19
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
22
|
+
from qanswer_sdk.models.organization import Organization
|
22
23
|
from typing import Optional, Set
|
23
24
|
from typing_extensions import Self
|
24
25
|
|
@@ -27,10 +28,10 @@ class SharedOrganizationAccess(BaseModel):
|
|
27
28
|
SharedOrganizationAccess
|
28
29
|
""" # noqa: E501
|
29
30
|
id: Optional[StrictInt] = None
|
30
|
-
|
31
|
+
organization: Optional[Organization] = None
|
31
32
|
shared_access_type: Optional[StrictStr] = Field(default=None, alias="sharedAccessType")
|
32
33
|
ai_assistant: Optional[UserDataset] = Field(default=None, alias="aiAssistant")
|
33
|
-
__properties: ClassVar[List[str]] = ["id", "
|
34
|
+
__properties: ClassVar[List[str]] = ["id", "organization", "sharedAccessType", "aiAssistant"]
|
34
35
|
|
35
36
|
@field_validator('shared_access_type')
|
36
37
|
def shared_access_type_validate_enum(cls, value):
|
@@ -81,6 +82,9 @@ class SharedOrganizationAccess(BaseModel):
|
|
81
82
|
exclude=excluded_fields,
|
82
83
|
exclude_none=True,
|
83
84
|
)
|
85
|
+
# override the default output from pydantic by calling `to_dict()` of organization
|
86
|
+
if self.organization:
|
87
|
+
_dict['organization'] = self.organization.to_dict()
|
84
88
|
# override the default output from pydantic by calling `to_dict()` of ai_assistant
|
85
89
|
if self.ai_assistant:
|
86
90
|
_dict['aiAssistant'] = self.ai_assistant.to_dict()
|
@@ -97,7 +101,7 @@ class SharedOrganizationAccess(BaseModel):
|
|
97
101
|
|
98
102
|
_obj = cls.model_validate({
|
99
103
|
"id": obj.get("id"),
|
100
|
-
"
|
104
|
+
"organization": Organization.from_dict(obj["organization"]) if obj.get("organization") is not None else None,
|
101
105
|
"sharedAccessType": obj.get("sharedAccessType"),
|
102
106
|
"aiAssistant": UserDataset.from_dict(obj["aiAssistant"]) if obj.get("aiAssistant") is not None else None
|
103
107
|
})
|
@@ -19,7 +19,7 @@ import json
|
|
19
19
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
22
|
-
from qanswer_sdk.models.
|
22
|
+
from qanswer_sdk.models.team import Team
|
23
23
|
from typing import Optional, Set
|
24
24
|
from typing_extensions import Self
|
25
25
|
|
@@ -28,10 +28,10 @@ class SharedTeamAccess(BaseModel):
|
|
28
28
|
SharedTeamAccess
|
29
29
|
""" # noqa: E501
|
30
30
|
id: Optional[StrictInt] = None
|
31
|
-
|
31
|
+
team: Optional[Team] = None
|
32
32
|
shared_access_type: Optional[StrictStr] = Field(default=None, alias="sharedAccessType")
|
33
33
|
ai_assistant: Optional[UserDataset] = Field(default=None, alias="aiAssistant")
|
34
|
-
__properties: ClassVar[List[str]] = ["id", "
|
34
|
+
__properties: ClassVar[List[str]] = ["id", "team", "sharedAccessType", "aiAssistant"]
|
35
35
|
|
36
36
|
@field_validator('shared_access_type')
|
37
37
|
def shared_access_type_validate_enum(cls, value):
|
@@ -82,6 +82,9 @@ class SharedTeamAccess(BaseModel):
|
|
82
82
|
exclude=excluded_fields,
|
83
83
|
exclude_none=True,
|
84
84
|
)
|
85
|
+
# override the default output from pydantic by calling `to_dict()` of team
|
86
|
+
if self.team:
|
87
|
+
_dict['team'] = self.team.to_dict()
|
85
88
|
# override the default output from pydantic by calling `to_dict()` of ai_assistant
|
86
89
|
if self.ai_assistant:
|
87
90
|
_dict['aiAssistant'] = self.ai_assistant.to_dict()
|
@@ -98,10 +101,13 @@ class SharedTeamAccess(BaseModel):
|
|
98
101
|
|
99
102
|
_obj = cls.model_validate({
|
100
103
|
"id": obj.get("id"),
|
101
|
-
"
|
104
|
+
"team": Team.from_dict(obj["team"]) if obj.get("team") is not None else None,
|
102
105
|
"sharedAccessType": obj.get("sharedAccessType"),
|
103
106
|
"aiAssistant": UserDataset.from_dict(obj["aiAssistant"]) if obj.get("aiAssistant") is not None else None
|
104
107
|
})
|
105
108
|
return _obj
|
106
109
|
|
110
|
+
from qanswer_sdk.models.user_dataset import UserDataset
|
111
|
+
# TODO: Rewrite to not use raise_errors
|
112
|
+
SharedTeamAccess.model_rebuild(raise_errors=False)
|
107
113
|
|
qanswer_sdk/models/slot.py
CHANGED
@@ -34,11 +34,13 @@ class Slot(BaseModel):
|
|
34
34
|
prompt: StrictStr
|
35
35
|
completion: StrictStr
|
36
36
|
sources: List[Source]
|
37
|
+
prompt_used: Optional[StrictStr] = None
|
38
|
+
llm_choice: Optional[StrictStr] = None
|
37
39
|
metadata_filters: Optional[List[List[SearchMetadataFilter]]] = None
|
38
40
|
mode: Optional[StrictStr] = Field(default=None, description="The mode of the response generation.")
|
39
41
|
is_input_data_cropped: Optional[StrictBool] = Field(default=None, description="Indicates whether the input data was cropped during prompting.")
|
40
42
|
task_settings: Optional[ReportCopilotSlotTaskSettings] = None
|
41
|
-
__properties: ClassVar[List[str]] = ["id", "node_id", "prompt", "completion", "sources", "metadata_filters", "mode", "is_input_data_cropped", "task_settings"]
|
43
|
+
__properties: ClassVar[List[str]] = ["id", "node_id", "prompt", "completion", "sources", "prompt_used", "llm_choice", "metadata_filters", "mode", "is_input_data_cropped", "task_settings"]
|
42
44
|
|
43
45
|
@field_validator('mode')
|
44
46
|
def mode_validate_enum(cls, value):
|
@@ -125,6 +127,8 @@ class Slot(BaseModel):
|
|
125
127
|
"prompt": obj.get("prompt"),
|
126
128
|
"completion": obj.get("completion"),
|
127
129
|
"sources": [Source.from_dict(_item) for _item in obj["sources"]] if obj.get("sources") is not None else None,
|
130
|
+
"prompt_used": obj.get("prompt_used"),
|
131
|
+
"llm_choice": obj.get("llm_choice"),
|
128
132
|
"metadata_filters": [
|
129
133
|
[SearchMetadataFilter.from_dict(_inner_item) for _inner_item in _item]
|
130
134
|
for _item in obj["metadata_filters"]
|
@@ -34,11 +34,13 @@ class SlotUpdate(BaseModel):
|
|
34
34
|
prompt: StrictStr
|
35
35
|
completion: StrictStr
|
36
36
|
sources: List[Source]
|
37
|
+
prompt_used: Optional[StrictStr] = None
|
38
|
+
llm_choice: Optional[StrictStr] = None
|
37
39
|
metadata_filters: Optional[List[List[SearchMetadataFilter]]] = None
|
38
40
|
mode: Optional[StrictStr] = Field(default=None, description="The mode of the response generation.")
|
39
41
|
is_input_data_cropped: Optional[StrictBool] = Field(default=None, description="Indicates whether the input data was cropped during prompting.")
|
40
42
|
task_settings: Optional[ReportCopilotSlotTaskUpdate] = None
|
41
|
-
__properties: ClassVar[List[str]] = ["id", "node_id", "prompt", "completion", "sources", "metadata_filters", "mode", "is_input_data_cropped", "task_settings"]
|
43
|
+
__properties: ClassVar[List[str]] = ["id", "node_id", "prompt", "completion", "sources", "prompt_used", "llm_choice", "metadata_filters", "mode", "is_input_data_cropped", "task_settings"]
|
42
44
|
|
43
45
|
@field_validator('mode')
|
44
46
|
def mode_validate_enum(cls, value):
|
@@ -125,6 +127,8 @@ class SlotUpdate(BaseModel):
|
|
125
127
|
"prompt": obj.get("prompt"),
|
126
128
|
"completion": obj.get("completion"),
|
127
129
|
"sources": [Source.from_dict(_item) for _item in obj["sources"]] if obj.get("sources") is not None else None,
|
130
|
+
"prompt_used": obj.get("prompt_used"),
|
131
|
+
"llm_choice": obj.get("llm_choice"),
|
128
132
|
"metadata_filters": [
|
129
133
|
[SearchMetadataFilter.from_dict(_inner_item) for _inner_item in _item]
|
130
134
|
for _item in obj["metadata_filters"]
|
@@ -21,7 +21,6 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, Strict
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
22
22
|
from qanswer_sdk.models.aggregations_group import AggregationsGroup
|
23
23
|
from qanswer_sdk.models.content_item import ContentItem
|
24
|
-
from qanswer_sdk.models.question_completion import QuestionCompletion
|
25
24
|
from qanswer_sdk.models.source import Source
|
26
25
|
from typing import Optional, Set
|
27
26
|
from typing_extensions import Self
|
@@ -49,14 +48,14 @@ class SocketConversationMessage(BaseModel):
|
|
49
48
|
interface_origin: Optional[StrictStr] = None
|
50
49
|
comment: Optional[StrictStr] = None
|
51
50
|
llm_choice: Optional[StrictStr] = None
|
52
|
-
training_examples: Optional[List[QuestionCompletion]] = None
|
53
51
|
prompt_used: Optional[StrictStr] = None
|
54
52
|
mode: Optional[StrictStr] = None
|
55
53
|
is_input_data_cropped: Optional[StrictBool] = None
|
56
54
|
aggs: Optional[List[AggregationsGroup]] = None
|
57
55
|
expanded_question: Optional[StrictStr] = None
|
56
|
+
prompt_type: Optional[StrictStr] = None
|
58
57
|
status: StrictStr
|
59
|
-
__properties: ClassVar[List[str]] = ["username", "dataset", "jwt", "api_key", "conversation_id", "user", "role", "contents", "message_id", "parent_message_id", "timestamp", "feedback", "origin", "sources", "all_sources", "task_category", "interface_origin", "comment", "llm_choice", "
|
58
|
+
__properties: ClassVar[List[str]] = ["username", "dataset", "jwt", "api_key", "conversation_id", "user", "role", "contents", "message_id", "parent_message_id", "timestamp", "feedback", "origin", "sources", "all_sources", "task_category", "interface_origin", "comment", "llm_choice", "prompt_used", "mode", "is_input_data_cropped", "aggs", "expanded_question", "prompt_type", "status"]
|
60
59
|
|
61
60
|
@field_validator('role')
|
62
61
|
def role_validate_enum(cls, value):
|
@@ -149,13 +148,6 @@ class SocketConversationMessage(BaseModel):
|
|
149
148
|
if _item_all_sources:
|
150
149
|
_items.append(_item_all_sources.to_dict())
|
151
150
|
_dict['all_sources'] = _items
|
152
|
-
# override the default output from pydantic by calling `to_dict()` of each item in training_examples (list)
|
153
|
-
_items = []
|
154
|
-
if self.training_examples:
|
155
|
-
for _item_training_examples in self.training_examples:
|
156
|
-
if _item_training_examples:
|
157
|
-
_items.append(_item_training_examples.to_dict())
|
158
|
-
_dict['training_examples'] = _items
|
159
151
|
# override the default output from pydantic by calling `to_dict()` of each item in aggs (list)
|
160
152
|
_items = []
|
161
153
|
if self.aggs:
|
@@ -194,12 +186,12 @@ class SocketConversationMessage(BaseModel):
|
|
194
186
|
"interface_origin": obj.get("interface_origin"),
|
195
187
|
"comment": obj.get("comment"),
|
196
188
|
"llm_choice": obj.get("llm_choice"),
|
197
|
-
"training_examples": [QuestionCompletion.from_dict(_item) for _item in obj["training_examples"]] if obj.get("training_examples") is not None else None,
|
198
189
|
"prompt_used": obj.get("prompt_used"),
|
199
190
|
"mode": obj.get("mode"),
|
200
191
|
"is_input_data_cropped": obj.get("is_input_data_cropped"),
|
201
192
|
"aggs": [AggregationsGroup.from_dict(_item) for _item in obj["aggs"]] if obj.get("aggs") is not None else None,
|
202
193
|
"expanded_question": obj.get("expanded_question"),
|
194
|
+
"prompt_type": obj.get("prompt_type"),
|
203
195
|
"status": obj.get("status")
|
204
196
|
})
|
205
197
|
return _obj
|