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
@@ -5,7 +5,7 @@ import httpx
5
5
 
6
6
  from ... import errors
7
7
  from ...client import AuthenticatedClient, Client
8
- from ...models.function_release import FunctionRelease
8
+ from ...models.revision_metadata import RevisionMetadata
9
9
  from ...types import Response
10
10
 
11
11
 
@@ -13,8 +13,8 @@ def _get_kwargs(
13
13
  function_name: str,
14
14
  ) -> dict[str, Any]:
15
15
  _kwargs: dict[str, Any] = {
16
- "method": "post",
17
- "url": f"/functions/{function_name}/release",
16
+ "method": "get",
17
+ "url": f"/functions/{function_name}/revisions",
18
18
  }
19
19
 
20
20
  return _kwargs
@@ -22,9 +22,9 @@ def _get_kwargs(
22
22
 
23
23
  def _parse_response(
24
24
  *, client: Union[AuthenticatedClient, Client], response: httpx.Response
25
- ) -> Optional[FunctionRelease]:
25
+ ) -> Optional[RevisionMetadata]:
26
26
  if response.status_code == 200:
27
- response_200 = FunctionRelease.from_dict(response.json())
27
+ response_200 = RevisionMetadata.from_dict(response.json())
28
28
 
29
29
  return response_200
30
30
  if client.raise_on_unexpected_status:
