beamlit 0.0.56rc106__py3-none-any.whl → 0.0.57__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.
Files changed (92) hide show
  1. beamlit/agents/chain.py +0 -2
  2. beamlit/agents/chat.py +20 -8
  3. beamlit/agents/decorator.py +112 -99
  4. beamlit/agents/thread.py +5 -9
  5. beamlit/api/agents/delete_agent.py +1 -22
  6. beamlit/api/agents/get_agent.py +1 -22
  7. beamlit/api/agents/get_agent_metrics.py +13 -34
  8. beamlit/api/agents/get_agent_trace_ids.py +44 -14
  9. beamlit/api/agents/{list_agent_history.py → list_agent_revisions.py} +21 -17
  10. beamlit/api/agents/list_agents.py +4 -36
  11. beamlit/api/default/get_trace_ids.py +0 -15
  12. beamlit/api/default/list_mcp_hub_definitions.py +12 -12
  13. beamlit/api/functions/delete_function.py +1 -22
  14. beamlit/api/functions/get_function.py +1 -22
  15. beamlit/api/functions/get_function_metrics.py +13 -34
  16. beamlit/api/functions/get_function_trace_ids.py +44 -14
  17. beamlit/api/functions/{create_function_release.py → list_function_revisions.py} +26 -18
  18. beamlit/api/functions/list_functions.py +4 -36
  19. beamlit/api/knowledgebases/create_knowledgebase.py +4 -4
  20. beamlit/api/knowledgebases/delete_knowledgebase.py +5 -26
  21. beamlit/api/knowledgebases/get_knowledgebase.py +1 -22
  22. beamlit/api/{environments/get_environment_metrics.py → knowledgebases/list_knowledgebase_revisions.py} +34 -34
  23. beamlit/api/knowledgebases/list_knowledgebases.py +4 -36
  24. beamlit/api/models/create_model.py +4 -8
  25. beamlit/api/models/delete_model.py +1 -22
  26. beamlit/api/models/get_model.py +1 -22
  27. beamlit/api/models/get_model_metrics.py +13 -34
  28. beamlit/api/models/get_model_trace_ids.py +44 -14
  29. beamlit/api/models/{release_model.py → list_model_revisions.py} +26 -22
  30. beamlit/api/models/list_models.py +4 -36
  31. beamlit/api/models/update_model.py +4 -8
  32. beamlit/authentication/authentication.py +11 -8
  33. beamlit/authentication/clientcredentials.py +15 -28
  34. beamlit/authentication/credentials.py +2 -7
  35. beamlit/common/settings.py +1 -4
  36. beamlit/deploy/deploy.py +15 -9
  37. beamlit/functions/common.py +16 -16
  38. beamlit/functions/local/local.py +4 -5
  39. beamlit/functions/mcp/client.py +96 -0
  40. beamlit/functions/mcp/mcp.py +56 -43
  41. beamlit/functions/remote/remote.py +9 -11
  42. beamlit/models/__init__.py +8 -38
  43. beamlit/models/agent.py +6 -6
  44. beamlit/models/function.py +6 -6
  45. beamlit/models/knowledgebase.py +6 -6
  46. beamlit/models/last_n_requests_metric.py +0 -9
  47. beamlit/models/model.py +7 -7
  48. beamlit/models/{resource_environment_metrics.py → resource_metrics.py} +20 -26
  49. beamlit/models/{resource_environment_metrics_request_total_per_code.py → resource_metrics_request_total_per_code.py} +5 -5
  50. beamlit/models/{resource_environment_metrics_rps_per_code.py → resource_metrics_rps_per_code.py} +5 -5
  51. beamlit/models/{model_release.py → revision_metadata.py} +20 -20
  52. beamlit/models/runtime.py +2 -2
  53. beamlit/models/workspace.py +0 -9
  54. beamlit/run.py +3 -7
  55. beamlit/serve/app.py +4 -8
  56. {beamlit-0.0.56rc106.dist-info → beamlit-0.0.57.dist-info}/METADATA +2 -1
  57. {beamlit-0.0.56rc106.dist-info → beamlit-0.0.57.dist-info}/RECORD +63 -91
  58. beamlit/api/agents/create_agent_release.py +0 -146
  59. beamlit/api/agents/delete_agent_history.py +0 -155
  60. beamlit/api/agents/get_agent_history.py +0 -155
  61. beamlit/api/agents/put_agent_history.py +0 -181
  62. beamlit/api/environments/__init__.py +0 -0
  63. beamlit/api/environments/create_environment.py +0 -167
  64. beamlit/api/environments/delete_environment.py +0 -154
  65. beamlit/api/environments/get_environment.py +0 -154
  66. beamlit/api/environments/list_environments.py +0 -139
  67. beamlit/api/environments/update_environment.py +0 -180
  68. beamlit/api/generation/__init__.py +0 -0
  69. beamlit/api/generation/run_information_generation_agent.py +0 -168
  70. beamlit/api/history/__init__.py +0 -0
  71. beamlit/api/history/get_agents_history.py +0 -155
  72. beamlit/api/history/list_agents_history.py +0 -131
  73. beamlit/models/agent_history.py +0 -167
  74. beamlit/models/agent_history_event.py +0 -133
  75. beamlit/models/agent_information_request.py +0 -63
  76. beamlit/models/agent_information_response.py +0 -79
  77. beamlit/models/agent_release.py +0 -70
  78. beamlit/models/environment.py +0 -96
  79. beamlit/models/environment_metadata.py +0 -148
  80. beamlit/models/environment_metrics.py +0 -77
  81. beamlit/models/environment_spec.py +0 -63
  82. beamlit/models/function_release.py +0 -70
  83. beamlit/models/knowledgebase_release.py +0 -70
  84. beamlit/models/mcp_hub_artifact.py +0 -188
  85. beamlit/models/mcp_hub_artifact_entrypoint.py +0 -45
  86. beamlit/models/mcp_hub_artifact_form.py +0 -45
  87. /beamlit/api/agents/{get_agent_environment_logs.py → get_agent_logs.py} +0 -0
  88. /beamlit/api/functions/{get_function_environment_logs.py → get_function_logs.py} +0 -0
  89. /beamlit/api/models/{get_model_environment_logs.py → get_model_logs.py} +0 -0
  90. {beamlit-0.0.56rc106.dist-info → beamlit-0.0.57.dist-info}/WHEEL +0 -0
  91. {beamlit-0.0.56rc106.dist-info → beamlit-0.0.57.dist-info}/entry_points.txt +0 -0
  92. {beamlit-0.0.56rc106.dist-info → beamlit-0.0.57.dist-info}/licenses/LICENSE +0 -0
