beamlit 0.0.56rc107__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 -46
  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.56rc107.dist-info → beamlit-0.0.57.dist-info}/METADATA +2 -1
  57. {beamlit-0.0.56rc107.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.56rc107.dist-info → beamlit-0.0.57.dist-info}/WHEEL +0 -0
  91. {beamlit-0.0.56rc107.dist-info → beamlit-0.0.57.dist-info}/entry_points.txt +0 -0
  92. {beamlit-0.0.56rc107.dist-info → beamlit-0.0.57.dist-info}/licenses/LICENSE +0 -0
@@ -6,23 +6,13 @@ import httpx
6
6
  from ... import errors
7
7
  from ...client import AuthenticatedClient, Client
8
8
  from ...models.knowledgebase import Knowledgebase
9
- from ...types import UNSET, Response, Unset
9
+ from ...types import Response
10
10
 
11
11
 
12
- def _get_kwargs(
13
- *,
14
- environment: Union[Unset, str] = UNSET,
15
- ) -> dict[str, Any]:
16
- params: dict[str, Any] = {}
17
-
18
- params["environment"] = environment
19
-
20
- params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
21
-
12
+ def _get_kwargs() -> dict[str, Any]:
22
13
  _kwargs: dict[str, Any] = {
23
14
  "method": "get",
24
15
  "url": "/knowledgebases",
25
- "params": params,
26
16
  }
27
17
 
28
18
  return _kwargs
