robosystems-client 0.1.15__py3-none-any.whl → 0.1.17__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.
Potentially problematic release.
This version of robosystems-client might be problematic. Click here for more details.
- robosystems_client/api/agent/auto_select_agent.py +246 -0
- robosystems_client/api/agent/batch_process_queries.py +261 -0
- robosystems_client/api/agent/execute_specific_agent.py +258 -0
- robosystems_client/api/agent/get_agent_metadata.py +238 -0
- robosystems_client/api/agent/list_agents.py +246 -0
- robosystems_client/api/agent/recommend_agent.py +255 -0
- robosystems_client/api/auth/forgot_password.py +191 -0
- robosystems_client/api/auth/generate_sso_token.py +18 -0
- robosystems_client/api/auth/get_current_auth_user.py +4 -22
- robosystems_client/api/auth/logout_user.py +17 -17
- robosystems_client/api/auth/{refresh_session.py → refresh_auth_session.py} +21 -21
- robosystems_client/api/auth/resend_verification_email.py +222 -0
- robosystems_client/api/auth/reset_password.py +177 -0
- robosystems_client/api/auth/validate_reset_token.py +171 -0
- robosystems_client/api/auth/verify_email.py +177 -0
- robosystems_client/api/backup/create_backup.py +0 -18
- robosystems_client/api/backup/export_backup.py +0 -18
- robosystems_client/api/backup/get_backup_download_url.py +0 -18
- robosystems_client/api/backup/get_backup_stats.py +0 -18
- robosystems_client/api/backup/list_backups.py +0 -18
- robosystems_client/api/backup/restore_backup.py +0 -18
- robosystems_client/api/connections/create_connection.py +0 -18
- robosystems_client/api/connections/create_link_token.py +0 -18
- robosystems_client/api/connections/delete_connection.py +0 -18
- robosystems_client/api/connections/exchange_link_token.py +0 -18
- robosystems_client/api/connections/get_connection.py +0 -18
- robosystems_client/api/connections/get_connection_options.py +0 -18
- robosystems_client/api/connections/init_o_auth.py +0 -18
- robosystems_client/api/connections/list_connections.py +0 -18
- robosystems_client/api/connections/oauth_callback.py +4 -22
- robosystems_client/api/connections/sync_connection.py +0 -18
- robosystems_client/api/copy/copy_data_to_graph.py +0 -18
- robosystems_client/api/create/create_graph.py +0 -18
- robosystems_client/api/graph_analytics/get_graph_metrics.py +0 -18
- robosystems_client/api/graph_analytics/get_graph_usage_stats.py +0 -18
- robosystems_client/api/graph_billing/get_current_graph_bill.py +0 -18
- robosystems_client/api/graph_billing/get_graph_billing_history.py +0 -18
- robosystems_client/api/graph_billing/get_graph_monthly_bill.py +0 -18
- robosystems_client/api/graph_billing/get_graph_usage_details.py +0 -18
- robosystems_client/api/graph_credits/check_credit_balance.py +14 -28
- robosystems_client/api/graph_credits/check_storage_limits.py +0 -18
- robosystems_client/api/graph_credits/get_credit_summary.py +0 -18
- robosystems_client/api/graph_credits/get_storage_usage.py +0 -18
- robosystems_client/api/graph_credits/list_credit_transactions.py +0 -18
- robosystems_client/api/graph_health/get_database_health.py +0 -18
- robosystems_client/api/graph_info/get_database_info.py +0 -18
- robosystems_client/api/graph_limits/get_graph_limits.py +0 -18
- robosystems_client/api/mcp/call_mcp_tool.py +0 -18
- robosystems_client/api/mcp/list_mcp_tools.py +0 -18
- robosystems_client/api/operations/cancel_operation.py +0 -18
- robosystems_client/api/operations/get_operation_status.py +0 -18
- robosystems_client/api/operations/stream_operation_events.py +0 -18
- robosystems_client/api/query/execute_cypher_query.py +0 -18
- robosystems_client/api/schema/export_graph_schema.py +0 -18
- robosystems_client/api/schema/get_graph_schema_info.py +0 -18
- robosystems_client/api/schema/list_schema_extensions.py +0 -18
- robosystems_client/api/schema/validate_schema.py +0 -18
- robosystems_client/api/subgraphs/create_subgraph.py +0 -18
- robosystems_client/api/subgraphs/delete_subgraph.py +0 -18
- robosystems_client/api/subgraphs/get_subgraph_info.py +0 -18
- robosystems_client/api/subgraphs/get_subgraph_quota.py +0 -18
- robosystems_client/api/subgraphs/list_subgraphs.py +0 -18
- robosystems_client/api/user/create_user_api_key.py +0 -18
- robosystems_client/api/user/get_all_credit_summaries.py +0 -18
- robosystems_client/api/user/get_current_user.py +0 -18
- robosystems_client/api/user/get_user_graphs.py +0 -18
- robosystems_client/api/user/list_user_api_keys.py +0 -18
- robosystems_client/api/user/revoke_user_api_key.py +0 -18
- robosystems_client/api/user/select_user_graph.py +0 -18
- robosystems_client/api/user/update_user.py +0 -18
- robosystems_client/api/user/update_user_api_key.py +0 -18
- robosystems_client/api/user/update_user_password.py +0 -18
- robosystems_client/api/user_analytics/get_detailed_user_analytics.py +0 -18
- robosystems_client/api/user_analytics/get_user_usage_overview.py +0 -18
- robosystems_client/api/user_limits/get_all_shared_repository_limits.py +0 -18
- robosystems_client/api/user_limits/get_shared_repository_limits.py +0 -18
- robosystems_client/api/user_limits/get_user_limits.py +0 -18
- robosystems_client/api/user_limits/get_user_usage.py +0 -18
- robosystems_client/api/user_subscriptions/cancel_shared_repository_subscription.py +0 -18
- robosystems_client/api/user_subscriptions/get_repository_credits.py +0 -18
- robosystems_client/api/user_subscriptions/get_shared_repository_credits.py +0 -18
- robosystems_client/api/user_subscriptions/get_user_shared_subscriptions.py +0 -18
- robosystems_client/api/user_subscriptions/subscribe_to_shared_repository.py +0 -18
- robosystems_client/api/user_subscriptions/upgrade_shared_repository_subscription.py +0 -18
- robosystems_client/models/__init__.py +51 -3
- robosystems_client/models/agent_list_response.py +74 -0
- robosystems_client/models/agent_list_response_agents.py +67 -0
- robosystems_client/models/{credits_summary_response_credits_by_addon_item.py → agent_list_response_agents_additional_property.py} +5 -5
- robosystems_client/models/agent_message.py +35 -1
- robosystems_client/models/agent_metadata_response.py +133 -0
- robosystems_client/models/agent_mode.py +11 -0
- robosystems_client/models/agent_recommendation.py +106 -0
- robosystems_client/models/agent_recommendation_request.py +108 -0
- robosystems_client/models/agent_recommendation_request_context_type_0.py +44 -0
- robosystems_client/models/agent_recommendation_response.py +82 -0
- robosystems_client/models/agent_request.py +110 -6
- robosystems_client/models/agent_response.py +161 -11
- robosystems_client/models/agent_response_error_details_type_0.py +44 -0
- robosystems_client/models/agent_response_tokens_used_type_0.py +44 -0
- robosystems_client/models/auth_response.py +20 -6
- robosystems_client/models/batch_agent_request.py +85 -0
- robosystems_client/models/batch_agent_response.py +90 -0
- robosystems_client/models/credit_summary.py +35 -9
- robosystems_client/models/credits_summary_response.py +47 -21
- robosystems_client/models/credits_summary_response_credits_by_addon_type_0_item.py +44 -0
- robosystems_client/models/custom_schema_definition.py +7 -14
- robosystems_client/models/custom_schema_definition_metadata.py +1 -6
- robosystems_client/models/database_health_response.py +11 -11
- robosystems_client/models/database_info_response.py +13 -14
- robosystems_client/models/email_verification_request.py +60 -0
- robosystems_client/models/error_response.py +4 -8
- robosystems_client/models/forgot_password_request.py +60 -0
- robosystems_client/models/forgot_password_response_forgotpassword.py +44 -0
- robosystems_client/models/graph_metadata.py +4 -5
- robosystems_client/models/health_status.py +2 -2
- robosystems_client/models/repository_credits_response.py +43 -16
- robosystems_client/models/resend_verification_email_response_resendverificationemail.py +44 -0
- robosystems_client/models/reset_password_request.py +68 -0
- robosystems_client/models/reset_password_validate_response.py +82 -0
- robosystems_client/models/schema_export_response.py +5 -8
- robosystems_client/models/schema_validation_request.py +3 -5
- robosystems_client/models/schema_validation_response.py +5 -5
- robosystems_client/models/selection_criteria.py +122 -0
- robosystems_client/models/success_response.py +1 -1
- robosystems_client-0.1.17.dist-info/METADATA +89 -0
- {robosystems_client-0.1.15.dist-info → robosystems_client-0.1.17.dist-info}/RECORD +128 -97
- robosystems_client-0.1.17.dist-info/licenses/LICENSE +21 -0
- robosystems_client/api/agent/query_financial_agent.py +0 -423
- robosystems_client-0.1.15.dist-info/METADATA +0 -302
- {robosystems_client-0.1.15.dist-info → robosystems_client-0.1.17.dist-info}/WHEEL +0 -0
|
@@ -1,13 +1,20 @@
|
|
|
1
|
+
import datetime
|
|
1
2
|
from collections.abc import Mapping
|
|
2
3
|
from typing import TYPE_CHECKING, Any, TypeVar, Union, cast
|
|
3
4
|
|
|
4
5
|
from attrs import define as _attrs_define
|
|
5
6
|
from attrs import field as _attrs_field
|
|
7
|
+
from dateutil.parser import isoparse
|
|
6
8
|
|
|
9
|
+
from ..models.agent_mode import AgentMode
|
|
7
10
|
from ..types import UNSET, Unset
|
|
8
11
|
|
|
9
12
|
if TYPE_CHECKING:
|
|
13
|
+
from ..models.agent_response_error_details_type_0 import (
|
|
14
|
+
AgentResponseErrorDetailsType0,
|
|
15
|
+
)
|
|
10
16
|
from ..models.agent_response_metadata_type_0 import AgentResponseMetadataType0
|
|
17
|
+
from ..models.agent_response_tokens_used_type_0 import AgentResponseTokensUsedType0
|
|
11
18
|
|
|
12
19
|
|
|
13
20
|
T = TypeVar("T", bound="AgentResponse")
|
|
@@ -15,26 +22,47 @@ T = TypeVar("T", bound="AgentResponse")
|
|
|
15
22
|
|
|
16
23
|
@_attrs_define
|
|
17
24
|
class AgentResponse:
|
|
18
|
-
"""Response model for
|
|
25
|
+
"""Response model for agent interactions.
|
|
19
26
|
|
|
20
27
|
Attributes:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
28
|
+
content (str): The agent's response content
|
|
29
|
+
agent_used (str): The agent type that handled the request
|
|
30
|
+
mode_used (AgentMode): Agent execution modes.
|
|
31
|
+
metadata (Union['AgentResponseMetadataType0', None, Unset]): Response metadata including routing info
|
|
32
|
+
tokens_used (Union['AgentResponseTokensUsedType0', None, Unset]): Token usage statistics
|
|
33
|
+
confidence_score (Union[None, Unset, float]): Confidence score of the response
|
|
34
|
+
operation_id (Union[None, Unset, str]): Operation ID for SSE monitoring
|
|
35
|
+
is_partial (Union[Unset, bool]): Whether this is a partial response Default: False.
|
|
36
|
+
error_details (Union['AgentResponseErrorDetailsType0', None, Unset]): Error details if any
|
|
37
|
+
execution_time (Union[None, Unset, float]): Execution time in seconds
|
|
38
|
+
timestamp (Union[Unset, datetime.datetime]): Response timestamp
|
|
26
39
|
"""
|
|
27
40
|
|
|
28
|
-
|
|
41
|
+
content: str
|
|
42
|
+
agent_used: str
|
|
43
|
+
mode_used: AgentMode
|
|
29
44
|
metadata: Union["AgentResponseMetadataType0", None, Unset] = UNSET
|
|
45
|
+
tokens_used: Union["AgentResponseTokensUsedType0", None, Unset] = UNSET
|
|
46
|
+
confidence_score: Union[None, Unset, float] = UNSET
|
|
30
47
|
operation_id: Union[None, Unset, str] = UNSET
|
|
31
48
|
is_partial: Union[Unset, bool] = False
|
|
49
|
+
error_details: Union["AgentResponseErrorDetailsType0", None, Unset] = UNSET
|
|
50
|
+
execution_time: Union[None, Unset, float] = UNSET
|
|
51
|
+
timestamp: Union[Unset, datetime.datetime] = UNSET
|
|
32
52
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
33
53
|
|
|
34
54
|
def to_dict(self) -> dict[str, Any]:
|
|
55
|
+
from ..models.agent_response_error_details_type_0 import (
|
|
56
|
+
AgentResponseErrorDetailsType0,
|
|
57
|
+
)
|
|
35
58
|
from ..models.agent_response_metadata_type_0 import AgentResponseMetadataType0
|
|
59
|
+
from ..models.agent_response_tokens_used_type_0 import AgentResponseTokensUsedType0
|
|
60
|
+
|
|
61
|
+
content = self.content
|
|
36
62
|
|
|
37
|
-
|
|
63
|
+
agent_used = self.agent_used
|
|
64
|
+
|
|
65
|
+
mode_used = self.mode_used.value
|
|
38
66
|
|
|
39
67
|
metadata: Union[None, Unset, dict[str, Any]]
|
|
40
68
|
if isinstance(self.metadata, Unset):
|
|
@@ -44,6 +72,20 @@ class AgentResponse:
|
|
|
44
72
|
else:
|
|
45
73
|
metadata = self.metadata
|
|
46
74
|
|
|
75
|
+
tokens_used: Union[None, Unset, dict[str, Any]]
|
|
76
|
+
if isinstance(self.tokens_used, Unset):
|
|
77
|
+
tokens_used = UNSET
|
|
78
|
+
elif isinstance(self.tokens_used, AgentResponseTokensUsedType0):
|
|
79
|
+
tokens_used = self.tokens_used.to_dict()
|
|
80
|
+
else:
|
|
81
|
+
tokens_used = self.tokens_used
|
|
82
|
+
|
|
83
|
+
confidence_score: Union[None, Unset, float]
|
|
84
|
+
if isinstance(self.confidence_score, Unset):
|
|
85
|
+
confidence_score = UNSET
|
|
86
|
+
else:
|
|
87
|
+
confidence_score = self.confidence_score
|
|
88
|
+
|
|
47
89
|
operation_id: Union[None, Unset, str]
|
|
48
90
|
if isinstance(self.operation_id, Unset):
|
|
49
91
|
operation_id = UNSET
|
|
@@ -52,28 +94,66 @@ class AgentResponse:
|
|
|
52
94
|
|
|
53
95
|
is_partial = self.is_partial
|
|
54
96
|
|
|
97
|
+
error_details: Union[None, Unset, dict[str, Any]]
|
|
98
|
+
if isinstance(self.error_details, Unset):
|
|
99
|
+
error_details = UNSET
|
|
100
|
+
elif isinstance(self.error_details, AgentResponseErrorDetailsType0):
|
|
101
|
+
error_details = self.error_details.to_dict()
|
|
102
|
+
else:
|
|
103
|
+
error_details = self.error_details
|
|
104
|
+
|
|
105
|
+
execution_time: Union[None, Unset, float]
|
|
106
|
+
if isinstance(self.execution_time, Unset):
|
|
107
|
+
execution_time = UNSET
|
|
108
|
+
else:
|
|
109
|
+
execution_time = self.execution_time
|
|
110
|
+
|
|
111
|
+
timestamp: Union[Unset, str] = UNSET
|
|
112
|
+
if not isinstance(self.timestamp, Unset):
|
|
113
|
+
timestamp = self.timestamp.isoformat()
|
|
114
|
+
|
|
55
115
|
field_dict: dict[str, Any] = {}
|
|
56
116
|
field_dict.update(self.additional_properties)
|
|
57
117
|
field_dict.update(
|
|
58
118
|
{
|
|
59
|
-
"
|
|
119
|
+
"content": content,
|
|
120
|
+
"agent_used": agent_used,
|
|
121
|
+
"mode_used": mode_used,
|
|
60
122
|
}
|
|
61
123
|
)
|
|
62
124
|
if metadata is not UNSET:
|
|
63
125
|
field_dict["metadata"] = metadata
|
|
126
|
+
if tokens_used is not UNSET:
|
|
127
|
+
field_dict["tokens_used"] = tokens_used
|
|
128
|
+
if confidence_score is not UNSET:
|
|
129
|
+
field_dict["confidence_score"] = confidence_score
|
|
64
130
|
if operation_id is not UNSET:
|
|
65
131
|
field_dict["operation_id"] = operation_id
|
|
66
132
|
if is_partial is not UNSET:
|
|
67
133
|
field_dict["is_partial"] = is_partial
|
|
134
|
+
if error_details is not UNSET:
|
|
135
|
+
field_dict["error_details"] = error_details
|
|
136
|
+
if execution_time is not UNSET:
|
|
137
|
+
field_dict["execution_time"] = execution_time
|
|
138
|
+
if timestamp is not UNSET:
|
|
139
|
+
field_dict["timestamp"] = timestamp
|
|
68
140
|
|
|
69
141
|
return field_dict
|
|
70
142
|
|
|
71
143
|
@classmethod
|
|
72
144
|
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
145
|
+
from ..models.agent_response_error_details_type_0 import (
|
|
146
|
+
AgentResponseErrorDetailsType0,
|
|
147
|
+
)
|
|
73
148
|
from ..models.agent_response_metadata_type_0 import AgentResponseMetadataType0
|
|
149
|
+
from ..models.agent_response_tokens_used_type_0 import AgentResponseTokensUsedType0
|
|
74
150
|
|
|
75
151
|
d = dict(src_dict)
|
|
76
|
-
|
|
152
|
+
content = d.pop("content")
|
|
153
|
+
|
|
154
|
+
agent_used = d.pop("agent_used")
|
|
155
|
+
|
|
156
|
+
mode_used = AgentMode(d.pop("mode_used"))
|
|
77
157
|
|
|
78
158
|
def _parse_metadata(
|
|
79
159
|
data: object,
|
|
@@ -94,6 +174,34 @@ class AgentResponse:
|
|
|
94
174
|
|
|
95
175
|
metadata = _parse_metadata(d.pop("metadata", UNSET))
|
|
96
176
|
|
|
177
|
+
def _parse_tokens_used(
|
|
178
|
+
data: object,
|
|
179
|
+
) -> Union["AgentResponseTokensUsedType0", None, Unset]:
|
|
180
|
+
if data is None:
|
|
181
|
+
return data
|
|
182
|
+
if isinstance(data, Unset):
|
|
183
|
+
return data
|
|
184
|
+
try:
|
|
185
|
+
if not isinstance(data, dict):
|
|
186
|
+
raise TypeError()
|
|
187
|
+
tokens_used_type_0 = AgentResponseTokensUsedType0.from_dict(data)
|
|
188
|
+
|
|
189
|
+
return tokens_used_type_0
|
|
190
|
+
except: # noqa: E722
|
|
191
|
+
pass
|
|
192
|
+
return cast(Union["AgentResponseTokensUsedType0", None, Unset], data)
|
|
193
|
+
|
|
194
|
+
tokens_used = _parse_tokens_used(d.pop("tokens_used", UNSET))
|
|
195
|
+
|
|
196
|
+
def _parse_confidence_score(data: object) -> Union[None, Unset, float]:
|
|
197
|
+
if data is None:
|
|
198
|
+
return data
|
|
199
|
+
if isinstance(data, Unset):
|
|
200
|
+
return data
|
|
201
|
+
return cast(Union[None, Unset, float], data)
|
|
202
|
+
|
|
203
|
+
confidence_score = _parse_confidence_score(d.pop("confidence_score", UNSET))
|
|
204
|
+
|
|
97
205
|
def _parse_operation_id(data: object) -> Union[None, Unset, str]:
|
|
98
206
|
if data is None:
|
|
99
207
|
return data
|
|
@@ -105,11 +213,53 @@ class AgentResponse:
|
|
|
105
213
|
|
|
106
214
|
is_partial = d.pop("is_partial", UNSET)
|
|
107
215
|
|
|
216
|
+
def _parse_error_details(
|
|
217
|
+
data: object,
|
|
218
|
+
) -> Union["AgentResponseErrorDetailsType0", None, Unset]:
|
|
219
|
+
if data is None:
|
|
220
|
+
return data
|
|
221
|
+
if isinstance(data, Unset):
|
|
222
|
+
return data
|
|
223
|
+
try:
|
|
224
|
+
if not isinstance(data, dict):
|
|
225
|
+
raise TypeError()
|
|
226
|
+
error_details_type_0 = AgentResponseErrorDetailsType0.from_dict(data)
|
|
227
|
+
|
|
228
|
+
return error_details_type_0
|
|
229
|
+
except: # noqa: E722
|
|
230
|
+
pass
|
|
231
|
+
return cast(Union["AgentResponseErrorDetailsType0", None, Unset], data)
|
|
232
|
+
|
|
233
|
+
error_details = _parse_error_details(d.pop("error_details", UNSET))
|
|
234
|
+
|
|
235
|
+
def _parse_execution_time(data: object) -> Union[None, Unset, float]:
|
|
236
|
+
if data is None:
|
|
237
|
+
return data
|
|
238
|
+
if isinstance(data, Unset):
|
|
239
|
+
return data
|
|
240
|
+
return cast(Union[None, Unset, float], data)
|
|
241
|
+
|
|
242
|
+
execution_time = _parse_execution_time(d.pop("execution_time", UNSET))
|
|
243
|
+
|
|
244
|
+
_timestamp = d.pop("timestamp", UNSET)
|
|
245
|
+
timestamp: Union[Unset, datetime.datetime]
|
|
246
|
+
if isinstance(_timestamp, Unset):
|
|
247
|
+
timestamp = UNSET
|
|
248
|
+
else:
|
|
249
|
+
timestamp = isoparse(_timestamp)
|
|
250
|
+
|
|
108
251
|
agent_response = cls(
|
|
109
|
-
|
|
252
|
+
content=content,
|
|
253
|
+
agent_used=agent_used,
|
|
254
|
+
mode_used=mode_used,
|
|
110
255
|
metadata=metadata,
|
|
256
|
+
tokens_used=tokens_used,
|
|
257
|
+
confidence_score=confidence_score,
|
|
111
258
|
operation_id=operation_id,
|
|
112
259
|
is_partial=is_partial,
|
|
260
|
+
error_details=error_details,
|
|
261
|
+
execution_time=execution_time,
|
|
262
|
+
timestamp=timestamp,
|
|
113
263
|
)
|
|
114
264
|
|
|
115
265
|
agent_response.additional_properties = d
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import Any, TypeVar
|
|
3
|
+
|
|
4
|
+
from attrs import define as _attrs_define
|
|
5
|
+
from attrs import field as _attrs_field
|
|
6
|
+
|
|
7
|
+
T = TypeVar("T", bound="AgentResponseErrorDetailsType0")
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@_attrs_define
|
|
11
|
+
class AgentResponseErrorDetailsType0:
|
|
12
|
+
""" """
|
|
13
|
+
|
|
14
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
15
|
+
|
|
16
|
+
def to_dict(self) -> dict[str, Any]:
|
|
17
|
+
field_dict: dict[str, Any] = {}
|
|
18
|
+
field_dict.update(self.additional_properties)
|
|
19
|
+
|
|
20
|
+
return field_dict
|
|
21
|
+
|
|
22
|
+
@classmethod
|
|
23
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
24
|
+
d = dict(src_dict)
|
|
25
|
+
agent_response_error_details_type_0 = cls()
|
|
26
|
+
|
|
27
|
+
agent_response_error_details_type_0.additional_properties = d
|
|
28
|
+
return agent_response_error_details_type_0
|
|
29
|
+
|
|
30
|
+
@property
|
|
31
|
+
def additional_keys(self) -> list[str]:
|
|
32
|
+
return list(self.additional_properties.keys())
|
|
33
|
+
|
|
34
|
+
def __getitem__(self, key: str) -> Any:
|
|
35
|
+
return self.additional_properties[key]
|
|
36
|
+
|
|
37
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
38
|
+
self.additional_properties[key] = value
|
|
39
|
+
|
|
40
|
+
def __delitem__(self, key: str) -> None:
|
|
41
|
+
del self.additional_properties[key]
|
|
42
|
+
|
|
43
|
+
def __contains__(self, key: str) -> bool:
|
|
44
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import Any, TypeVar
|
|
3
|
+
|
|
4
|
+
from attrs import define as _attrs_define
|
|
5
|
+
from attrs import field as _attrs_field
|
|
6
|
+
|
|
7
|
+
T = TypeVar("T", bound="AgentResponseTokensUsedType0")
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@_attrs_define
|
|
11
|
+
class AgentResponseTokensUsedType0:
|
|
12
|
+
""" """
|
|
13
|
+
|
|
14
|
+
additional_properties: dict[str, int] = _attrs_field(init=False, factory=dict)
|
|
15
|
+
|
|
16
|
+
def to_dict(self) -> dict[str, Any]:
|
|
17
|
+
field_dict: dict[str, Any] = {}
|
|
18
|
+
field_dict.update(self.additional_properties)
|
|
19
|
+
|
|
20
|
+
return field_dict
|
|
21
|
+
|
|
22
|
+
@classmethod
|
|
23
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
24
|
+
d = dict(src_dict)
|
|
25
|
+
agent_response_tokens_used_type_0 = cls()
|
|
26
|
+
|
|
27
|
+
agent_response_tokens_used_type_0.additional_properties = d
|
|
28
|
+
return agent_response_tokens_used_type_0
|
|
29
|
+
|
|
30
|
+
@property
|
|
31
|
+
def additional_keys(self) -> list[str]:
|
|
32
|
+
return list(self.additional_properties.keys())
|
|
33
|
+
|
|
34
|
+
def __getitem__(self, key: str) -> int:
|
|
35
|
+
return self.additional_properties[key]
|
|
36
|
+
|
|
37
|
+
def __setitem__(self, key: str, value: int) -> None:
|
|
38
|
+
self.additional_properties[key] = value
|
|
39
|
+
|
|
40
|
+
def __delitem__(self, key: str) -> None:
|
|
41
|
+
del self.additional_properties[key]
|
|
42
|
+
|
|
43
|
+
def __contains__(self, key: str) -> bool:
|
|
44
|
+
return key in self.additional_properties
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
from collections.abc import Mapping
|
|
2
|
-
from typing import TYPE_CHECKING, Any, TypeVar
|
|
2
|
+
from typing import TYPE_CHECKING, Any, TypeVar, Union, cast
|
|
3
3
|
|
|
4
4
|
from attrs import define as _attrs_define
|
|
5
5
|
from attrs import field as _attrs_field
|
|
6
6
|
|
|
7
|
+
from ..types import UNSET, Unset
|
|
8
|
+
|
|
7
9
|
if TYPE_CHECKING:
|
|
8
10
|
from ..models.auth_response_user import AuthResponseUser
|
|
9
11
|
|
|
@@ -18,12 +20,12 @@ class AuthResponse:
|
|
|
18
20
|
Attributes:
|
|
19
21
|
user (AuthResponseUser): User information
|
|
20
22
|
message (str): Success message
|
|
21
|
-
token (str): JWT authentication token
|
|
23
|
+
token (Union[None, Unset, str]): JWT authentication token (optional for cookie-based auth)
|
|
22
24
|
"""
|
|
23
25
|
|
|
24
26
|
user: "AuthResponseUser"
|
|
25
27
|
message: str
|
|
26
|
-
token: str
|
|
28
|
+
token: Union[None, Unset, str] = UNSET
|
|
27
29
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
28
30
|
|
|
29
31
|
def to_dict(self) -> dict[str, Any]:
|
|
@@ -31,7 +33,11 @@ class AuthResponse:
|
|
|
31
33
|
|
|
32
34
|
message = self.message
|
|
33
35
|
|
|
34
|
-
token
|
|
36
|
+
token: Union[None, Unset, str]
|
|
37
|
+
if isinstance(self.token, Unset):
|
|
38
|
+
token = UNSET
|
|
39
|
+
else:
|
|
40
|
+
token = self.token
|
|
35
41
|
|
|
36
42
|
field_dict: dict[str, Any] = {}
|
|
37
43
|
field_dict.update(self.additional_properties)
|
|
@@ -39,9 +45,10 @@ class AuthResponse:
|
|
|
39
45
|
{
|
|
40
46
|
"user": user,
|
|
41
47
|
"message": message,
|
|
42
|
-
"token": token,
|
|
43
48
|
}
|
|
44
49
|
)
|
|
50
|
+
if token is not UNSET:
|
|
51
|
+
field_dict["token"] = token
|
|
45
52
|
|
|
46
53
|
return field_dict
|
|
47
54
|
|
|
@@ -54,7 +61,14 @@ class AuthResponse:
|
|
|
54
61
|
|
|
55
62
|
message = d.pop("message")
|
|
56
63
|
|
|
57
|
-
|
|
64
|
+
def _parse_token(data: object) -> Union[None, Unset, str]:
|
|
65
|
+
if data is None:
|
|
66
|
+
return data
|
|
67
|
+
if isinstance(data, Unset):
|
|
68
|
+
return data
|
|
69
|
+
return cast(Union[None, Unset, str], data)
|
|
70
|
+
|
|
71
|
+
token = _parse_token(d.pop("token", UNSET))
|
|
58
72
|
|
|
59
73
|
auth_response = cls(
|
|
60
74
|
user=user,
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import TYPE_CHECKING, Any, TypeVar, Union
|
|
3
|
+
|
|
4
|
+
from attrs import define as _attrs_define
|
|
5
|
+
from attrs import field as _attrs_field
|
|
6
|
+
|
|
7
|
+
from ..types import UNSET, Unset
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
from ..models.agent_request import AgentRequest
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
T = TypeVar("T", bound="BatchAgentRequest")
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@_attrs_define
|
|
17
|
+
class BatchAgentRequest:
|
|
18
|
+
"""Request for batch processing multiple queries.
|
|
19
|
+
|
|
20
|
+
Attributes:
|
|
21
|
+
queries (list['AgentRequest']): List of queries to process
|
|
22
|
+
parallel (Union[Unset, bool]): Process queries in parallel Default: False.
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
queries: list["AgentRequest"]
|
|
26
|
+
parallel: Union[Unset, bool] = False
|
|
27
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
28
|
+
|
|
29
|
+
def to_dict(self) -> dict[str, Any]:
|
|
30
|
+
queries = []
|
|
31
|
+
for queries_item_data in self.queries:
|
|
32
|
+
queries_item = queries_item_data.to_dict()
|
|
33
|
+
queries.append(queries_item)
|
|
34
|
+
|
|
35
|
+
parallel = self.parallel
|
|
36
|
+
|
|
37
|
+
field_dict: dict[str, Any] = {}
|
|
38
|
+
field_dict.update(self.additional_properties)
|
|
39
|
+
field_dict.update(
|
|
40
|
+
{
|
|
41
|
+
"queries": queries,
|
|
42
|
+
}
|
|
43
|
+
)
|
|
44
|
+
if parallel is not UNSET:
|
|
45
|
+
field_dict["parallel"] = parallel
|
|
46
|
+
|
|
47
|
+
return field_dict
|
|
48
|
+
|
|
49
|
+
@classmethod
|
|
50
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
51
|
+
from ..models.agent_request import AgentRequest
|
|
52
|
+
|
|
53
|
+
d = dict(src_dict)
|
|
54
|
+
queries = []
|
|
55
|
+
_queries = d.pop("queries")
|
|
56
|
+
for queries_item_data in _queries:
|
|
57
|
+
queries_item = AgentRequest.from_dict(queries_item_data)
|
|
58
|
+
|
|
59
|
+
queries.append(queries_item)
|
|
60
|
+
|
|
61
|
+
parallel = d.pop("parallel", UNSET)
|
|
62
|
+
|
|
63
|
+
batch_agent_request = cls(
|
|
64
|
+
queries=queries,
|
|
65
|
+
parallel=parallel,
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
batch_agent_request.additional_properties = d
|
|
69
|
+
return batch_agent_request
|
|
70
|
+
|
|
71
|
+
@property
|
|
72
|
+
def additional_keys(self) -> list[str]:
|
|
73
|
+
return list(self.additional_properties.keys())
|
|
74
|
+
|
|
75
|
+
def __getitem__(self, key: str) -> Any:
|
|
76
|
+
return self.additional_properties[key]
|
|
77
|
+
|
|
78
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
79
|
+
self.additional_properties[key] = value
|
|
80
|
+
|
|
81
|
+
def __delitem__(self, key: str) -> None:
|
|
82
|
+
del self.additional_properties[key]
|
|
83
|
+
|
|
84
|
+
def __contains__(self, key: str) -> bool:
|
|
85
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import TYPE_CHECKING, Any, TypeVar
|
|
3
|
+
|
|
4
|
+
from attrs import define as _attrs_define
|
|
5
|
+
from attrs import field as _attrs_field
|
|
6
|
+
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
from ..models.agent_response import AgentResponse
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T", bound="BatchAgentResponse")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class BatchAgentResponse:
|
|
16
|
+
"""Response for batch processing.
|
|
17
|
+
|
|
18
|
+
Attributes:
|
|
19
|
+
results (list['AgentResponse']): List of agent responses
|
|
20
|
+
total_execution_time (float): Total execution time
|
|
21
|
+
parallel_processed (bool): Whether queries were processed in parallel
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
results: list["AgentResponse"]
|
|
25
|
+
total_execution_time: float
|
|
26
|
+
parallel_processed: bool
|
|
27
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
28
|
+
|
|
29
|
+
def to_dict(self) -> dict[str, Any]:
|
|
30
|
+
results = []
|
|
31
|
+
for results_item_data in self.results:
|
|
32
|
+
results_item = results_item_data.to_dict()
|
|
33
|
+
results.append(results_item)
|
|
34
|
+
|
|
35
|
+
total_execution_time = self.total_execution_time
|
|
36
|
+
|
|
37
|
+
parallel_processed = self.parallel_processed
|
|
38
|
+
|
|
39
|
+
field_dict: dict[str, Any] = {}
|
|
40
|
+
field_dict.update(self.additional_properties)
|
|
41
|
+
field_dict.update(
|
|
42
|
+
{
|
|
43
|
+
"results": results,
|
|
44
|
+
"total_execution_time": total_execution_time,
|
|
45
|
+
"parallel_processed": parallel_processed,
|
|
46
|
+
}
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
return field_dict
|
|
50
|
+
|
|
51
|
+
@classmethod
|
|
52
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
53
|
+
from ..models.agent_response import AgentResponse
|
|
54
|
+
|
|
55
|
+
d = dict(src_dict)
|
|
56
|
+
results = []
|
|
57
|
+
_results = d.pop("results")
|
|
58
|
+
for results_item_data in _results:
|
|
59
|
+
results_item = AgentResponse.from_dict(results_item_data)
|
|
60
|
+
|
|
61
|
+
results.append(results_item)
|
|
62
|
+
|
|
63
|
+
total_execution_time = d.pop("total_execution_time")
|
|
64
|
+
|
|
65
|
+
parallel_processed = d.pop("parallel_processed")
|
|
66
|
+
|
|
67
|
+
batch_agent_response = cls(
|
|
68
|
+
results=results,
|
|
69
|
+
total_execution_time=total_execution_time,
|
|
70
|
+
parallel_processed=parallel_processed,
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
batch_agent_response.additional_properties = d
|
|
74
|
+
return batch_agent_response
|
|
75
|
+
|
|
76
|
+
@property
|
|
77
|
+
def additional_keys(self) -> list[str]:
|
|
78
|
+
return list(self.additional_properties.keys())
|
|
79
|
+
|
|
80
|
+
def __getitem__(self, key: str) -> Any:
|
|
81
|
+
return self.additional_properties[key]
|
|
82
|
+
|
|
83
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
84
|
+
self.additional_properties[key] = value
|
|
85
|
+
|
|
86
|
+
def __delitem__(self, key: str) -> None:
|
|
87
|
+
del self.additional_properties[key]
|
|
88
|
+
|
|
89
|
+
def __contains__(self, key: str) -> bool:
|
|
90
|
+
return key in self.additional_properties
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from collections.abc import Mapping
|
|
2
|
-
from typing import Any, TypeVar, Union
|
|
2
|
+
from typing import Any, TypeVar, Union, cast
|
|
3
3
|
|
|
4
4
|
from attrs import define as _attrs_define
|
|
5
5
|
from attrs import field as _attrs_field
|
|
@@ -21,8 +21,8 @@ class CreditSummary:
|
|
|
21
21
|
rollover_credits (float): Credits rolled over from previous month
|
|
22
22
|
allows_rollover (bool): Whether rollover is allowed
|
|
23
23
|
is_active (bool): Whether credit pool is active
|
|
24
|
-
last_allocation_date (Union[Unset, str]): Last allocation date (ISO format)
|
|
25
|
-
next_allocation_date (Union[Unset, str]): Next allocation date (ISO format)
|
|
24
|
+
last_allocation_date (Union[None, Unset, str]): Last allocation date (ISO format)
|
|
25
|
+
next_allocation_date (Union[None, Unset, str]): Next allocation date (ISO format)
|
|
26
26
|
"""
|
|
27
27
|
|
|
28
28
|
current_balance: float
|
|
@@ -32,8 +32,8 @@ class CreditSummary:
|
|
|
32
32
|
rollover_credits: float
|
|
33
33
|
allows_rollover: bool
|
|
34
34
|
is_active: bool
|
|
35
|
-
last_allocation_date: Union[Unset, str] = UNSET
|
|
36
|
-
next_allocation_date: Union[Unset, str] = UNSET
|
|
35
|
+
last_allocation_date: Union[None, Unset, str] = UNSET
|
|
36
|
+
next_allocation_date: Union[None, Unset, str] = UNSET
|
|
37
37
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
38
38
|
|
|
39
39
|
def to_dict(self) -> dict[str, Any]:
|
|
@@ -51,9 +51,17 @@ class CreditSummary:
|
|
|
51
51
|
|
|
52
52
|
is_active = self.is_active
|
|
53
53
|
|
|
54
|
-
last_allocation_date
|
|
54
|
+
last_allocation_date: Union[None, Unset, str]
|
|
55
|
+
if isinstance(self.last_allocation_date, Unset):
|
|
56
|
+
last_allocation_date = UNSET
|
|
57
|
+
else:
|
|
58
|
+
last_allocation_date = self.last_allocation_date
|
|
55
59
|
|
|
56
|
-
next_allocation_date
|
|
60
|
+
next_allocation_date: Union[None, Unset, str]
|
|
61
|
+
if isinstance(self.next_allocation_date, Unset):
|
|
62
|
+
next_allocation_date = UNSET
|
|
63
|
+
else:
|
|
64
|
+
next_allocation_date = self.next_allocation_date
|
|
57
65
|
|
|
58
66
|
field_dict: dict[str, Any] = {}
|
|
59
67
|
field_dict.update(self.additional_properties)
|
|
@@ -92,9 +100,27 @@ class CreditSummary:
|
|
|
92
100
|
|
|
93
101
|
is_active = d.pop("is_active")
|
|
94
102
|
|
|
95
|
-
|
|
103
|
+
def _parse_last_allocation_date(data: object) -> Union[None, Unset, str]:
|
|
104
|
+
if data is None:
|
|
105
|
+
return data
|
|
106
|
+
if isinstance(data, Unset):
|
|
107
|
+
return data
|
|
108
|
+
return cast(Union[None, Unset, str], data)
|
|
96
109
|
|
|
97
|
-
|
|
110
|
+
last_allocation_date = _parse_last_allocation_date(
|
|
111
|
+
d.pop("last_allocation_date", UNSET)
|
|
112
|
+
)
|
|
113
|
+
|
|
114
|
+
def _parse_next_allocation_date(data: object) -> Union[None, Unset, str]:
|
|
115
|
+
if data is None:
|
|
116
|
+
return data
|
|
117
|
+
if isinstance(data, Unset):
|
|
118
|
+
return data
|
|
119
|
+
return cast(Union[None, Unset, str], data)
|
|
120
|
+
|
|
121
|
+
next_allocation_date = _parse_next_allocation_date(
|
|
122
|
+
d.pop("next_allocation_date", UNSET)
|
|
123
|
+
)
|
|
98
124
|
|
|
99
125
|
credit_summary = cls(
|
|
100
126
|
current_balance=current_balance,
|