qanswer_sdk 3.1508.0__py3-none-any.whl → 3.1510.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 +31 -24
- qanswer_sdk/api/__init__.py +0 -1
- qanswer_sdk/api/admin_api.py +914 -142
- qanswer_sdk/api/ai_assistant_access_rights_api.py +883 -280
- qanswer_sdk/api/ai_assistant_api.py +289 -61
- qanswer_sdk/api/branding_api.py +6 -6
- qanswer_sdk/api/connector_website_api.py +287 -0
- qanswer_sdk/api/connectors_api.py +863 -11
- qanswer_sdk/api/connectors_data_api.py +28 -27
- qanswer_sdk/api/mcp_api.py +1103 -469
- qanswer_sdk/api/payment_api.py +3 -3
- qanswer_sdk/api/socket_api.py +0 -245
- qanswer_sdk/api/task_ai_excel_api.py +288 -0
- qanswer_sdk/api/task_report_copilot_api.py +49 -122
- qanswer_sdk/api/tool_embedder_api.py +552 -1
- qanswer_sdk/api/tool_llm_api.py +1059 -10
- qanswer_sdk/api/unit_organizations_api.py +1240 -165
- qanswer_sdk/api/unit_user_api.py +506 -0
- qanswer_sdk/api_client.py +1 -1
- qanswer_sdk/configuration.py +1 -1
- qanswer_sdk/models/__init__.py +30 -22
- qanswer_sdk/models/access_pdf_payload_model.py +6 -4
- qanswer_sdk/models/add_qn_a_request.py +5 -3
- qanswer_sdk/models/{assistant_template.py → ai_assistant_clone_response.py} +9 -19
- qanswer_sdk/models/ai_assistant_dto.py +4 -2
- qanswer_sdk/models/ai_assistant_filter_dto.py +3 -1
- qanswer_sdk/models/{user_dataset_access_control_origin_header.py → ai_assistant_restricted_domain.py} +8 -8
- qanswer_sdk/models/ai_assistant_share_response.py +93 -0
- qanswer_sdk/models/api_key_mcp_authentication_config.py +2 -2
- qanswer_sdk/models/assistant_template_filter_dto.py +93 -0
- qanswer_sdk/models/{relation_extraction_schema.py → assistant_template_with_tools_selection_dto.py} +26 -24
- qanswer_sdk/models/audio_file_upload_payload.py +4 -2
- qanswer_sdk/models/auto_bot_description_request.py +5 -3
- qanswer_sdk/models/chatbot_chat_payload.py +6 -2
- qanswer_sdk/models/connector_type_dto.py +101 -0
- qanswer_sdk/models/{relation_extraction_data_input.py → connector_type_list_dto.py} +14 -14
- qanswer_sdk/models/conversation_message.py +37 -7
- qanswer_sdk/models/conversation_model.py +8 -2
- qanswer_sdk/models/credits_info_global_dto.py +95 -0
- qanswer_sdk/models/credits_info_organization_dto.py +93 -0
- qanswer_sdk/models/dataset_detail_kg.py +30 -10
- qanswer_sdk/models/dataset_schema.py +5 -1
- qanswer_sdk/models/dataset_update_object.py +8 -2
- qanswer_sdk/models/document_content_update_model.py +4 -2
- qanswer_sdk/models/econsilium_search_index_add_payload.py +3 -1
- qanswer_sdk/models/embedder_create_dto.py +9 -3
- qanswer_sdk/models/embedder_detailed_dto.py +9 -3
- qanswer_sdk/models/embedder_update_dto.py +9 -3
- qanswer_sdk/models/{relation_model.py → embedding_endpoint_import_failure.py} +8 -10
- qanswer_sdk/models/embedding_endpoint_import_response.py +99 -0
- qanswer_sdk/models/es_meta_data.py +98 -0
- qanswer_sdk/models/{get_file_es_meta_data_response.py → es_meta_data_value.py} +7 -11
- qanswer_sdk/models/feedback_update.py +4 -2
- qanswer_sdk/models/file_es_meta_data.py +31 -4
- qanswer_sdk/models/g_drive_download_request.py +3 -1
- qanswer_sdk/models/generate_ai_cells_payload.py +5 -3
- qanswer_sdk/models/highlight_audio_payload_model.py +6 -4
- qanswer_sdk/models/imap_add_payload.py +4 -2
- qanswer_sdk/models/list_socket_events.py +2 -2
- qanswer_sdk/models/llm_consumption.py +2 -2
- qanswer_sdk/models/llm_create_dto.py +25 -3
- qanswer_sdk/models/llm_detailed_dto.py +30 -4
- qanswer_sdk/models/llm_dto.py +18 -2
- qanswer_sdk/models/llm_endpoint.py +25 -3
- qanswer_sdk/models/llm_endpoint_import_failure.py +89 -0
- qanswer_sdk/models/{relation_extraction_data_output.py → llm_endpoint_import_response.py} +20 -16
- qanswer_sdk/models/llm_endpoint_read_input.py +25 -3
- qanswer_sdk/models/llm_endpoint_read_output.py +25 -3
- qanswer_sdk/models/llm_update_dto.py +25 -3
- qanswer_sdk/models/mcp_server.py +153 -0
- qanswer_sdk/models/mcp_server_create.py +4 -2
- qanswer_sdk/models/mcp_server_dto.py +6 -2
- qanswer_sdk/models/mcp_server_update.py +4 -2
- qanswer_sdk/models/mcp_tool.py +124 -0
- qanswer_sdk/models/mcp_tool_description_update.py +6 -4
- qanswer_sdk/models/mcp_tool_dto.py +3 -1
- qanswer_sdk/models/one_drive_download_request.py +3 -1
- qanswer_sdk/models/one_note_download_request.py +3 -1
- qanswer_sdk/models/organization_admin.py +4 -2
- qanswer_sdk/models/organization_filter_dto.py +4 -2
- qanswer_sdk/models/{relation_value_input.py → organization_mcp_server_setting.py} +29 -24
- qanswer_sdk/models/plan_dto.py +16 -4
- qanswer_sdk/models/publication_add_payload.py +4 -2
- qanswer_sdk/models/rag_payload.py +6 -2
- qanswer_sdk/models/report_copilot_generation_from_slots_payload.py +5 -3
- qanswer_sdk/models/report_copilot_refinement_payload.py +5 -3
- qanswer_sdk/models/report_copilot_slot_feedback_update.py +4 -2
- qanswer_sdk/models/report_template.py +3 -1
- qanswer_sdk/models/report_template_create_payload.py +4 -2
- qanswer_sdk/models/report_template_simplified.py +4 -2
- qanswer_sdk/models/report_template_update_payload.py +4 -2
- qanswer_sdk/models/report_templates_search_payload.py +104 -0
- qanswer_sdk/models/search_payload.py +6 -2
- qanswer_sdk/models/share_point_download_request.py +3 -1
- qanswer_sdk/models/socket_conversation_message.py +37 -7
- qanswer_sdk/models/template_toggle_request.py +5 -5
- qanswer_sdk/models/text2_sparql_payload.py +5 -1
- qanswer_sdk/models/thinking_block.py +91 -0
- qanswer_sdk/models/{subject_model.py → update_cells_payload.py} +10 -10
- qanswer_sdk/models/{relation_extraction_configuration.py → update_file_es_meta_data.py} +37 -26
- qanswer_sdk/models/{update_metadata_model.py → update_metadata_model_input.py} +7 -7
- qanswer_sdk/models/{relation_extraction_task_settings_update_payload.py → update_metadata_model_output.py} +14 -12
- qanswer_sdk/models/update_qn_a_pair_request.py +4 -2
- qanswer_sdk/models/{relation_extraction_template_payload.py → update_template_cells_payload.py} +19 -15
- qanswer_sdk/models/user.py +10 -5
- qanswer_sdk/models/user_credits_config_dto.py +95 -0
- qanswer_sdk/models/user_credits_dto.py +104 -0
- qanswer_sdk/models/user_dataset.py +31 -11
- qanswer_sdk/models/{relation_extraction_row_output.py → user_dataset_mcp_tool_selection.py} +33 -26
- qanswer_sdk/models/user_dataset_mcp_tool_selection_dto.py +3 -1
- qanswer_sdk/models/user_filter_dto.py +4 -2
- qanswer_sdk/models/{relation_extraction_row_input.py → user_mcp_tool_selection.py} +31 -26
- qanswer_sdk/models/user_mcp_tool_selection_dto.py +3 -1
- qanswer_sdk/models/user_profile_dto.py +16 -4
- qanswer_sdk/models/{value_model.py → websearch_scraping_site.py} +11 -17
- qanswer_sdk/models/website_add_payload.py +4 -2
- {qanswer_sdk-3.1508.0.dist-info → qanswer_sdk-3.1510.0.dist-info}/METADATA +2 -2
- {qanswer_sdk-3.1508.0.dist-info → qanswer_sdk-3.1510.0.dist-info}/RECORD +119 -112
- qanswer_sdk/api/task_relation_extraction_api.py +0 -3636
- qanswer_sdk/models/export_relation_extraction_table_request.py +0 -97
- qanswer_sdk/models/relation_extraction_payload.py +0 -117
- qanswer_sdk/models/relation_extraction_task_settings.py +0 -125
- qanswer_sdk/models/relation_extraction_task_update.py +0 -125
- qanswer_sdk/models/relation_value_output.py +0 -103
- qanswer_sdk/models/socket_data_extraction.py +0 -109
- {qanswer_sdk-3.1508.0.dist-info → qanswer_sdk-3.1510.0.dist-info}/WHEEL +0 -0
|
@@ -45,10 +45,16 @@ class LLMEndpointReadInput(BaseModel):
|
|
|
45
45
|
guardrail: Optional[GuardrailEndpoint] = None
|
|
46
46
|
retry_params: Optional[RetryParams] = None
|
|
47
47
|
extra_body: Optional[ExtraBody] = None
|
|
48
|
+
vertex_location: Optional[StrictStr] = None
|
|
49
|
+
vertex_credentials: Optional[StrictStr] = None
|
|
48
50
|
tags: Optional[List[StrictStr]] = None
|
|
49
51
|
tool_call_support: Optional[StrictBool] = None
|
|
50
52
|
temperature_support: Optional[StrictBool] = None
|
|
51
53
|
stream_options_support: Optional[StrictBool] = None
|
|
54
|
+
content_items_support: Optional[StrictBool] = None
|
|
55
|
+
reasoning_effort: Optional[StrictStr] = None
|
|
56
|
+
websearch_support: Optional[StrictBool] = None
|
|
57
|
+
skip_ssl_verification: Optional[StrictBool] = None
|
|
52
58
|
display_name: StrictStr
|
|
53
59
|
engine: StrictStr
|
|
54
60
|
api_key: StrictStr
|
|
@@ -58,7 +64,7 @@ class LLMEndpointReadInput(BaseModel):
|
|
|
58
64
|
name: StrictStr
|
|
59
65
|
id: Optional[StrictInt] = None
|
|
60
66
|
context_ranges: Optional[LLMContextRanges] = None
|
|
61
|
-
__properties: ClassVar[List[str]] = ["modality", "provider", "api_version", "aws_access_key_id", "aws_secret_access_key", "aws_region_name", "aws_inference_profile", "description", "onpremise", "sensitivity_label", "guardrail", "retry_params", "extra_body", "tags", "tool_call_support", "temperature_support", "stream_options_support", "display_name", "engine", "api_key", "endpoint_url", "rag_params", "generation_params", "name", "id", "context_ranges"]
|
|
67
|
+
__properties: ClassVar[List[str]] = ["modality", "provider", "api_version", "aws_access_key_id", "aws_secret_access_key", "aws_region_name", "aws_inference_profile", "description", "onpremise", "sensitivity_label", "guardrail", "retry_params", "extra_body", "vertex_location", "vertex_credentials", "tags", "tool_call_support", "temperature_support", "stream_options_support", "content_items_support", "reasoning_effort", "websearch_support", "skip_ssl_verification", "display_name", "engine", "api_key", "endpoint_url", "rag_params", "generation_params", "name", "id", "context_ranges"]
|
|
62
68
|
|
|
63
69
|
@field_validator('modality')
|
|
64
70
|
def modality_validate_enum(cls, value):
|
|
@@ -76,8 +82,18 @@ class LLMEndpointReadInput(BaseModel):
|
|
|
76
82
|
if value is None:
|
|
77
83
|
return value
|
|
78
84
|
|
|
79
|
-
if value not in set(['openai', 'azure', 'bedrock', 'mistral', 'anthropic', 'openrouter', 'ollama']):
|
|
80
|
-
raise ValueError("must be one of enum values ('openai', 'azure', 'bedrock', 'mistral', 'anthropic', 'openrouter', 'ollama')")
|
|
85
|
+
if value not in set(['openai', 'azure', 'bedrock', 'mistral', 'anthropic', 'openrouter', 'gemini', 'ollama', 'vertex_ai']):
|
|
86
|
+
raise ValueError("must be one of enum values ('openai', 'azure', 'bedrock', 'mistral', 'anthropic', 'openrouter', 'gemini', 'ollama', 'vertex_ai')")
|
|
87
|
+
return value
|
|
88
|
+
|
|
89
|
+
@field_validator('reasoning_effort')
|
|
90
|
+
def reasoning_effort_validate_enum(cls, value):
|
|
91
|
+
"""Validates the enum"""
|
|
92
|
+
if value is None:
|
|
93
|
+
return value
|
|
94
|
+
|
|
95
|
+
if value not in set(['none', 'low', 'medium', 'high']):
|
|
96
|
+
raise ValueError("must be one of enum values ('none', 'low', 'medium', 'high')")
|
|
81
97
|
return value
|
|
82
98
|
|
|
83
99
|
model_config = ConfigDict(
|
|
@@ -162,10 +178,16 @@ class LLMEndpointReadInput(BaseModel):
|
|
|
162
178
|
"guardrail": GuardrailEndpoint.from_dict(obj["guardrail"]) if obj.get("guardrail") is not None else None,
|
|
163
179
|
"retry_params": RetryParams.from_dict(obj["retry_params"]) if obj.get("retry_params") is not None else None,
|
|
164
180
|
"extra_body": ExtraBody.from_dict(obj["extra_body"]) if obj.get("extra_body") is not None else None,
|
|
181
|
+
"vertex_location": obj.get("vertex_location"),
|
|
182
|
+
"vertex_credentials": obj.get("vertex_credentials"),
|
|
165
183
|
"tags": obj.get("tags"),
|
|
166
184
|
"tool_call_support": obj.get("tool_call_support"),
|
|
167
185
|
"temperature_support": obj.get("temperature_support"),
|
|
168
186
|
"stream_options_support": obj.get("stream_options_support"),
|
|
187
|
+
"content_items_support": obj.get("content_items_support"),
|
|
188
|
+
"reasoning_effort": obj.get("reasoning_effort"),
|
|
189
|
+
"websearch_support": obj.get("websearch_support"),
|
|
190
|
+
"skip_ssl_verification": obj.get("skip_ssl_verification"),
|
|
169
191
|
"display_name": obj.get("display_name"),
|
|
170
192
|
"engine": obj.get("engine"),
|
|
171
193
|
"api_key": obj.get("api_key"),
|
|
@@ -45,10 +45,16 @@ class LLMEndpointReadOutput(BaseModel):
|
|
|
45
45
|
guardrail: Optional[GuardrailEndpoint] = None
|
|
46
46
|
retry_params: Optional[RetryParams] = None
|
|
47
47
|
extra_body: Optional[ExtraBody] = None
|
|
48
|
+
vertex_location: Optional[StrictStr] = None
|
|
49
|
+
vertex_credentials: Optional[StrictStr] = None
|
|
48
50
|
tags: Optional[List[StrictStr]] = None
|
|
49
51
|
tool_call_support: Optional[StrictBool] = None
|
|
50
52
|
temperature_support: Optional[StrictBool] = None
|
|
51
53
|
stream_options_support: Optional[StrictBool] = None
|
|
54
|
+
content_items_support: Optional[StrictBool] = None
|
|
55
|
+
reasoning_effort: Optional[StrictStr] = None
|
|
56
|
+
websearch_support: Optional[StrictBool] = None
|
|
57
|
+
skip_ssl_verification: Optional[StrictBool] = None
|
|
52
58
|
display_name: StrictStr
|
|
53
59
|
engine: StrictStr
|
|
54
60
|
api_key: StrictStr
|
|
@@ -58,7 +64,7 @@ class LLMEndpointReadOutput(BaseModel):
|
|
|
58
64
|
name: StrictStr
|
|
59
65
|
id: Optional[StrictInt] = None
|
|
60
66
|
context_ranges: Optional[LLMContextRanges] = None
|
|
61
|
-
__properties: ClassVar[List[str]] = ["modality", "provider", "api_version", "aws_access_key_id", "aws_secret_access_key", "aws_region_name", "aws_inference_profile", "description", "onpremise", "sensitivity_label", "guardrail", "retry_params", "extra_body", "tags", "tool_call_support", "temperature_support", "stream_options_support", "display_name", "engine", "api_key", "endpoint_url", "rag_params", "generation_params", "name", "id", "context_ranges"]
|
|
67
|
+
__properties: ClassVar[List[str]] = ["modality", "provider", "api_version", "aws_access_key_id", "aws_secret_access_key", "aws_region_name", "aws_inference_profile", "description", "onpremise", "sensitivity_label", "guardrail", "retry_params", "extra_body", "vertex_location", "vertex_credentials", "tags", "tool_call_support", "temperature_support", "stream_options_support", "content_items_support", "reasoning_effort", "websearch_support", "skip_ssl_verification", "display_name", "engine", "api_key", "endpoint_url", "rag_params", "generation_params", "name", "id", "context_ranges"]
|
|
62
68
|
|
|
63
69
|
@field_validator('modality')
|
|
64
70
|
def modality_validate_enum(cls, value):
|
|
@@ -76,8 +82,18 @@ class LLMEndpointReadOutput(BaseModel):
|
|
|
76
82
|
if value is None:
|
|
77
83
|
return value
|
|
78
84
|
|
|
79
|
-
if value not in set(['openai', 'azure', 'bedrock', 'mistral', 'anthropic', 'openrouter', 'ollama']):
|
|
80
|
-
raise ValueError("must be one of enum values ('openai', 'azure', 'bedrock', 'mistral', 'anthropic', 'openrouter', 'ollama')")
|
|
85
|
+
if value not in set(['openai', 'azure', 'bedrock', 'mistral', 'anthropic', 'openrouter', 'gemini', 'ollama', 'vertex_ai']):
|
|
86
|
+
raise ValueError("must be one of enum values ('openai', 'azure', 'bedrock', 'mistral', 'anthropic', 'openrouter', 'gemini', 'ollama', 'vertex_ai')")
|
|
87
|
+
return value
|
|
88
|
+
|
|
89
|
+
@field_validator('reasoning_effort')
|
|
90
|
+
def reasoning_effort_validate_enum(cls, value):
|
|
91
|
+
"""Validates the enum"""
|
|
92
|
+
if value is None:
|
|
93
|
+
return value
|
|
94
|
+
|
|
95
|
+
if value not in set(['none', 'low', 'medium', 'high']):
|
|
96
|
+
raise ValueError("must be one of enum values ('none', 'low', 'medium', 'high')")
|
|
81
97
|
return value
|
|
82
98
|
|
|
83
99
|
model_config = ConfigDict(
|
|
@@ -162,10 +178,16 @@ class LLMEndpointReadOutput(BaseModel):
|
|
|
162
178
|
"guardrail": GuardrailEndpoint.from_dict(obj["guardrail"]) if obj.get("guardrail") is not None else None,
|
|
163
179
|
"retry_params": RetryParams.from_dict(obj["retry_params"]) if obj.get("retry_params") is not None else None,
|
|
164
180
|
"extra_body": ExtraBody.from_dict(obj["extra_body"]) if obj.get("extra_body") is not None else None,
|
|
181
|
+
"vertex_location": obj.get("vertex_location"),
|
|
182
|
+
"vertex_credentials": obj.get("vertex_credentials"),
|
|
165
183
|
"tags": obj.get("tags"),
|
|
166
184
|
"tool_call_support": obj.get("tool_call_support"),
|
|
167
185
|
"temperature_support": obj.get("temperature_support"),
|
|
168
186
|
"stream_options_support": obj.get("stream_options_support"),
|
|
187
|
+
"content_items_support": obj.get("content_items_support"),
|
|
188
|
+
"reasoning_effort": obj.get("reasoning_effort"),
|
|
189
|
+
"websearch_support": obj.get("websearch_support"),
|
|
190
|
+
"skip_ssl_verification": obj.get("skip_ssl_verification"),
|
|
169
191
|
"display_name": obj.get("display_name"),
|
|
170
192
|
"engine": obj.get("engine"),
|
|
171
193
|
"api_key": obj.get("api_key"),
|
|
@@ -44,10 +44,16 @@ class LlmUpdateDto(BaseModel):
|
|
|
44
44
|
guardrail: Optional[GuardrailEndpoint] = None
|
|
45
45
|
retry_params: Optional[RetryParams] = None
|
|
46
46
|
extra_body: Optional[ExtraBody] = None
|
|
47
|
+
vertex_location: Optional[StrictStr] = None
|
|
48
|
+
vertex_credentials: Optional[StrictStr] = None
|
|
47
49
|
tags: Optional[List[StrictStr]] = None
|
|
48
50
|
tool_call_support: Optional[StrictBool] = None
|
|
49
51
|
temperature_support: Optional[StrictBool] = None
|
|
50
52
|
stream_options_support: Optional[StrictBool] = None
|
|
53
|
+
content_items_support: Optional[StrictBool] = None
|
|
54
|
+
reasoning_effort: Optional[StrictStr] = None
|
|
55
|
+
websearch_support: Optional[StrictBool] = None
|
|
56
|
+
skip_ssl_verification: Optional[StrictBool] = None
|
|
51
57
|
display_name: Optional[StrictStr] = None
|
|
52
58
|
engine: Optional[StrictStr] = None
|
|
53
59
|
api_key: Optional[StrictStr] = None
|
|
@@ -56,7 +62,7 @@ class LlmUpdateDto(BaseModel):
|
|
|
56
62
|
generation_params: Optional[GenerationParams] = None
|
|
57
63
|
cost_input_per_million_token: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="costInputPerMillionToken")
|
|
58
64
|
cost_output_per_million_token: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="costOutputPerMillionToken")
|
|
59
|
-
__properties: ClassVar[List[str]] = ["modality", "provider", "api_version", "aws_access_key_id", "aws_secret_access_key", "aws_region_name", "aws_inference_profile", "description", "onpremise", "sensitivity_label", "guardrail", "retry_params", "extra_body", "tags", "tool_call_support", "temperature_support", "stream_options_support", "display_name", "engine", "api_key", "endpoint_url", "rag_params", "generation_params", "costInputPerMillionToken", "costOutputPerMillionToken"]
|
|
65
|
+
__properties: ClassVar[List[str]] = ["modality", "provider", "api_version", "aws_access_key_id", "aws_secret_access_key", "aws_region_name", "aws_inference_profile", "description", "onpremise", "sensitivity_label", "guardrail", "retry_params", "extra_body", "vertex_location", "vertex_credentials", "tags", "tool_call_support", "temperature_support", "stream_options_support", "content_items_support", "reasoning_effort", "websearch_support", "skip_ssl_verification", "display_name", "engine", "api_key", "endpoint_url", "rag_params", "generation_params", "costInputPerMillionToken", "costOutputPerMillionToken"]
|
|
60
66
|
|
|
61
67
|
@field_validator('modality')
|
|
62
68
|
def modality_validate_enum(cls, value):
|
|
@@ -74,8 +80,18 @@ class LlmUpdateDto(BaseModel):
|
|
|
74
80
|
if value is None:
|
|
75
81
|
return value
|
|
76
82
|
|
|
77
|
-
if value not in set(['openai', 'azure', 'bedrock', 'mistral', 'anthropic', 'openrouter', 'ollama']):
|
|
78
|
-
raise ValueError("must be one of enum values ('openai', 'azure', 'bedrock', 'mistral', 'anthropic', 'openrouter', 'ollama')")
|
|
83
|
+
if value not in set(['openai', 'azure', 'bedrock', 'mistral', 'anthropic', 'openrouter', 'gemini', 'ollama', 'vertex_ai']):
|
|
84
|
+
raise ValueError("must be one of enum values ('openai', 'azure', 'bedrock', 'mistral', 'anthropic', 'openrouter', 'gemini', 'ollama', 'vertex_ai')")
|
|
85
|
+
return value
|
|
86
|
+
|
|
87
|
+
@field_validator('reasoning_effort')
|
|
88
|
+
def reasoning_effort_validate_enum(cls, value):
|
|
89
|
+
"""Validates the enum"""
|
|
90
|
+
if value is None:
|
|
91
|
+
return value
|
|
92
|
+
|
|
93
|
+
if value not in set(['none', 'low', 'medium', 'high']):
|
|
94
|
+
raise ValueError("must be one of enum values ('none', 'low', 'medium', 'high')")
|
|
79
95
|
return value
|
|
80
96
|
|
|
81
97
|
model_config = ConfigDict(
|
|
@@ -157,10 +173,16 @@ class LlmUpdateDto(BaseModel):
|
|
|
157
173
|
"guardrail": GuardrailEndpoint.from_dict(obj["guardrail"]) if obj.get("guardrail") is not None else None,
|
|
158
174
|
"retry_params": RetryParams.from_dict(obj["retry_params"]) if obj.get("retry_params") is not None else None,
|
|
159
175
|
"extra_body": ExtraBody.from_dict(obj["extra_body"]) if obj.get("extra_body") is not None else None,
|
|
176
|
+
"vertex_location": obj.get("vertex_location"),
|
|
177
|
+
"vertex_credentials": obj.get("vertex_credentials"),
|
|
160
178
|
"tags": obj.get("tags"),
|
|
161
179
|
"tool_call_support": obj.get("tool_call_support"),
|
|
162
180
|
"temperature_support": obj.get("temperature_support"),
|
|
163
181
|
"stream_options_support": obj.get("stream_options_support"),
|
|
182
|
+
"content_items_support": obj.get("content_items_support"),
|
|
183
|
+
"reasoning_effort": obj.get("reasoning_effort"),
|
|
184
|
+
"websearch_support": obj.get("websearch_support"),
|
|
185
|
+
"skip_ssl_verification": obj.get("skip_ssl_verification"),
|
|
164
186
|
"display_name": obj.get("display_name"),
|
|
165
187
|
"engine": obj.get("engine"),
|
|
166
188
|
"api_key": obj.get("api_key"),
|
|
@@ -0,0 +1,153 @@
|
|
|
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 datetime import datetime
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from qanswer_sdk.models.logo import Logo
|
|
24
|
+
from qanswer_sdk.models.organization import Organization
|
|
25
|
+
from typing import Optional, Set
|
|
26
|
+
from typing_extensions import Self
|
|
27
|
+
|
|
28
|
+
class McpServer(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
McpServer
|
|
31
|
+
""" # noqa: E501
|
|
32
|
+
id: Optional[StrictInt] = None
|
|
33
|
+
server_uid: Optional[StrictStr] = Field(default=None, alias="serverUid")
|
|
34
|
+
visibility: Optional[StrictStr] = None
|
|
35
|
+
enabled: Optional[StrictBool] = None
|
|
36
|
+
created_by: Optional[User] = Field(default=None, alias="createdBy")
|
|
37
|
+
organization: Optional[Organization] = None
|
|
38
|
+
owner: Optional[User] = None
|
|
39
|
+
logo: Optional[Logo] = None
|
|
40
|
+
created: Optional[datetime] = None
|
|
41
|
+
updated: Optional[datetime] = None
|
|
42
|
+
tools: Optional[List[McpTool]] = None
|
|
43
|
+
organization_mcp_server_settings: Optional[List[OrganizationMcpServerSetting]] = Field(default=None, alias="organizationMcpServerSettings")
|
|
44
|
+
__properties: ClassVar[List[str]] = ["id", "serverUid", "visibility", "enabled", "createdBy", "organization", "owner", "logo", "created", "updated", "tools", "organizationMcpServerSettings"]
|
|
45
|
+
|
|
46
|
+
@field_validator('visibility')
|
|
47
|
+
def visibility_validate_enum(cls, value):
|
|
48
|
+
"""Validates the enum"""
|
|
49
|
+
if value is None:
|
|
50
|
+
return value
|
|
51
|
+
|
|
52
|
+
if value not in set(['SYSTEM', 'ORGANIZATION', 'USER']):
|
|
53
|
+
raise ValueError("must be one of enum values ('SYSTEM', 'ORGANIZATION', 'USER')")
|
|
54
|
+
return value
|
|
55
|
+
|
|
56
|
+
model_config = ConfigDict(
|
|
57
|
+
populate_by_name=True,
|
|
58
|
+
validate_assignment=True,
|
|
59
|
+
protected_namespaces=(),
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
def to_str(self) -> str:
|
|
64
|
+
"""Returns the string representation of the model using alias"""
|
|
65
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
66
|
+
|
|
67
|
+
def to_json(self) -> str:
|
|
68
|
+
"""Returns the JSON representation of the model using alias"""
|
|
69
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
70
|
+
return json.dumps(self.to_dict())
|
|
71
|
+
|
|
72
|
+
@classmethod
|
|
73
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
74
|
+
"""Create an instance of McpServer from a JSON string"""
|
|
75
|
+
return cls.from_dict(json.loads(json_str))
|
|
76
|
+
|
|
77
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
78
|
+
"""Return the dictionary representation of the model using alias.
|
|
79
|
+
|
|
80
|
+
This has the following differences from calling pydantic's
|
|
81
|
+
`self.model_dump(by_alias=True)`:
|
|
82
|
+
|
|
83
|
+
* `None` is only added to the output dict for nullable fields that
|
|
84
|
+
were set at model initialization. Other fields with value `None`
|
|
85
|
+
are ignored.
|
|
86
|
+
"""
|
|
87
|
+
excluded_fields: Set[str] = set([
|
|
88
|
+
])
|
|
89
|
+
|
|
90
|
+
_dict = self.model_dump(
|
|
91
|
+
by_alias=True,
|
|
92
|
+
exclude=excluded_fields,
|
|
93
|
+
exclude_none=True,
|
|
94
|
+
)
|
|
95
|
+
# override the default output from pydantic by calling `to_dict()` of created_by
|
|
96
|
+
if self.created_by:
|
|
97
|
+
_dict['createdBy'] = self.created_by.to_dict()
|
|
98
|
+
# override the default output from pydantic by calling `to_dict()` of organization
|
|
99
|
+
if self.organization:
|
|
100
|
+
_dict['organization'] = self.organization.to_dict()
|
|
101
|
+
# override the default output from pydantic by calling `to_dict()` of owner
|
|
102
|
+
if self.owner:
|
|
103
|
+
_dict['owner'] = self.owner.to_dict()
|
|
104
|
+
# override the default output from pydantic by calling `to_dict()` of logo
|
|
105
|
+
if self.logo:
|
|
106
|
+
_dict['logo'] = self.logo.to_dict()
|
|
107
|
+
# override the default output from pydantic by calling `to_dict()` of each item in tools (list)
|
|
108
|
+
_items = []
|
|
109
|
+
if self.tools:
|
|
110
|
+
for _item_tools in self.tools:
|
|
111
|
+
if _item_tools:
|
|
112
|
+
_items.append(_item_tools.to_dict())
|
|
113
|
+
_dict['tools'] = _items
|
|
114
|
+
# override the default output from pydantic by calling `to_dict()` of each item in organization_mcp_server_settings (list)
|
|
115
|
+
_items = []
|
|
116
|
+
if self.organization_mcp_server_settings:
|
|
117
|
+
for _item_organization_mcp_server_settings in self.organization_mcp_server_settings:
|
|
118
|
+
if _item_organization_mcp_server_settings:
|
|
119
|
+
_items.append(_item_organization_mcp_server_settings.to_dict())
|
|
120
|
+
_dict['organizationMcpServerSettings'] = _items
|
|
121
|
+
return _dict
|
|
122
|
+
|
|
123
|
+
@classmethod
|
|
124
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
125
|
+
"""Create an instance of McpServer from a dict"""
|
|
126
|
+
if obj is None:
|
|
127
|
+
return None
|
|
128
|
+
|
|
129
|
+
if not isinstance(obj, dict):
|
|
130
|
+
return cls.model_validate(obj)
|
|
131
|
+
|
|
132
|
+
_obj = cls.model_validate({
|
|
133
|
+
"id": obj.get("id"),
|
|
134
|
+
"serverUid": obj.get("serverUid"),
|
|
135
|
+
"visibility": obj.get("visibility"),
|
|
136
|
+
"enabled": obj.get("enabled"),
|
|
137
|
+
"createdBy": User.from_dict(obj["createdBy"]) if obj.get("createdBy") is not None else None,
|
|
138
|
+
"organization": Organization.from_dict(obj["organization"]) if obj.get("organization") is not None else None,
|
|
139
|
+
"owner": User.from_dict(obj["owner"]) if obj.get("owner") is not None else None,
|
|
140
|
+
"logo": Logo.from_dict(obj["logo"]) if obj.get("logo") is not None else None,
|
|
141
|
+
"created": obj.get("created"),
|
|
142
|
+
"updated": obj.get("updated"),
|
|
143
|
+
"tools": [McpTool.from_dict(_item) for _item in obj["tools"]] if obj.get("tools") is not None else None,
|
|
144
|
+
"organizationMcpServerSettings": [OrganizationMcpServerSetting.from_dict(_item) for _item in obj["organizationMcpServerSettings"]] if obj.get("organizationMcpServerSettings") is not None else None
|
|
145
|
+
})
|
|
146
|
+
return _obj
|
|
147
|
+
|
|
148
|
+
from qanswer_sdk.models.mcp_tool import McpTool
|
|
149
|
+
from qanswer_sdk.models.organization_mcp_server_setting import OrganizationMcpServerSetting
|
|
150
|
+
from qanswer_sdk.models.user import User
|
|
151
|
+
# TODO: Rewrite to not use raise_errors
|
|
152
|
+
McpServer.model_rebuild(raise_errors=False)
|
|
153
|
+
|
|
@@ -32,7 +32,8 @@ class MCPServerCreate(BaseModel):
|
|
|
32
32
|
transport: Optional[StrictStr] = Field(default=None, description="Transport type")
|
|
33
33
|
authentication_type: Optional[StrictStr] = Field(default=None, description="Authentication type")
|
|
34
34
|
authentication_config: Optional[Dict[str, Dict[str, Any]]] = Field(default=None, description="Authentication configuration")
|
|
35
|
-
|
|
35
|
+
custom_headers: Optional[Dict[str, StrictStr]] = Field(default=None, description="Custom headers for MCP server connections")
|
|
36
|
+
__properties: ClassVar[List[str]] = ["name", "description", "server_url", "transport", "authentication_type", "authentication_config", "custom_headers"]
|
|
36
37
|
|
|
37
38
|
@field_validator('transport')
|
|
38
39
|
def transport_validate_enum(cls, value):
|
|
@@ -110,7 +111,8 @@ class MCPServerCreate(BaseModel):
|
|
|
110
111
|
"server_url": obj.get("server_url"),
|
|
111
112
|
"transport": obj.get("transport"),
|
|
112
113
|
"authentication_type": obj.get("authentication_type"),
|
|
113
|
-
"authentication_config": obj.get("authentication_config")
|
|
114
|
+
"authentication_config": obj.get("authentication_config"),
|
|
115
|
+
"custom_headers": obj.get("custom_headers")
|
|
114
116
|
})
|
|
115
117
|
return _obj
|
|
116
118
|
|
|
@@ -32,6 +32,7 @@ class McpServerDto(BaseModel):
|
|
|
32
32
|
transport: Optional[StrictStr] = Field(default=None, description="Transport type")
|
|
33
33
|
authentication_type: Optional[StrictStr] = Field(default=None, description="Authentication type")
|
|
34
34
|
authentication_config: Optional[Dict[str, Dict[str, Any]]] = Field(default=None, description="Authentication configuration")
|
|
35
|
+
custom_headers: Optional[Dict[str, StrictStr]] = Field(default=None, description="Custom headers for MCP server connections")
|
|
35
36
|
uid: StrictStr = Field(description="Server UID")
|
|
36
37
|
created_at: StrictStr = Field(description="Creation timestamp")
|
|
37
38
|
updated_at: StrictStr = Field(description="Last update timestamp")
|
|
@@ -42,7 +43,8 @@ class McpServerDto(BaseModel):
|
|
|
42
43
|
can_modify: Optional[StrictBool] = Field(default=None, alias="canModify")
|
|
43
44
|
organization_id: Optional[StrictInt] = Field(default=None, alias="organizationId")
|
|
44
45
|
organization_name: Optional[StrictStr] = Field(default=None, alias="organizationName")
|
|
45
|
-
|
|
46
|
+
organization_enabled: Optional[StrictBool] = Field(default=None, alias="organizationEnabled")
|
|
47
|
+
__properties: ClassVar[List[str]] = ["name", "description", "server_url", "transport", "authentication_type", "authentication_config", "custom_headers", "uid", "created_at", "updated_at", "callback_link", "number_of_connections", "visibility", "enabled", "canModify", "organizationId", "organizationName", "organizationEnabled"]
|
|
46
48
|
|
|
47
49
|
@field_validator('transport')
|
|
48
50
|
def transport_validate_enum(cls, value):
|
|
@@ -131,6 +133,7 @@ class McpServerDto(BaseModel):
|
|
|
131
133
|
"transport": obj.get("transport"),
|
|
132
134
|
"authentication_type": obj.get("authentication_type"),
|
|
133
135
|
"authentication_config": obj.get("authentication_config"),
|
|
136
|
+
"custom_headers": obj.get("custom_headers"),
|
|
134
137
|
"uid": obj.get("uid"),
|
|
135
138
|
"created_at": obj.get("created_at"),
|
|
136
139
|
"updated_at": obj.get("updated_at"),
|
|
@@ -140,7 +143,8 @@ class McpServerDto(BaseModel):
|
|
|
140
143
|
"enabled": obj.get("enabled"),
|
|
141
144
|
"canModify": obj.get("canModify"),
|
|
142
145
|
"organizationId": obj.get("organizationId"),
|
|
143
|
-
"organizationName": obj.get("organizationName")
|
|
146
|
+
"organizationName": obj.get("organizationName"),
|
|
147
|
+
"organizationEnabled": obj.get("organizationEnabled")
|
|
144
148
|
})
|
|
145
149
|
return _obj
|
|
146
150
|
|
|
@@ -32,7 +32,8 @@ class MCPServerUpdate(BaseModel):
|
|
|
32
32
|
transport: Optional[StrictStr] = Field(default=None, description="Transport type")
|
|
33
33
|
authentication_type: Optional[StrictStr] = Field(default=None, description="Authentication type")
|
|
34
34
|
authentication_config: Optional[Dict[str, Dict[str, Any]]] = Field(default=None, description="Authentication configuration")
|
|
35
|
-
|
|
35
|
+
custom_headers: Optional[Dict[str, StrictStr]] = Field(default=None, description="Custom headers for MCP server connections")
|
|
36
|
+
__properties: ClassVar[List[str]] = ["name", "description", "server_url", "transport", "authentication_type", "authentication_config", "custom_headers"]
|
|
36
37
|
|
|
37
38
|
@field_validator('transport')
|
|
38
39
|
def transport_validate_enum(cls, value):
|
|
@@ -110,7 +111,8 @@ class MCPServerUpdate(BaseModel):
|
|
|
110
111
|
"server_url": obj.get("server_url"),
|
|
111
112
|
"transport": obj.get("transport"),
|
|
112
113
|
"authentication_type": obj.get("authentication_type"),
|
|
113
|
-
"authentication_config": obj.get("authentication_config")
|
|
114
|
+
"authentication_config": obj.get("authentication_config"),
|
|
115
|
+
"custom_headers": obj.get("custom_headers")
|
|
114
116
|
})
|
|
115
117
|
return _obj
|
|
116
118
|
|
|
@@ -0,0 +1,124 @@
|
|
|
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 datetime import datetime
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class McpTool(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
McpTool
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
id: Optional[StrictInt] = None
|
|
31
|
+
tool_uid: Optional[StrictStr] = Field(default=None, alias="toolUid")
|
|
32
|
+
enabled: Optional[StrictBool] = None
|
|
33
|
+
mcp_server: Optional[McpServer] = Field(default=None, alias="mcpServer")
|
|
34
|
+
created: Optional[datetime] = None
|
|
35
|
+
updated: Optional[datetime] = None
|
|
36
|
+
user_selections: Optional[List[UserMcpToolSelection]] = Field(default=None, alias="userSelections")
|
|
37
|
+
assistant_selections: Optional[List[UserDatasetMcpToolSelection]] = Field(default=None, alias="assistantSelections")
|
|
38
|
+
__properties: ClassVar[List[str]] = ["id", "toolUid", "enabled", "mcpServer", "created", "updated", "userSelections", "assistantSelections"]
|
|
39
|
+
|
|
40
|
+
model_config = ConfigDict(
|
|
41
|
+
populate_by_name=True,
|
|
42
|
+
validate_assignment=True,
|
|
43
|
+
protected_namespaces=(),
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def to_str(self) -> str:
|
|
48
|
+
"""Returns the string representation of the model using alias"""
|
|
49
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
50
|
+
|
|
51
|
+
def to_json(self) -> str:
|
|
52
|
+
"""Returns the JSON representation of the model using alias"""
|
|
53
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
54
|
+
return json.dumps(self.to_dict())
|
|
55
|
+
|
|
56
|
+
@classmethod
|
|
57
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
58
|
+
"""Create an instance of McpTool from a JSON string"""
|
|
59
|
+
return cls.from_dict(json.loads(json_str))
|
|
60
|
+
|
|
61
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
62
|
+
"""Return the dictionary representation of the model using alias.
|
|
63
|
+
|
|
64
|
+
This has the following differences from calling pydantic's
|
|
65
|
+
`self.model_dump(by_alias=True)`:
|
|
66
|
+
|
|
67
|
+
* `None` is only added to the output dict for nullable fields that
|
|
68
|
+
were set at model initialization. Other fields with value `None`
|
|
69
|
+
are ignored.
|
|
70
|
+
"""
|
|
71
|
+
excluded_fields: Set[str] = set([
|
|
72
|
+
])
|
|
73
|
+
|
|
74
|
+
_dict = self.model_dump(
|
|
75
|
+
by_alias=True,
|
|
76
|
+
exclude=excluded_fields,
|
|
77
|
+
exclude_none=True,
|
|
78
|
+
)
|
|
79
|
+
# override the default output from pydantic by calling `to_dict()` of mcp_server
|
|
80
|
+
if self.mcp_server:
|
|
81
|
+
_dict['mcpServer'] = self.mcp_server.to_dict()
|
|
82
|
+
# override the default output from pydantic by calling `to_dict()` of each item in user_selections (list)
|
|
83
|
+
_items = []
|
|
84
|
+
if self.user_selections:
|
|
85
|
+
for _item_user_selections in self.user_selections:
|
|
86
|
+
if _item_user_selections:
|
|
87
|
+
_items.append(_item_user_selections.to_dict())
|
|
88
|
+
_dict['userSelections'] = _items
|
|
89
|
+
# override the default output from pydantic by calling `to_dict()` of each item in assistant_selections (list)
|
|
90
|
+
_items = []
|
|
91
|
+
if self.assistant_selections:
|
|
92
|
+
for _item_assistant_selections in self.assistant_selections:
|
|
93
|
+
if _item_assistant_selections:
|
|
94
|
+
_items.append(_item_assistant_selections.to_dict())
|
|
95
|
+
_dict['assistantSelections'] = _items
|
|
96
|
+
return _dict
|
|
97
|
+
|
|
98
|
+
@classmethod
|
|
99
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
100
|
+
"""Create an instance of McpTool from a dict"""
|
|
101
|
+
if obj is None:
|
|
102
|
+
return None
|
|
103
|
+
|
|
104
|
+
if not isinstance(obj, dict):
|
|
105
|
+
return cls.model_validate(obj)
|
|
106
|
+
|
|
107
|
+
_obj = cls.model_validate({
|
|
108
|
+
"id": obj.get("id"),
|
|
109
|
+
"toolUid": obj.get("toolUid"),
|
|
110
|
+
"enabled": obj.get("enabled"),
|
|
111
|
+
"mcpServer": McpServer.from_dict(obj["mcpServer"]) if obj.get("mcpServer") is not None else None,
|
|
112
|
+
"created": obj.get("created"),
|
|
113
|
+
"updated": obj.get("updated"),
|
|
114
|
+
"userSelections": [UserMcpToolSelection.from_dict(_item) for _item in obj["userSelections"]] if obj.get("userSelections") is not None else None,
|
|
115
|
+
"assistantSelections": [UserDatasetMcpToolSelection.from_dict(_item) for _item in obj["assistantSelections"]] if obj.get("assistantSelections") is not None else None
|
|
116
|
+
})
|
|
117
|
+
return _obj
|
|
118
|
+
|
|
119
|
+
from qanswer_sdk.models.mcp_server import McpServer
|
|
120
|
+
from qanswer_sdk.models.user_dataset_mcp_tool_selection import UserDatasetMcpToolSelection
|
|
121
|
+
from qanswer_sdk.models.user_mcp_tool_selection import UserMcpToolSelection
|
|
122
|
+
# TODO: Rewrite to not use raise_errors
|
|
123
|
+
McpTool.model_rebuild(raise_errors=False)
|
|
124
|
+
|
|
@@ -18,7 +18,7 @@ import re # noqa: F401
|
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, Field, 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
|
|
|
@@ -26,8 +26,9 @@ class MCPToolDescriptionUpdate(BaseModel):
|
|
|
26
26
|
"""
|
|
27
27
|
MCPToolDescriptionUpdate
|
|
28
28
|
""" # noqa: E501
|
|
29
|
-
description: StrictStr = Field(description="New tool description")
|
|
30
|
-
|
|
29
|
+
description: Optional[StrictStr] = Field(default=None, description="New tool description")
|
|
30
|
+
response_format_prompt: Optional[StrictStr] = Field(default=None, description="Prompt for formatting tool response")
|
|
31
|
+
__properties: ClassVar[List[str]] = ["description", "response_format_prompt"]
|
|
31
32
|
|
|
32
33
|
model_config = ConfigDict(
|
|
33
34
|
populate_by_name=True,
|
|
@@ -80,7 +81,8 @@ class MCPToolDescriptionUpdate(BaseModel):
|
|
|
80
81
|
return cls.model_validate(obj)
|
|
81
82
|
|
|
82
83
|
_obj = cls.model_validate({
|
|
83
|
-
"description": obj.get("description")
|
|
84
|
+
"description": obj.get("description"),
|
|
85
|
+
"response_format_prompt": obj.get("response_format_prompt")
|
|
84
86
|
})
|
|
85
87
|
return _obj
|
|
86
88
|
|
|
@@ -29,6 +29,7 @@ class McpToolDto(BaseModel):
|
|
|
29
29
|
name: StrictStr = Field(description="Tool name")
|
|
30
30
|
title: Optional[StrictStr] = Field(default=None, description="Tool title")
|
|
31
31
|
description: Optional[StrictStr] = Field(default=None, description="Tool description")
|
|
32
|
+
response_format_prompt: Optional[StrictStr] = Field(default=None, description="Prompt for formatting tool response")
|
|
32
33
|
input_schema: Optional[Dict[str, Dict[str, Any]]] = Field(default=None, description="Input schema for the tool")
|
|
33
34
|
output_schema: Optional[Dict[str, Dict[str, Any]]] = Field(default=None, description="Output schema for the tool")
|
|
34
35
|
icons: Optional[Dict[str, Dict[str, Any]]] = Field(default=None, description="Tool icons")
|
|
@@ -43,7 +44,7 @@ class McpToolDto(BaseModel):
|
|
|
43
44
|
selection_enabled: Optional[StrictBool] = Field(default=None, alias="selectionEnabled")
|
|
44
45
|
ask_for_confirmation: Optional[StrictBool] = Field(default=None, alias="askForConfirmation")
|
|
45
46
|
server_name: Optional[StrictStr] = Field(default=None, alias="serverName")
|
|
46
|
-
__properties: ClassVar[List[str]] = ["name", "title", "description", "input_schema", "output_schema", "icons", "annotations", "meta", "is_enabled", "uid", "server_uid", "created_at", "updated_at", "selected", "selectionEnabled", "askForConfirmation", "serverName"]
|
|
47
|
+
__properties: ClassVar[List[str]] = ["name", "title", "description", "response_format_prompt", "input_schema", "output_schema", "icons", "annotations", "meta", "is_enabled", "uid", "server_uid", "created_at", "updated_at", "selected", "selectionEnabled", "askForConfirmation", "serverName"]
|
|
47
48
|
|
|
48
49
|
model_config = ConfigDict(
|
|
49
50
|
populate_by_name=True,
|
|
@@ -99,6 +100,7 @@ class McpToolDto(BaseModel):
|
|
|
99
100
|
"name": obj.get("name"),
|
|
100
101
|
"title": obj.get("title"),
|
|
101
102
|
"description": obj.get("description"),
|
|
103
|
+
"response_format_prompt": obj.get("response_format_prompt"),
|
|
102
104
|
"input_schema": obj.get("input_schema"),
|
|
103
105
|
"output_schema": obj.get("output_schema"),
|
|
104
106
|
"icons": obj.get("icons"),
|
|
@@ -32,8 +32,9 @@ class OneDriveDownloadRequest(BaseModel):
|
|
|
32
32
|
account_id: Optional[StrictStr] = None
|
|
33
33
|
connector_id: StrictInt
|
|
34
34
|
quota: Optional[StrictInt] = Field(default=None, description="Quota of the user")
|
|
35
|
+
additional_fields: Optional[Dict[str, Any]] = None
|
|
35
36
|
ids: OneDriveDownloadByIds
|
|
36
|
-
__properties: ClassVar[List[str]] = ["username", "dataset", "account_id", "connector_id", "quota", "ids"]
|
|
37
|
+
__properties: ClassVar[List[str]] = ["username", "dataset", "account_id", "connector_id", "quota", "additional_fields", "ids"]
|
|
37
38
|
|
|
38
39
|
model_config = ConfigDict(
|
|
39
40
|
populate_by_name=True,
|
|
@@ -94,6 +95,7 @@ class OneDriveDownloadRequest(BaseModel):
|
|
|
94
95
|
"account_id": obj.get("account_id"),
|
|
95
96
|
"connector_id": obj.get("connector_id"),
|
|
96
97
|
"quota": obj.get("quota"),
|
|
98
|
+
"additional_fields": obj.get("additional_fields"),
|
|
97
99
|
"ids": OneDriveDownloadByIds.from_dict(obj["ids"]) if obj.get("ids") is not None else None
|
|
98
100
|
})
|
|
99
101
|
return _obj
|