@@ -60,15 +50,11 @@ def _build_response(
60
50
  def sync_detailed(
61
51
  *,
62
52
  client: AuthenticatedClient,
63
- environment: Union[Unset, str] = UNSET,
64
53
  ) -> Response[list["Knowledgebase"]]:
65
54
  """List knowledgebases
66
55
 
67
56
  Returns a list of all knowledgebases in the workspace.
68
57
 
69
- Args:
70
- environment (Union[Unset, str]):
71
-
72
58
  Raises:
73
59
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
74
60
  httpx.TimeoutException: If the request takes longer than Client.timeout.
@@ -77,9 +63,7 @@ def sync_detailed(
77
63
  Response[list['Knowledgebase']]
78
64
  """
79
65
 
80
- kwargs = _get_kwargs(
81
- environment=environment,
82
- )
66
+ kwargs = _get_kwargs()
83
67
 
84
68
  response = client.get_httpx_client().request(
85
69
  **kwargs,
@@ -91,15 +75,11 @@ def sync_detailed(
91
75
  def sync(
92
76
  *,
93
77
  client: AuthenticatedClient,
94
- environment: Union[Unset, str] = UNSET,
95
78
  ) -> Optional[list["Knowledgebase"]]:
96
79
  """List knowledgebases
97
80
 
98
81
  Returns a list of all knowledgebases in the workspace.
99
82
 
100
- Args:
101
- environment (Union[Unset, str]):
102
-
103
83
  Raises:
104
84
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
105
85
  httpx.TimeoutException: If the request takes longer than Client.timeout.
@@ -110,22 +90,17 @@ def sync(
110
90
 
111
91
  return sync_detailed(
112
92
  client=client,
113
- environment=environment,
114
93
  ).parsed
115
94
 
116
95
 
117
96
  async def asyncio_detailed(
118
97
  *,
119
98
  client: AuthenticatedClient,
120
- environment: Union[Unset, str] = UNSET,
121
99
  ) -> Response[list["Knowledgebase"]]:
122
100
  """List knowledgebases
123
101
 
124
102
  Returns a list of all knowledgebases in the workspace.
125
103
 
126
- Args:
127
- environment (Union[Unset, str]):
128
-
129
104
  Raises:
130
105
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
131
106
  httpx.TimeoutException: If the request takes longer than Client.timeout.
@@ -134,9 +109,7 @@ async def asyncio_detailed(
134
109
  Response[list['Knowledgebase']]
135
110
  """
136
111
 
137
- kwargs = _get_kwargs(
138
- environment=environment,
139
- )
112
+ kwargs = _get_kwargs()
140
113
 
141
114
  response = await client.get_async_httpx_client().request(**kwargs)
142
115
 
@@ -146,15 +119,11 @@ async def asyncio_detailed(
146
119
  async def asyncio(
147
120
  *,
148
121
  client: AuthenticatedClient,
149
- environment: Union[Unset, str] = UNSET,
150
122
  ) -> Optional[list["Knowledgebase"]]:
151
123
  """List knowledgebases
152
124
 
153
125
  Returns a list of all knowledgebases in the workspace.
154
126
 
155
- Args:
156
- environment (Union[Unset, str]):
157
-
158
127
  Raises:
159
128
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
160
129
  httpx.TimeoutException: If the request takes longer than Client.timeout.
@@ -166,6 +135,5 @@ async def asyncio(
166
135
  return (
167
136
  await asyncio_detailed(
168
137
  client=client,
169
- environment=environment,
170
138
  )
171
139
  ).parsed
@@ -59,8 +59,7 @@ def sync_detailed(
59
59
  Creates a model.
60
60
 
61
61
  Args:
62
- body (Model): Logical object representing a model, that can be instantiated in multiple
63
- environments as model deployments
62
+ body (Model): Logical object representing a model
64
63
 
65
64
  Raises:
66
65
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -91,8 +90,7 @@ def sync(
91
90
  Creates a model.
92
91
 
93
92
  Args:
94
- body (Model): Logical object representing a model, that can be instantiated in multiple
95
- environments as model deployments
93
+ body (Model): Logical object representing a model
96
94
 
97
95
  Raises:
98
96
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -118,8 +116,7 @@ async def asyncio_detailed(
118
116
  Creates a model.
119
117
 
120
118
  Args:
121
- body (Model): Logical object representing a model, that can be instantiated in multiple
122
- environments as model deployments
119
+ body (Model): Logical object representing a model
123
120
 
124
121
  Raises:
125
122
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -148,8 +145,7 @@ async def asyncio(
148
145
  Creates a model.
149
146
 
150
147
  Args:
151
- body (Model): Logical object representing a model, that can be instantiated in multiple
152
- environments as model deployments
148
+ body (Model): Logical object representing a model
153
149
 
154
150
  Raises:
155
151
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -6,24 +6,15 @@ import httpx
6
6
  from ... import errors
7
7
  from ...client import AuthenticatedClient, Client
8
8
  from ...models.model import Model
9
- from ...types import UNSET, Response
9
+ from ...types import Response
10
10
 
11
11
 
12
12
  def _get_kwargs(
13
13
  model_name: str,
14
- *,
15
- environment: str,
16
14
  ) -> dict[str, Any]:
17
- params: dict[str, Any] = {}
18
-
19
- params["environment"] = environment
20
-
21
- params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
22
-
23
15
  _kwargs: dict[str, Any] = {
24
16
  "method": "delete",
25
17
  "url": f"/models/{model_name}",
26
- "params": params,
27
18
  }
28
19
 
29
20
  return _kwargs
@@ -53,7 +44,6 @@ def sync_detailed(
53
44
  model_name: str,
54
45
  *,
55
46
  client: AuthenticatedClient,
56
- environment: str,
57
47
  ) -> Response[Model]:
58
48
  """Delete model
59
49
 
@@ -61,7 +51,6 @@ def sync_detailed(
61
51
 
62
52
  Args:
63
53
  model_name (str):
64
- environment (str):
65
54
 
66
55
  Raises:
67
56
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -73,7 +62,6 @@ def sync_detailed(
73
62
 
74
63
  kwargs = _get_kwargs(
75
64
  model_name=model_name,
76
- environment=environment,
77
65
  )
78
66
 
79
67
  response = client.get_httpx_client().request(
@@ -87,7 +75,6 @@ def sync(
87
75
  model_name: str,
88
76
  *,
89
77
  client: AuthenticatedClient,
90
- environment: str,
91
78
  ) -> Optional[Model]:
92
79
  """Delete model
93
80
 
@@ -95,7 +82,6 @@ def sync(
95
82
 
96
83
  Args:
97
84
  model_name (str):
98
- environment (str):
99
85
 
100
86
  Raises:
101
87
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -108,7 +94,6 @@ def sync(
108
94
  return sync_detailed(
109
95
  model_name=model_name,
110
96
  client=client,
111
- environment=environment,
112
97
  ).parsed
113
98
 
114
99
 
@@ -116,7 +101,6 @@ async def asyncio_detailed(
116
101
  model_name: str,
117
102
  *,
118
103
  client: AuthenticatedClient,
119
- environment: str,
120
104
  ) -> Response[Model]:
121
105
  """Delete model
122
106
 
@@ -124,7 +108,6 @@ async def asyncio_detailed(
124
108
 
125
109
  Args:
126
110
  model_name (str):
127
- environment (str):
128
111
 
129
112
  Raises:
130
113
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -136,7 +119,6 @@ async def asyncio_detailed(
136
119
 
137
120
  kwargs = _get_kwargs(
138
121
  model_name=model_name,
139
- environment=environment,
140
122
  )
141
123
 
142
124
  response = await client.get_async_httpx_client().request(**kwargs)
@@ -148,7 +130,6 @@ async def asyncio(
148
130
  model_name: str,
149
131
  *,
150
132
  client: AuthenticatedClient,
151
- environment: str,
152
133
  ) -> Optional[Model]:
153
134
  """Delete model
154
135
 
@@ -156,7 +137,6 @@ async def asyncio(
156
137
 
157
138
  Args:
158
139
  model_name (str):
159
- environment (str):
160
140
 
161
141
  Raises:
162
142
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -170,6 +150,5 @@ async def asyncio(
170
150
  await asyncio_detailed(
171
151
  model_name=model_name,
172
152
  client=client,
173
- environment=environment,
174
153
  )
175
154
  ).parsed
@@ -6,24 +6,15 @@ import httpx
6
6
  from ... import errors
7
7
  from ...client import AuthenticatedClient, Client
8
8
  from ...models.model import Model
9
- from ...types import UNSET, Response, Unset
9
+ from ...types import Response
10
10
 
11
11
 
12
12
  def _get_kwargs(
13
13
  model_name: str,
14
- *,
15
- environment: Union[Unset, str] = UNSET,
16
14
  ) -> dict[str, Any]:
17
- params: dict[str, Any] = {}
18
-
19
- params["environment"] = environment
20
-
21
- params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
22
-
23
15
  _kwargs: dict[str, Any] = {
24
16
  "method": "get",
25
17
  "url": f"/models/{model_name}",
26
- "params": params,
27
18
  }
28
19
 
29
20
  return _kwargs
@@ -53,7 +44,6 @@ def sync_detailed(
53
44
  model_name: str,
54
45
  *,
55
46
  client: AuthenticatedClient,
56
- environment: Union[Unset, str] = UNSET,
57
47
  ) -> Response[Model]:
58
48
  """Get model
59
49
 
@@ -61,7 +51,6 @@ def sync_detailed(
61
51
 
62
52
  Args:
63
53
  model_name (str):
64
- environment (Union[Unset, str]):
65
54
 
66
55
  Raises:
67
56
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -73,7 +62,6 @@ def sync_detailed(
73
62
 
74
63
  kwargs = _get_kwargs(
75
64
  model_name=model_name,
76
- environment=environment,
77
65
  )
78
66
 
79
67
  response = client.get_httpx_client().request(
@@ -87,7 +75,6 @@ def sync(
87
75
  model_name: str,
88
76
  *,
89
77
  client: AuthenticatedClient,
90
- environment: Union[Unset, str] = UNSET,
91
78
  ) -> Optional[Model]:
92
79
  """Get model
93
80
 
@@ -95,7 +82,6 @@ def sync(
95
82
 
96
83
  Args:
97
84
  model_name (str):
98
- environment (Union[Unset, str]):
99
85
 
100
86
  Raises:
101
87
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -108,7 +94,6 @@ def sync(
108
94
  return sync_detailed(
109
95
  model_name=model_name,
110
96
  client=client,
111
- environment=environment,
112
97
  ).parsed
113
98
 
114
99
 
@@ -116,7 +101,6 @@ async def asyncio_detailed(
116
101
  model_name: str,
117
102
  *,
118
103
  client: AuthenticatedClient,
119
- environment: Union[Unset, str] = UNSET,
120
104
  ) -> Response[Model]:
121
105
  """Get model
122
106
 
@@ -124,7 +108,6 @@ async def asyncio_detailed(
124
108
 
125
109
  Args:
126
110
  model_name (str):
127
- environment (Union[Unset, str]):
128
111
 
129
112
  Raises:
130
113
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -136,7 +119,6 @@ async def asyncio_detailed(
136
119
 
137
120
  kwargs = _get_kwargs(
138
121
  model_name=model_name,
139
- environment=environment,
140
122
  )
141
123
 
142
124
  response = await client.get_async_httpx_client().request(**kwargs)
@@ -148,7 +130,6 @@ async def asyncio(
148
130
  model_name: str,
149
131
  *,
150
132
  client: AuthenticatedClient,
151
- environment: Union[Unset, str] = UNSET,
152
133
  ) -> Optional[Model]:
153
134
  """Get model
154
135
 
@@ -156,7 +137,6 @@ async def asyncio(
156
137
 
157
138
  Args:
158
139
  model_name (str):
159
- environment (Union[Unset, str]):
160
140
 
161
141
  Raises:
162
142
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -170,6 +150,5 @@ async def asyncio(
170
150
  await asyncio_detailed(
171
151
  model_name=model_name,
172
152
  client=client,
173
- environment=environment,
174
153
  )
175
154
  ).parsed
@@ -5,25 +5,16 @@ import httpx
5
5
 
6
6
  from ... import errors
7
7
  from ...client import AuthenticatedClient, Client
8
- from ...models.resource_environment_metrics import ResourceEnvironmentMetrics
9
- from ...types import UNSET, Response, Unset
8
+ from ...models.resource_metrics import ResourceMetrics
9
+ from ...types import Response
10
10
 
11
11
 
12
12
  def _get_kwargs(
13
13
  model_name: str,
14
- *,
15
- environment: Union[Unset, str] = UNSET,
16
14
  ) -> dict[str, Any]:
17
- params: dict[str, Any] = {}
18
-
19
- params["environment"] = environment
20
-
21
- params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
22
-
23
15
  _kwargs: dict[str, Any] = {
24
16
  "method": "get",
25
17
  "url": f"/models/{model_name}/metrics",
26
- "params": params,
27
18
  }
28
19
 
29
20
  return _kwargs
@@ -31,9 +22,9 @@ def _get_kwargs(
31
22
 
32
23
  def _parse_response(
33
24
  *, client: Union[AuthenticatedClient, Client], response: httpx.Response
34
- ) -> Optional[ResourceEnvironmentMetrics]:
25
+ ) -> Optional[ResourceMetrics]:
35
26
  if response.status_code == 200:
36
- response_200 = ResourceEnvironmentMetrics.from_dict(response.json())
27
+ response_200 = ResourceMetrics.from_dict(response.json())
37
28
 
38
29
  return response_200
39
30
  if client.raise_on_unexpected_status:
@@ -44,7 +35,7 @@ def _parse_response(
44
35
 
45
36
  def _build_response(
46
37
  *, client: Union[AuthenticatedClient, Client], response: httpx.Response
47
- ) -> Response[ResourceEnvironmentMetrics]:
38
+ ) -> Response[ResourceMetrics]:
48
39
  return Response(
49
40
  status_code=HTTPStatus(response.status_code),
50
41
  content=response.content,
@@ -57,27 +48,24 @@ def sync_detailed(
57
48
  model_name: str,
58
49
  *,
59
50
  client: AuthenticatedClient,
60
- environment: Union[Unset, str] = UNSET,
61
- ) -> Response[ResourceEnvironmentMetrics]:
51
+ ) -> Response[ResourceMetrics]:
62
52
  """Get model metrics
63
53
 
64
54
  Returns metrics for a model by name.
65
55
 
66
56
  Args:
67
57
  model_name (str):
68
- environment (Union[Unset, str]):
69
58
 
70
59
  Raises:
71
60
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
72
61
  httpx.TimeoutException: If the request takes longer than Client.timeout.
73
62
 
74
63
  Returns:
75
- Response[ResourceEnvironmentMetrics]
64
+ Response[ResourceMetrics]
76
65
  """
77
66
 
78
67
  kwargs = _get_kwargs(
79
68
  model_name=model_name,
80
- environment=environment,
81
69
  )
82
70
 
83
71
  response = client.get_httpx_client().request(
@@ -91,28 +79,25 @@ def sync(
91
79
  model_name: str,
92
80
  *,
93
81
  client: AuthenticatedClient,
94
- environment: Union[Unset, str] = UNSET,
95
- ) -> Optional[ResourceEnvironmentMetrics]:
82
+ ) -> Optional[ResourceMetrics]:
96
83
  """Get model metrics
97
84
 
98
85
  Returns metrics for a model by name.
99
86
 
100
87
  Args:
101
88
  model_name (str):
102
- environment (Union[Unset, str]):
103
89
 
104
90
  Raises:
105
91
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
106
92
  httpx.TimeoutException: If the request takes longer than Client.timeout.
107
93
 
108
94
  Returns:
109
- ResourceEnvironmentMetrics
95
+ ResourceMetrics
110
96
  """
111
97
 
112
98
  return sync_detailed(
113
99
  model_name=model_name,
114
100
  client=client,
115
- environment=environment,
116
101
  ).parsed
117
102
 
118
103
 
@@ -120,27 +105,24 @@ async def asyncio_detailed(
120
105
  model_name: str,
121
106
  *,
122
107
  client: AuthenticatedClient,
123
- environment: Union[Unset, str] = UNSET,
124
- ) -> Response[ResourceEnvironmentMetrics]:
108
+ ) -> Response[ResourceMetrics]:
125
109
  """Get model metrics
126
110
 
127
111
  Returns metrics for a model by name.
128
112
 
129
113
  Args:
130
114
  model_name (str):
131
- environment (Union[Unset, str]):
132
115
 
133
116
  Raises:
134
117
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
135
118
  httpx.TimeoutException: If the request takes longer than Client.timeout.
136
119
 
137
120
  Returns:
138
- Response[ResourceEnvironmentMetrics]
121
+ Response[ResourceMetrics]
139
122
  """
140
123
 
141
124
  kwargs = _get_kwargs(
142
125
  model_name=model_name,
143
- environment=environment,
144
126
  )
145
127
 
146
128
  response = await client.get_async_httpx_client().request(**kwargs)
@@ -152,28 +134,25 @@ async def asyncio(
152
134
  model_name: str,
153
135
  *,
154
136
  client: AuthenticatedClient,
155
- environment: Union[Unset, str] = UNSET,
156
- ) -> Optional[ResourceEnvironmentMetrics]:
137
+ ) -> Optional[ResourceMetrics]:
157
138
  """Get model metrics
158
139
 
159
140
  Returns metrics for a model by name.
160
141
 
161
142
  Args:
162
143
  model_name (str):
163
- environment (Union[Unset, str]):
164
144
 
165
145
  Raises:
166
146
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
167
147
  httpx.TimeoutException: If the request takes longer than Client.timeout.
168
148
 
169
149
  Returns:
170
- ResourceEnvironmentMetrics
150
+ ResourceMetrics
171
151
  """
172
152
 
173
153
  return (
174
154
  await asyncio_detailed(
175
155
  model_name=model_name,
176
156
  client=client,
177
- environment=environment,
178
157
  )
179
158
  ).parsed
@@ -12,11 +12,17 @@ from ...types import UNSET, Response, Unset
12
12
  def _get_kwargs(
13
13
  model_name: str,
14
14
  *,
15
- environment: Union[Unset, str] = UNSET,
15
+ limit: Union[Unset, str] = UNSET,
16
+ start_time: Union[Unset, str] = UNSET,
17
+ end_time: Union[Unset, str] = UNSET,
16
18
  ) -> dict[str, Any]:
17
19
  params: dict[str, Any] = {}
18
20
 
19
- params["environment"] = environment
21
+ params["limit"] = limit
22
+
23
+ params["startTime"] = start_time
24
+
25
+ params["endTime"] = end_time
20
26
 
21
27
  params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
22
28
 
@@ -57,13 +63,17 @@ def sync_detailed(
57
63
  model_name: str,
58
64
  *,
59
65
  client: AuthenticatedClient,
60
- environment: Union[Unset, str] = UNSET,
66
+ limit: Union[Unset, str] = UNSET,
67
+ start_time: Union[Unset, str] = UNSET,
68
+ end_time: Union[Unset, str] = UNSET,
61
69
  ) -> Response[TraceIdsResponse]:
62
70
  """Get model trace IDs
63
71
 
64
72
  Args:
65
73
  model_name (str):
66
- environment (Union[Unset, str]):
74
+ limit (Union[Unset, str]):
75
+ start_time (Union[Unset, str]):
76
+ end_time (Union[Unset, str]):
67
77
 
68
78
  Raises:
69
79
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -75,7 +85,9 @@ def sync_detailed(
75
85
 
76
86
  kwargs = _get_kwargs(
77
87
  model_name=model_name,
78
- environment=environment,
88
+ limit=limit,
89
+ start_time=start_time,
90
+ end_time=end_time,
79
91
  )
80
92
 
81
93
  response = client.get_httpx_client().request(
@@ -89,13 +101,17 @@ def sync(
89
101
  model_name: str,
90
102
  *,
91
103
  client: AuthenticatedClient,
92
- environment: Union[Unset, str] = UNSET,
104
+ limit: Union[Unset, str] = UNSET,
105
+ start_time: Union[Unset, str] = UNSET,
106
+ end_time: Union[Unset, str] = UNSET,
93
107
  ) -> Optional[TraceIdsResponse]:
94
108
  """Get model trace IDs
95
109
 
96
110
  Args:
97
111
  model_name (str):
98
- environment (Union[Unset, str]):
112
+ limit (Union[Unset, str]):
113
+ start_time (Union[Unset, str]):
114
+ end_time (Union[Unset, str]):
99
115
 
100
116
  Raises:
101
117
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -108,7 +124,9 @@ def sync(
108
124
  return sync_detailed(
109
125
  model_name=model_name,
110
126
  client=client,
111
- environment=environment,
127
+ limit=limit,
128
+ start_time=start_time,
129
+ end_time=end_time,
112
130
  ).parsed
113
131
 
114
132
 
@@ -116,13 +134,17 @@ async def asyncio_detailed(
116
134
  model_name: str,
117
135
  *,
118
136
  client: AuthenticatedClient,
119
- environment: Union[Unset, str] = UNSET,
137
+ limit: Union[Unset, str] = UNSET,
138
+ start_time: Union[Unset, str] = UNSET,
139
+ end_time: Union[Unset, str] = UNSET,
120
140
  ) -> Response[TraceIdsResponse]:
121
141
  """Get model trace IDs
122
142
 
123
143
  Args:
124
144
  model_name (str):
125
- environment (Union[Unset, str]):
145
+ limit (Union[Unset, str]):
146
+ start_time (Union[Unset, str]):
147
+ end_time (Union[Unset, str]):
126
148
 
127
149
  Raises:
128
150
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -134,7 +156,9 @@ async def asyncio_detailed(
134
156
 
135
157
  kwargs = _get_kwargs(
136
158
  model_name=model_name,
137
- environment=environment,
159
+ limit=limit,
160
+ start_time=start_time,
161
+ end_time=end_time,
138
162
  )
139
163
 
140
164
  response = await client.get_async_httpx_client().request(**kwargs)
@@ -146,13 +170,17 @@ async def asyncio(
146
170
  model_name: str,
147
171
  *,
148
172
  client: AuthenticatedClient,
149
- environment: Union[Unset, str] = UNSET,
173
+ limit: Union[Unset, str] = UNSET,
174
+ start_time: Union[Unset, str] = UNSET,
175
+ end_time: Union[Unset, str] = UNSET,
150
176
  ) -> Optional[TraceIdsResponse]:
151
177
  """Get model trace IDs
152
178
 
153
179
  Args:
154
180
  model_name (str):
155
- environment (Union[Unset, str]):
181
+ limit (Union[Unset, str]):
182
+ start_time (Union[Unset, str]):
183
+ end_time (Union[Unset, str]):
156
184
 
157
185
  Raises:
158
186
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -166,6 +194,8 @@ async def asyncio(
166
194
  await asyncio_detailed(
167
195
  model_name=model_name,
168
196
  client=client,
169
- environment=environment,
197
+ limit=limit,
198
+ start_time=start_time,
199
+ end_time=end_time,
170
200
  )
171
201
  ).parsed