@@ -1,155 +0,0 @@
1
- from http import HTTPStatus
2
- from typing import Any, Optional, Union
3
-
4
- import httpx
5
-
6
- from ... import errors
7
- from ...client import AuthenticatedClient, Client
8
- from ...models.agent_history import AgentHistory
9
- from ...types import Response
10
-
11
-
12
- def _get_kwargs(
13
- request_id: str,
14
- ) -> dict[str, Any]:
15
- _kwargs: dict[str, Any] = {
16
- "method": "get",
17
- "url": f"/history/agents/{request_id}",
18
- }
19
-
20
- return _kwargs
21
-
22
-
23
- def _parse_response(
24
- *, client: Union[AuthenticatedClient, Client], response: httpx.Response
25
- ) -> Optional[list["AgentHistory"]]:
26
- if response.status_code == 200:
27
- response_200 = []
28
- _response_200 = response.json()
29
- for response_200_item_data in _response_200:
30
- response_200_item = AgentHistory.from_dict(response_200_item_data)
31
-
32
- response_200.append(response_200_item)
33
-
34
- return response_200
35
- if client.raise_on_unexpected_status:
36
- raise errors.UnexpectedStatus(response.status_code, response.content)
37
- else:
38
- return None
39
-
40
-
41
- def _build_response(
42
- *, client: Union[AuthenticatedClient, Client], response: httpx.Response
43
- ) -> Response[list["AgentHistory"]]:
44
- return Response(
45
- status_code=HTTPStatus(response.status_code),
46
- content=response.content,
47
- headers=response.headers,
48
- parsed=_parse_response(client=client, response=response),
49
- )
50
-
51
-
52
- def sync_detailed(
53
- request_id: str,
54
- *,
55
- client: AuthenticatedClient,
56
- ) -> Response[list["AgentHistory"]]:
57
- """Get all history for a specific request ID from all agents
58
-
59
- Args:
60
- request_id (str):
61
-
62
- Raises:
63
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
64
- httpx.TimeoutException: If the request takes longer than Client.timeout.
65
-
66
- Returns:
67
- Response[list['AgentHistory']]
68
- """
69
-
70
- kwargs = _get_kwargs(
71
- request_id=request_id,
72
- )
73
-
74
- response = client.get_httpx_client().request(
75
- **kwargs,
76
- )
77
-
78
- return _build_response(client=client, response=response)
79
-
80
-
81
- def sync(
82
- request_id: str,
83
- *,
84
- client: AuthenticatedClient,
85
- ) -> Optional[list["AgentHistory"]]:
86
- """Get all history for a specific request ID from all agents
87
-
88
- Args:
89
- request_id (str):
90
-
91
- Raises:
92
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
93
- httpx.TimeoutException: If the request takes longer than Client.timeout.
94
-
95
- Returns:
96
- list['AgentHistory']
97
- """
98
-
99
- return sync_detailed(
100
- request_id=request_id,
101
- client=client,
102
- ).parsed
103
-
104
-
105
- async def asyncio_detailed(
106
- request_id: str,
107
- *,
108
- client: AuthenticatedClient,
109
- ) -> Response[list["AgentHistory"]]:
110
- """Get all history for a specific request ID from all agents
111
-
112
- Args:
113
- request_id (str):
114
-
115
- Raises:
116
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
117
- httpx.TimeoutException: If the request takes longer than Client.timeout.
118
-
119
- Returns:
120
- Response[list['AgentHistory']]
121
- """
122
-
123
- kwargs = _get_kwargs(
124
- request_id=request_id,
125
- )
126
-
127
- response = await client.get_async_httpx_client().request(**kwargs)
128
-
129
- return _build_response(client=client, response=response)
130
-
131
-
132
- async def asyncio(
133
- request_id: str,
134
- *,
135
- client: AuthenticatedClient,
136
- ) -> Optional[list["AgentHistory"]]:
137
- """Get all history for a specific request ID from all agents
138
-
139
- Args:
140
- request_id (str):
141
-
142
- Raises:
143
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
144
- httpx.TimeoutException: If the request takes longer than Client.timeout.
145
-
146
- Returns:
147
- list['AgentHistory']
148
- """
149
-
150
- return (
151
- await asyncio_detailed(
152
- request_id=request_id,
153
- client=client,
154
- )
155
- ).parsed
@@ -1,131 +0,0 @@
1
- from http import HTTPStatus
2
- from typing import Any, Optional, Union
3
-
4
- import httpx
5
-
6
- from ... import errors
7
- from ...client import AuthenticatedClient, Client
8
- from ...models.agent_history import AgentHistory
9
- from ...types import Response
10
-
11
-
12
- def _get_kwargs() -> dict[str, Any]:
13
- _kwargs: dict[str, Any] = {
14
- "method": "get",
15
- "url": "/history/agents",
16
- }
17
-
18
- return _kwargs
19
-
20
-
21
- def _parse_response(
22
- *, client: Union[AuthenticatedClient, Client], response: httpx.Response
23
- ) -> Optional[list["AgentHistory"]]:
24
- if response.status_code == 200:
25
- response_200 = []
26
- _response_200 = response.json()
27
- for response_200_item_data in _response_200:
28
- response_200_item = AgentHistory.from_dict(response_200_item_data)
29
-
30
- response_200.append(response_200_item)
31
-
32
- return response_200
33
- if client.raise_on_unexpected_status:
34
- raise errors.UnexpectedStatus(response.status_code, response.content)
35
- else:
36
- return None
37
-
38
-
39
- def _build_response(
40
- *, client: Union[AuthenticatedClient, Client], response: httpx.Response
41
- ) -> Response[list["AgentHistory"]]:
42
- return Response(
43
- status_code=HTTPStatus(response.status_code),
44
- content=response.content,
45
- headers=response.headers,
46
- parsed=_parse_response(client=client, response=response),
47
- )
48
-
49
-
50
- def sync_detailed(
51
- *,
52
- client: AuthenticatedClient,
53
- ) -> Response[list["AgentHistory"]]:
54
- """Get all history for all agents
55
-
56
- Raises:
57
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
58
- httpx.TimeoutException: If the request takes longer than Client.timeout.
59
-
60
- Returns:
61
- Response[list['AgentHistory']]
62
- """
63
-
64
- kwargs = _get_kwargs()
65
-
66
- response = client.get_httpx_client().request(
67
- **kwargs,
68
- )
69
-
70
- return _build_response(client=client, response=response)
71
-
72
-
73
- def sync(
74
- *,
75
- client: AuthenticatedClient,
76
- ) -> Optional[list["AgentHistory"]]:
77
- """Get all history for all agents
78
-
79
- Raises:
80
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
81
- httpx.TimeoutException: If the request takes longer than Client.timeout.
82
-
83
- Returns:
84
- list['AgentHistory']
85
- """
86
-
87
- return sync_detailed(
88
- client=client,
89
- ).parsed
90
-
91
-
92
- async def asyncio_detailed(
93
- *,
94
- client: AuthenticatedClient,
95
- ) -> Response[list["AgentHistory"]]:
96
- """Get all history for all agents
97
-
98
- Raises:
99
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
100
- httpx.TimeoutException: If the request takes longer than Client.timeout.
101
-
102
- Returns:
103
- Response[list['AgentHistory']]
104
- """
105
-
106
- kwargs = _get_kwargs()
107
-
108
- response = await client.get_async_httpx_client().request(**kwargs)
109
-
110
- return _build_response(client=client, response=response)
111
-
112
-
113
- async def asyncio(
114
- *,
115
- client: AuthenticatedClient,
116
- ) -> Optional[list["AgentHistory"]]:
117
- """Get all history for all agents
118
-
119
- Raises:
120
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
121
- httpx.TimeoutException: If the request takes longer than Client.timeout.
122
-
123
- Returns:
124
- list['AgentHistory']
125
- """
126
-
127
- return (
128
- await asyncio_detailed(
129
- client=client,
130
- )
131
- ).parsed
@@ -1,167 +0,0 @@
1
- from typing import TYPE_CHECKING, Any, TypeVar, Union
2
-
3
- from attrs import define as _attrs_define
4
- from attrs import field as _attrs_field
5
-
6
- from ..types import UNSET, Unset
7
-
8
- if TYPE_CHECKING:
9
- from ..models.agent_history_event import AgentHistoryEvent
10
-
11
-
12
- T = TypeVar("T", bound="AgentHistory")
13
-
14
-
15
- @_attrs_define
16
- class AgentHistory:
17
- """Agent deployment history
18
-
19
- Attributes:
20
- created_at (Union[Unset, str]): The date and time when the resource was created
21
- updated_at (Union[Unset, str]): The date and time when the resource was updated
22
- agent (Union[Unset, str]): Agent name
23
- end (Union[Unset, str]): End time
24
- environment (Union[Unset, str]): Environment name
25
- events (Union[Unset, list['AgentHistoryEvent']]): Events
26
- request_id (Union[Unset, str]): Request ID
27
- start (Union[Unset, str]): Start time
28
- status (Union[Unset, str]): Status, eg: running, success, failed
29
- took (Union[Unset, int]): Number of milliseconds it took to complete the event
30
- workspace (Union[Unset, str]): The workspace the agent deployment belongs to
31
- """
32
-
33
- created_at: Union[Unset, str] = UNSET
34
- updated_at: Union[Unset, str] = UNSET
35
- agent: Union[Unset, str] = UNSET
36
- end: Union[Unset, str] = UNSET
37
- environment: Union[Unset, str] = UNSET
38
- events: Union[Unset, list["AgentHistoryEvent"]] = UNSET
39
- request_id: Union[Unset, str] = UNSET
40
- start: Union[Unset, str] = UNSET
41
- status: Union[Unset, str] = UNSET
42
- took: Union[Unset, int] = UNSET
43
- workspace: Union[Unset, str] = UNSET
44
- additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
45
-
46
- def to_dict(self) -> dict[str, Any]:
47
- created_at = self.created_at
48
-
49
- updated_at = self.updated_at
50
-
51
- agent = self.agent
52
-
53
- end = self.end
54
-
55
- environment = self.environment
56
-
57
- events: Union[Unset, list[dict[str, Any]]] = UNSET
58
- if not isinstance(self.events, Unset):
59
- events = []
60
- for events_item_data in self.events:
61
- events_item = events_item_data.to_dict()
62
- events.append(events_item)
63
-
64
- request_id = self.request_id
65
-
66
- start = self.start
67
-
68
- status = self.status
69
-
70
- took = self.took
71
-
72
- workspace = self.workspace
73
-
74
- field_dict: dict[str, Any] = {}
75
- field_dict.update(self.additional_properties)
76
- field_dict.update({})
77
- if created_at is not UNSET:
78
- field_dict["createdAt"] = created_at
79
- if updated_at is not UNSET:
80
- field_dict["updatedAt"] = updated_at
81
- if agent is not UNSET:
82
- field_dict["agent"] = agent
83
- if end is not UNSET:
84
- field_dict["end"] = end
85
- if environment is not UNSET:
86
- field_dict["environment"] = environment
87
- if events is not UNSET:
88
- field_dict["events"] = events
89
- if request_id is not UNSET:
90
- field_dict["request_id"] = request_id
91
- if start is not UNSET:
92
- field_dict["start"] = start
93
- if status is not UNSET:
94
- field_dict["status"] = status
95
- if took is not UNSET:
96
- field_dict["took"] = took
97
- if workspace is not UNSET:
98
- field_dict["workspace"] = workspace
99
-
100
- return field_dict
101
-
102
- @classmethod
103
- def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
104
- from ..models.agent_history_event import AgentHistoryEvent
105
-
106
- if not src_dict:
107
- return None
108
- d = src_dict.copy()
109
- created_at = d.pop("createdAt", UNSET)
110
-
111
- updated_at = d.pop("updatedAt", UNSET)
112
-
113
- agent = d.pop("agent", UNSET)
114
-
115
- end = d.pop("end", UNSET)
116
-
117
- environment = d.pop("environment", UNSET)
118
-
119
- events = []
120
- _events = d.pop("events", UNSET)
121
- for events_item_data in _events or []:
122
- events_item = AgentHistoryEvent.from_dict(events_item_data)
123
-
124
- events.append(events_item)
125
-
126
- request_id = d.pop("request_id", UNSET)
127
-
128
- start = d.pop("start", UNSET)
129
-
130
- status = d.pop("status", UNSET)
131
-
132
- took = d.pop("took", UNSET)
133
-
134
- workspace = d.pop("workspace", UNSET)
135
-
136
- agent_history = cls(
137
- created_at=created_at,
138
- updated_at=updated_at,
139
- agent=agent,
140
- end=end,
141
- environment=environment,
142
- events=events,
143
- request_id=request_id,
144
- start=start,
145
- status=status,
146
- took=took,
147
- workspace=workspace,
148
- )
149
-
150
- agent_history.additional_properties = d
151
- return agent_history
152
-
153
- @property
154
- def additional_keys(self) -> list[str]:
155
- return list(self.additional_properties.keys())
156
-
157
- def __getitem__(self, key: str) -> Any:
158
- return self.additional_properties[key]
159
-
160
- def __setitem__(self, key: str, value: Any) -> None:
161
- self.additional_properties[key] = value
162
-
163
- def __delitem__(self, key: str) -> None:
164
- del self.additional_properties[key]
165
-
166
- def __contains__(self, key: str) -> bool:
167
- return key in self.additional_properties
@@ -1,133 +0,0 @@
1
- from typing import Any, TypeVar, Union
2
-
3
- from attrs import define as _attrs_define
4
- from attrs import field as _attrs_field
5
-
6
- from ..types import UNSET, Unset
7
-
8
- T = TypeVar("T", bound="AgentHistoryEvent")
9
-
10
-
11
- @_attrs_define
12
- class AgentHistoryEvent:
13
- """Agent deployment history event
14
-
15
- Attributes:
16
- end (Union[Unset, str]): End time
17
- error (Union[Unset, str]): Error message
18
- name (Union[Unset, str]): Name of the function or agent
19
- parameters (Union[Unset, str]): Parameters
20
- start (Union[Unset, str]): Start time
21
- status (Union[Unset, str]): Status, eg: running, success, failed
22
- sub_function (Union[Unset, str]): Function used in kit if a kit was used
23
- took (Union[Unset, int]): Number of milliseconds it took to complete the event
24
- type_ (Union[Unset, str]): Type, one of function or agent
25
- """
26
-
27
- end: Union[Unset, str] = UNSET
28
- error: Union[Unset, str] = UNSET
29
- name: Union[Unset, str] = UNSET
30
- parameters: Union[Unset, str] = UNSET
31
- start: Union[Unset, str] = UNSET
32
- status: Union[Unset, str] = UNSET
33
- sub_function: Union[Unset, str] = UNSET
34
- took: Union[Unset, int] = UNSET
35
- type_: Union[Unset, str] = UNSET
36
- additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
37
-
38
- def to_dict(self) -> dict[str, Any]:
39
- end = self.end
40
-
41
- error = self.error
42
-
43
- name = self.name
44
-
45
- parameters = self.parameters
46
-
47
- start = self.start
48
-
49
- status = self.status
50
-
51
- sub_function = self.sub_function
52
-
53
- took = self.took
54
-
55
- type_ = self.type_
56
-
57
- field_dict: dict[str, Any] = {}
58
- field_dict.update(self.additional_properties)
59
- field_dict.update({})
60
- if end is not UNSET:
61
- field_dict["end"] = end
62
- if error is not UNSET:
63
- field_dict["error"] = error
64
- if name is not UNSET:
65
- field_dict["name"] = name
66
- if parameters is not UNSET:
67
- field_dict["parameters"] = parameters
68
- if start is not UNSET:
69
- field_dict["start"] = start
70
- if status is not UNSET:
71
- field_dict["status"] = status
72
- if sub_function is not UNSET:
73
- field_dict["subFunction"] = sub_function
74
- if took is not UNSET:
75
- field_dict["took"] = took
76
- if type_ is not UNSET:
77
- field_dict["type"] = type_
78
-
79
- return field_dict
80
-
81
- @classmethod
82
- def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
83
- if not src_dict:
84
- return None
85
- d = src_dict.copy()
86
- end = d.pop("end", UNSET)
87
-
88
- error = d.pop("error", UNSET)
89
-
90
- name = d.pop("name", UNSET)
91
-
92
- parameters = d.pop("parameters", UNSET)
93
-
94
- start = d.pop("start", UNSET)
95
-
96
- status = d.pop("status", UNSET)
97
-
98
- sub_function = d.pop("subFunction", UNSET)
99
-
100
- took = d.pop("took", UNSET)
101
-
102
- type_ = d.pop("type", UNSET)
103
-
104
- agent_history_event = cls(
105
- end=end,
106
- error=error,
107
- name=name,
108
- parameters=parameters,
109
- start=start,
110
- status=status,
111
- sub_function=sub_function,
112
- took=took,
113
- type_=type_,
114
- )
115
-
116
- agent_history_event.additional_properties = d
117
- return agent_history_event
118
-
119
- @property
120
- def additional_keys(self) -> list[str]:
121
- return list(self.additional_properties.keys())
122
-
123
- def __getitem__(self, key: str) -> Any:
124
- return self.additional_properties[key]
125
-
126
- def __setitem__(self, key: str, value: Any) -> None:
127
- self.additional_properties[key] = value
128
-
129
- def __delitem__(self, key: str) -> None:
130
- del self.additional_properties[key]
131
-
132
- def __contains__(self, key: str) -> bool:
133
- return key in self.additional_properties
@@ -1,63 +0,0 @@
1
- from typing import Any, TypeVar, Union, cast
2
-
3
- from attrs import define as _attrs_define
4
- from attrs import field as _attrs_field
5
-
6
- from ..types import UNSET, Unset
7
-
8
- T = TypeVar("T", bound="AgentInformationRequest")
9
-
10
-
11
- @_attrs_define
12
- class AgentInformationRequest:
13
- """generation agent information request
14
-
15
- Attributes:
16
- functions (Union[Unset, list[Any]]): Functions to generate information for
17
- """
18
-
19
- functions: Union[Unset, list[Any]] = UNSET
20
- additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
21
-
22
- def to_dict(self) -> dict[str, Any]:
23
- functions: Union[Unset, list[Any]] = UNSET
24
- if not isinstance(self.functions, Unset):
25
- functions = self.functions
26
-
27
- field_dict: dict[str, Any] = {}
28
- field_dict.update(self.additional_properties)
29
- field_dict.update({})
30
- if functions is not UNSET:
31
- field_dict["functions"] = functions
32
-
33
- return field_dict
34
-
35
- @classmethod
36
- def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
37
- if not src_dict:
38
- return None
39
- d = src_dict.copy()
40
- functions = cast(list[Any], d.pop("functions", UNSET))
41
-
42
- agent_information_request = cls(
43
- functions=functions,
44
- )
45
-
46
- agent_information_request.additional_properties = d
47
- return agent_information_request
48
-
49
- @property
50
- def additional_keys(self) -> list[str]:
51
- return list(self.additional_properties.keys())
52
-
53
- def __getitem__(self, key: str) -> Any:
54
- return self.additional_properties[key]
55
-
56
- def __setitem__(self, key: str, value: Any) -> None:
57
- self.additional_properties[key] = value
58
-
59
- def __delitem__(self, key: str) -> None:
60
- del self.additional_properties[key]
61
-
62
- def __contains__(self, key: str) -> bool:
63
- return key in self.additional_properties