@@ -35,7 +35,7 @@ def _parse_response(
35
35
 
36
36
  def _build_response(
37
37
  *, client: Union[AuthenticatedClient, Client], response: httpx.Response
38
- ) -> Response[FunctionRelease]:
38
+ ) -> Response[RevisionMetadata]:
39
39
  return Response(
40
40
  status_code=HTTPStatus(response.status_code),
41
41
  content=response.content,
@@ -48,8 +48,10 @@ def sync_detailed(
48
48
  function_name: str,
49
49
  *,
50
50
  client: AuthenticatedClient,
51
- ) -> Response[FunctionRelease]:
52
- """Create release for a function from an environment
51
+ ) -> Response[RevisionMetadata]:
52
+ """List function revisions
53
+
54
+ Returns revisions for a function by name.
53
55
 
54
56
  Args:
55
57
  function_name (str):
@@ -59,7 +61,7 @@ def sync_detailed(
59
61
  httpx.TimeoutException: If the request takes longer than Client.timeout.
60
62
 
61
63
  Returns:
62
- Response[FunctionRelease]
64
+ Response[RevisionMetadata]
63
65
  """
64
66
 
65
67
  kwargs = _get_kwargs(
@@ -77,8 +79,10 @@ def sync(
77
79
  function_name: str,
78
80
  *,
79
81
  client: AuthenticatedClient,
80
- ) -> Optional[FunctionRelease]:
81
- """Create release for a function from an environment
82
+ ) -> Optional[RevisionMetadata]:
83
+ """List function revisions
84
+
85
+ Returns revisions for a function by name.
82
86
 
83
87
  Args:
84
88
  function_name (str):
@@ -88,7 +92,7 @@ def sync(
88
92
  httpx.TimeoutException: If the request takes longer than Client.timeout.
89
93
 
90
94
  Returns:
91
- FunctionRelease
95
+ RevisionMetadata
92
96
  """
93
97
 
94
98
  return sync_detailed(
@@ -101,8 +105,10 @@ async def asyncio_detailed(
101
105
  function_name: str,
102
106
  *,
103
107
  client: AuthenticatedClient,
104
- ) -> Response[FunctionRelease]:
105
- """Create release for a function from an environment
108
+ ) -> Response[RevisionMetadata]:
109
+ """List function revisions
110
+
111
+ Returns revisions for a function by name.
106
112
 
107
113
  Args:
108
114
  function_name (str):
@@ -112,7 +118,7 @@ async def asyncio_detailed(
112
118
  httpx.TimeoutException: If the request takes longer than Client.timeout.
113
119
 
114
120
  Returns:
115
- Response[FunctionRelease]
121
+ Response[RevisionMetadata]
116
122
  """
117
123
 
118
124
  kwargs = _get_kwargs(
@@ -128,8 +134,10 @@ async def asyncio(
128
134
  function_name: str,
129
135
  *,
130
136
  client: AuthenticatedClient,
131
- ) -> Optional[FunctionRelease]:
132
- """Create release for a function from an environment
137
+ ) -> Optional[RevisionMetadata]:
138
+ """List function revisions
139
+
140
+ Returns revisions for a function by name.
133
141
 
134
142
  Args:
135
143
  function_name (str):
@@ -139,7 +147,7 @@ async def asyncio(
139
147
  httpx.TimeoutException: If the request takes longer than Client.timeout.
140
148
 
141
149
  Returns:
142
- FunctionRelease
150
+ RevisionMetadata
143
151
  """
144
152
 
145
153
  return (
@@ -6,23 +6,13 @@ import httpx
6
6
  from ... import errors
7
7
  from ...client import AuthenticatedClient, Client
8
8
  from ...models.function import Function
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": "/functions",
25
- "params": params,
26
16
  }
27
17
 
28
18
  return _kwargs
@@ -60,13 +50,9 @@ def _build_response(
60
50
  def sync_detailed(
61
51
  *,
62
52
  client: AuthenticatedClient,
63
- environment: Union[Unset, str] = UNSET,
64
53
  ) -> Response[list["Function"]]:
65
54
  """List all functions
66
55
 
67
- Args:
68
- environment (Union[Unset, str]):
69
-
70
56
  Raises:
71
57
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
72
58
  httpx.TimeoutException: If the request takes longer than Client.timeout.
@@ -75,9 +61,7 @@ def sync_detailed(
75
61
  Response[list['Function']]
76
62
  """
77
63
 
78
- kwargs = _get_kwargs(
79
- environment=environment,
80
- )
64
+ kwargs = _get_kwargs()
81
65
 
82
66
  response = client.get_httpx_client().request(
83
67
  **kwargs,
@@ -89,13 +73,9 @@ def sync_detailed(
89
73
  def sync(
90
74
  *,
91
75
  client: AuthenticatedClient,
92
- environment: Union[Unset, str] = UNSET,
93
76
  ) -> Optional[list["Function"]]:
94
77
  """List all functions
95
78
 
96
- Args:
97
- environment (Union[Unset, str]):
98
-
99
79
  Raises:
100
80
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
101
81
  httpx.TimeoutException: If the request takes longer than Client.timeout.
@@ -106,20 +86,15 @@ def sync(
106
86
 
107
87
  return sync_detailed(
108
88
  client=client,
109
- environment=environment,
110
89
  ).parsed
111
90
 
112
91
 
113
92
  async def asyncio_detailed(
114
93
  *,
115
94
  client: AuthenticatedClient,
116
- environment: Union[Unset, str] = UNSET,
117
95
  ) -> Response[list["Function"]]:
118
96
  """List all functions
119
97
 
120
- Args:
121
- environment (Union[Unset, str]):
122
-
123
98
  Raises:
124
99
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
125
100
  httpx.TimeoutException: If the request takes longer than Client.timeout.
@@ -128,9 +103,7 @@ async def asyncio_detailed(
128
103
  Response[list['Function']]
129
104
  """
130
105
 
131
- kwargs = _get_kwargs(
132
- environment=environment,
133
- )
106
+ kwargs = _get_kwargs()
134
107
 
135
108
  response = await client.get_async_httpx_client().request(**kwargs)
136
109
 
@@ -140,13 +113,9 @@ async def asyncio_detailed(
140
113
  async def asyncio(
141
114
  *,
142
115
  client: AuthenticatedClient,
143
- environment: Union[Unset, str] = UNSET,
144
116
  ) -> Optional[list["Function"]]:
145
117
  """List all functions
146
118
 
147
- Args:
148
- environment (Union[Unset, str]):
149
-
150
119
  Raises:
151
120
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
152
121
  httpx.TimeoutException: If the request takes longer than Client.timeout.
@@ -158,6 +127,5 @@ async def asyncio(
158
127
  return (
159
128
  await asyncio_detailed(
160
129
  client=client,
161
- environment=environment,
162
130
  )
163
131
  ).parsed
@@ -54,7 +54,7 @@ def sync_detailed(
54
54
  client: AuthenticatedClient,
55
55
  body: Knowledgebase,
56
56
  ) -> Response[Knowledgebase]:
57
- """Create environment
57
+ """Create knowledgebase
58
58
 
59
59
  Creates an knowledgebase.
60
60
 
@@ -85,7 +85,7 @@ def sync(
85
85
  client: AuthenticatedClient,
86
86
  body: Knowledgebase,
87
87
  ) -> Optional[Knowledgebase]:
88
- """Create environment
88
+ """Create knowledgebase
89
89
 
90
90
  Creates an knowledgebase.
91
91
 
@@ -111,7 +111,7 @@ async def asyncio_detailed(
111
111
  client: AuthenticatedClient,
112
112
  body: Knowledgebase,
113
113
  ) -> Response[Knowledgebase]:
114
- """Create environment
114
+ """Create knowledgebase
115
115
 
116
116
  Creates an knowledgebase.
117
117
 
@@ -140,7 +140,7 @@ async def asyncio(
140
140
  client: AuthenticatedClient,
141
141
  body: Knowledgebase,
142
142
  ) -> Optional[Knowledgebase]:
143
- """Create environment
143
+ """Create knowledgebase
144
144
 
145
145
  Creates an knowledgebase.
146
146
 
@@ -6,24 +6,15 @@ 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
12
  def _get_kwargs(
13
13
  knowledgebase_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": "delete",
25
17
  "url": f"/knowledgebases/{knowledgebase_name}",
26
- "params": params,
27
18
  }
28
19
 
29
20
  return _kwargs
@@ -53,15 +44,13 @@ def sync_detailed(
53
44
  knowledgebase_name: str,
54
45
  *,
55
46
  client: AuthenticatedClient,
56
- environment: Union[Unset, str] = UNSET,
57
47
  ) -> Response[Knowledgebase]:
58
- """Delete environment
48
+ """Delete knowledgebase
59
49
 
60
50
  Deletes an knowledgebase by Name.
61
51
 
62
52
  Args:
63
53
  knowledgebase_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
  knowledgebase_name=knowledgebase_name,
76
- environment=environment,
77
65
  )
78
66
 
79
67
  response = client.get_httpx_client().request(
@@ -87,15 +75,13 @@ def sync(
87
75
  knowledgebase_name: str,
88
76
  *,
89
77
  client: AuthenticatedClient,
90
- environment: Union[Unset, str] = UNSET,
91
78
  ) -> Optional[Knowledgebase]:
92
- """Delete environment
79
+ """Delete knowledgebase
93
80
 
94
81
  Deletes an knowledgebase by Name.
95
82
 
96
83
  Args:
97
84
  knowledgebase_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
  knowledgebase_name=knowledgebase_name,
110
96
  client=client,
111
- environment=environment,
112
97
  ).parsed
113
98
 
114
99
 
@@ -116,15 +101,13 @@ async def asyncio_detailed(
116
101
  knowledgebase_name: str,
117
102
  *,
118
103
  client: AuthenticatedClient,
119
- environment: Union[Unset, str] = UNSET,
120
104
  ) -> Response[Knowledgebase]:
121
- """Delete environment
105
+ """Delete knowledgebase
122
106
 
123
107
  Deletes an knowledgebase by Name.
124
108
 
125
109
  Args:
126
110
  knowledgebase_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
  knowledgebase_name=knowledgebase_name,
139
- environment=environment,
140
122
  )
141
123
 
142
124
  response = await client.get_async_httpx_client().request(**kwargs)
@@ -148,15 +130,13 @@ async def asyncio(
148
130
  knowledgebase_name: str,
149
131
  *,
150
132
  client: AuthenticatedClient,
151
- environment: Union[Unset, str] = UNSET,
152
133
  ) -> Optional[Knowledgebase]:
153
- """Delete environment
134
+ """Delete knowledgebase
154
135
 
155
136
  Deletes an knowledgebase by Name.
156
137
 
157
138
  Args:
158
139
  knowledgebase_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
  knowledgebase_name=knowledgebase_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.knowledgebase import Knowledgebase
9
- from ...types import UNSET, Response, Unset
9
+ from ...types import Response
10
10
 
11
11
 
12
12
  def _get_kwargs(
13
13
  knowledgebase_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"/knowledgebases/{knowledgebase_name}",
26
- "params": params,
27
18
  }
28
19
 
29
20
  return _kwargs
@@ -53,7 +44,6 @@ def sync_detailed(
53
44
  knowledgebase_name: str,
54
45
  *,
55
46
  client: AuthenticatedClient,
56
- environment: Union[Unset, str] = UNSET,
57
47
  ) -> Response[Knowledgebase]:
58
48
  """Get knowledgebase
59
49
 
@@ -61,7 +51,6 @@ def sync_detailed(
61
51
 
62
52
  Args:
63
53
  knowledgebase_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
  knowledgebase_name=knowledgebase_name,
76
- environment=environment,
77
65
  )
78
66
 
79
67
  response = client.get_httpx_client().request(
@@ -87,7 +75,6 @@ def sync(
87
75
  knowledgebase_name: str,
88
76
  *,
89
77
  client: AuthenticatedClient,
90
- environment: Union[Unset, str] = UNSET,
91
78
  ) -> Optional[Knowledgebase]:
92
79
  """Get knowledgebase
93
80
 
@@ -95,7 +82,6 @@ def sync(
95
82
 
96
83
  Args:
97
84
  knowledgebase_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
  knowledgebase_name=knowledgebase_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
  knowledgebase_name: str,
117
102
  *,
118
103
  client: AuthenticatedClient,
119
- environment: Union[Unset, str] = UNSET,
120
104
  ) -> Response[Knowledgebase]:
121
105
  """Get knowledgebase
122
106
 
@@ -124,7 +108,6 @@ async def asyncio_detailed(
124
108
 
125
109
  Args:
126
110
  knowledgebase_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
  knowledgebase_name=knowledgebase_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
  knowledgebase_name: str,
149
131
  *,
150
132
  client: AuthenticatedClient,
151
- environment: Union[Unset, str] = UNSET,
152
133
  ) -> Optional[Knowledgebase]:
153
134
  """Get knowledgebase
154
135
 
@@ -156,7 +137,6 @@ async def asyncio(
156
137
 
157
138
  Args:
158
139
  knowledgebase_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
  knowledgebase_name=knowledgebase_name,
172
152
  client=client,
173
- environment=environment,
174
153
  )
175
154
  ).parsed
@@ -5,16 +5,16 @@ import httpx
5
5
 
6
6
  from ... import errors
7
7
  from ...client import AuthenticatedClient, Client
8
- from ...models.environment_metrics import EnvironmentMetrics
8
+ from ...models.revision_metadata import RevisionMetadata
9
9
  from ...types import Response
10
10
 
11
11
 
12
12
  def _get_kwargs(
13
- environment_name: str,
13
+ knowledgebase_name: str,
14
14
  ) -> dict[str, Any]:
15
15
  _kwargs: dict[str, Any] = {
16
16
  "method": "get",
17
- "url": f"/environments/{environment_name}/metrics",
17
+ "url": f"/knowledgebases/{knowledgebase_name}/revisions",
18
18
  }
19
19
 
20
20
  return _kwargs
@@ -22,9 +22,9 @@ def _get_kwargs(
22
22
 
23
23
  def _parse_response(
24
24
  *, client: Union[AuthenticatedClient, Client], response: httpx.Response
25
- ) -> Optional[EnvironmentMetrics]:
25
+ ) -> Optional[RevisionMetadata]:
26
26
  if response.status_code == 200:
27
- response_200 = EnvironmentMetrics.from_dict(response.json())
27
+ response_200 = RevisionMetadata.from_dict(response.json())
28
28
 
29
29
  return response_200
30
30
  if client.raise_on_unexpected_status:
@@ -35,7 +35,7 @@ def _parse_response(
35
35
 
36
36
  def _build_response(
37
37
  *, client: Union[AuthenticatedClient, Client], response: httpx.Response
38
- ) -> Response[EnvironmentMetrics]:
38
+ ) -> Response[RevisionMetadata]:
39
39
  return Response(
40
40
  status_code=HTTPStatus(response.status_code),
41
41
  content=response.content,
@@ -45,27 +45,27 @@ def _build_response(
45
45
 
46
46
 
47
47
  def sync_detailed(
48
- environment_name: str,
48
+ knowledgebase_name: str,
49
49
  *,
50
50
  client: AuthenticatedClient,
51
- ) -> Response[EnvironmentMetrics]:
52
- """Get environment metrics
51
+ ) -> Response[RevisionMetadata]:
52
+ """List knowledgebase revisions
53
53
 
54
- Returns metrics for an environment by name.
54
+ Returns revisions for a knowledgebase by name.
55
55
 
56
56
  Args:
57
- environment_name (str):
57
+ knowledgebase_name (str):
58
58
 
59
59
  Raises:
60
60
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
61
61
  httpx.TimeoutException: If the request takes longer than Client.timeout.
62
62
 
63
63
  Returns:
64
- Response[EnvironmentMetrics]
64
+ Response[RevisionMetadata]
65
65
  """
66
66
 
67
67
  kwargs = _get_kwargs(
68
- environment_name=environment_name,
68
+ knowledgebase_name=knowledgebase_name,
69
69
  )
70
70
 
71
71
  response = client.get_httpx_client().request(
@@ -76,53 +76,53 @@ def sync_detailed(
76
76
 
77
77
 
78
78
  def sync(
79
- environment_name: str,
79
+ knowledgebase_name: str,
80
80
  *,
81
81
  client: AuthenticatedClient,
82
- ) -> Optional[EnvironmentMetrics]:
83
- """Get environment metrics
82
+ ) -> Optional[RevisionMetadata]:
83
+ """List knowledgebase revisions
84
84
 
85
- Returns metrics for an environment by name.
85
+ Returns revisions for a knowledgebase by name.
86
86
 
87
87
  Args:
88
- environment_name (str):
88
+ knowledgebase_name (str):
89
89
 
90
90
  Raises:
91
91
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
92
92
  httpx.TimeoutException: If the request takes longer than Client.timeout.
93
93
 
94
94
  Returns:
95
- EnvironmentMetrics
95
+ RevisionMetadata
96
96
  """
97
97
 
98
98
  return sync_detailed(
99
- environment_name=environment_name,
99
+ knowledgebase_name=knowledgebase_name,
100
100
  client=client,
101
101
  ).parsed
102
102
 
103
103
 
104
104
  async def asyncio_detailed(
105
- environment_name: str,
105
+ knowledgebase_name: str,
106
106
  *,
107
107
  client: AuthenticatedClient,
108
- ) -> Response[EnvironmentMetrics]:
109
- """Get environment metrics
108
+ ) -> Response[RevisionMetadata]:
109
+ """List knowledgebase revisions
110
110
 
111
- Returns metrics for an environment by name.
111
+ Returns revisions for a knowledgebase by name.
112
112
 
113
113
  Args:
114
- environment_name (str):
114
+ knowledgebase_name (str):
115
115
 
116
116
  Raises:
117
117
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
118
118
  httpx.TimeoutException: If the request takes longer than Client.timeout.
119
119
 
120
120
  Returns:
121
- Response[EnvironmentMetrics]
121
+ Response[RevisionMetadata]
122
122
  """
123
123
 
124
124
  kwargs = _get_kwargs(
125
- environment_name=environment_name,
125
+ knowledgebase_name=knowledgebase_name,
126
126
  )
127
127
 
128
128
  response = await client.get_async_httpx_client().request(**kwargs)
@@ -131,28 +131,28 @@ async def asyncio_detailed(
131
131
 
132
132
 
133
133
  async def asyncio(
134
- environment_name: str,
134
+ knowledgebase_name: str,
135
135
  *,
136
136
  client: AuthenticatedClient,
137
- ) -> Optional[EnvironmentMetrics]:
138
- """Get environment metrics
137
+ ) -> Optional[RevisionMetadata]:
138
+ """List knowledgebase revisions
139
139
 
140
- Returns metrics for an environment by name.
140
+ Returns revisions for a knowledgebase by name.
141
141
 
142
142
  Args:
143
- environment_name (str):
143
+ knowledgebase_name (str):
144
144
 
145
145
  Raises:
146
146
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
147
147
  httpx.TimeoutException: If the request takes longer than Client.timeout.
148
148
 
149
149
  Returns:
150
- EnvironmentMetrics
150
+ RevisionMetadata
151
151
  """
152
152
 
153
153
  return (
154
154
  await asyncio_detailed(
155
- environment_name=environment_name,
155
+ knowledgebase_name=knowledgebase_name,
156
156
  client=client,
157
157
  )
158
158
  ).parsed