beamlit 0.0.55rc103__py3-none-any.whl → 0.0.56rc105__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.
- beamlit/agents/chain.py +14 -0
- beamlit/agents/decorator.py +6 -3
- beamlit/api/default/list_mcp_hub_definitions.py +127 -0
- beamlit/api/generation/__init__.py +0 -0
- beamlit/api/generation/run_information_generation_agent.py +168 -0
- beamlit/api/knowledgebases/delete_knowledgebase.py +18 -18
- beamlit/api/knowledgebases/get_knowledgebase.py +18 -18
- beamlit/api/knowledgebases/update_knowledgebase.py +14 -14
- beamlit/common/settings.py +2 -0
- beamlit/deploy/deploy.py +5 -2
- beamlit/functions/common.py +16 -0
- beamlit/functions/local/local.py +49 -0
- beamlit/functions/mcp/mcp.py +64 -74
- beamlit/functions/mcp/utils.py +56 -0
- beamlit/functions/remote/remote.py +16 -2
- beamlit/models/__init__.py +30 -0
- beamlit/models/agent_information_request.py +63 -0
- beamlit/models/agent_information_response.py +88 -0
- beamlit/models/agent_spec.py +9 -0
- beamlit/models/entrypoint.py +96 -0
- beamlit/models/entrypoint_env.py +45 -0
- beamlit/models/form.py +120 -0
- beamlit/models/form_config.py +45 -0
- beamlit/models/form_oauthomitempty.py +45 -0
- beamlit/models/form_secrets.py +45 -0
- beamlit/models/mcp_definition.py +188 -0
- beamlit/models/mcp_definition_entrypoint.py +45 -0
- beamlit/models/mcp_definition_form.py +45 -0
- beamlit/models/mcp_hub_artifact.py +188 -0
- beamlit/models/mcp_hub_artifact_entrypoint.py +45 -0
- beamlit/models/mcp_hub_artifact_form.py +45 -0
- beamlit/models/model_spec.py +0 -9
- beamlit/models/o_auth.py +72 -0
- beamlit/models/workspace.py +9 -9
- beamlit/run.py +25 -9
- {beamlit-0.0.55rc103.dist-info → beamlit-0.0.56rc105.dist-info}/METADATA +1 -1
- {beamlit-0.0.55rc103.dist-info → beamlit-0.0.56rc105.dist-info}/RECORD +40 -21
- beamlit/api/workspaces/workspace_quotas_request.py +0 -97
- {beamlit-0.0.55rc103.dist-info → beamlit-0.0.56rc105.dist-info}/WHEEL +0 -0
- {beamlit-0.0.55rc103.dist-info → beamlit-0.0.56rc105.dist-info}/entry_points.txt +0 -0
- {beamlit-0.0.55rc103.dist-info → beamlit-0.0.56rc105.dist-info}/licenses/LICENSE +0 -0
beamlit/agents/chain.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
import asyncio
|
2
|
+
import os
|
2
3
|
import warnings
|
3
4
|
from dataclasses import dataclass
|
4
5
|
from typing import Callable
|
@@ -21,6 +22,8 @@ class ChainTool(BaseTool):
|
|
21
22
|
|
22
23
|
client: RunClient
|
23
24
|
handle_tool_error: bool | str | Callable[[ToolException], str] | None = True
|
25
|
+
_cloud: bool = False
|
26
|
+
_service_name: str | None = None
|
24
27
|
|
25
28
|
@t.override
|
26
29
|
def _run(self, *args: t.Any, **kwargs: t.Any) -> t.Any:
|
@@ -58,6 +61,8 @@ class ChainTool(BaseTool):
|
|
58
61
|
self.name,
|
59
62
|
settings.environment,
|
60
63
|
"POST",
|
64
|
+
cloud=self._cloud,
|
65
|
+
service_name=self._service_name,
|
61
66
|
json=kwargs,
|
62
67
|
)
|
63
68
|
return result.text
|
@@ -91,6 +96,8 @@ class ChainToolkit:
|
|
91
96
|
|
92
97
|
client: AuthenticatedClient
|
93
98
|
chain: list[AgentChain]
|
99
|
+
_cloud: bool = False
|
100
|
+
_service_name: str | None = None
|
94
101
|
_chain: list[Agent] | None = None
|
95
102
|
|
96
103
|
model_config = pydantic.ConfigDict(arbitrary_types_allowed=True)
|
@@ -103,6 +110,8 @@ class ChainToolkit:
|
|
103
110
|
RuntimeError: If initialization fails due to missing agents.
|
104
111
|
"""
|
105
112
|
"""Initialize the session and retrieve tools list"""
|
113
|
+
settings = get_settings()
|
114
|
+
self._cloud = settings.cloud
|
106
115
|
if self._chain is None:
|
107
116
|
agents = list_agents.sync_detailed(
|
108
117
|
client=self.client,
|
@@ -111,6 +120,9 @@ class ChainToolkit:
|
|
111
120
|
agents_chain = []
|
112
121
|
for chain in chain_enabled:
|
113
122
|
agent = [agent for agent in agents if agent.metadata.name == chain.name]
|
123
|
+
agent_name = agent[0].metadata.name.upper().replace("-", "_")
|
124
|
+
if os.getenv(f"BL_AGENT_{agent_name}_SERVICE_NAME"):
|
125
|
+
self._service_name = os.getenv(f"BL_AGENT_{agent_name}_SERVICE_NAME")
|
114
126
|
if agent:
|
115
127
|
agent[0].spec.prompt = chain.prompt or agent[0].spec.prompt
|
116
128
|
agent[0].spec.description = chain.description or agent[0].spec.description
|
@@ -136,6 +148,8 @@ class ChainToolkit:
|
|
136
148
|
name=agent.metadata.name,
|
137
149
|
description=agent.spec.description or agent.spec.prompt or "",
|
138
150
|
args_schema=ChainInput,
|
151
|
+
cloud=self._cloud,
|
152
|
+
service_name=self._service_name,
|
139
153
|
)
|
140
154
|
for agent in self._chain
|
141
155
|
]
|
beamlit/agents/decorator.py
CHANGED
@@ -29,6 +29,7 @@ def agent(
|
|
29
29
|
override_agent=None,
|
30
30
|
override_functions=None,
|
31
31
|
remote_functions=None,
|
32
|
+
local_functions=None,
|
32
33
|
) -> Callable:
|
33
34
|
"""
|
34
35
|
A decorator factory that configures and wraps functions to integrate with Beamlit agents.
|
@@ -40,6 +41,7 @@ def agent(
|
|
40
41
|
override_agent (Any, optional): An optional agent instance to override the default agent.
|
41
42
|
mcp_hub (Any, optional): An optional MCP hub configuration.
|
42
43
|
remote_functions (Any, optional): An optional list of remote functions to be integrated.
|
44
|
+
local_functions (Any, optional): An optional list of local functions to be integrated.
|
43
45
|
|
44
46
|
Returns:
|
45
47
|
Callable: A decorator that wraps the target function, injecting agent-related configurations and dependencies.
|
@@ -130,9 +132,10 @@ def agent(
|
|
130
132
|
dir=settings.agent.functions_directory,
|
131
133
|
remote_functions=remote_functions,
|
132
134
|
chain=agent.spec.agent_chain,
|
133
|
-
|
134
|
-
|
135
|
-
|
135
|
+
local_functions=local_functions,
|
136
|
+
remote_functions_empty=not remote_functions,
|
137
|
+
warning=chat_model is not None,
|
138
|
+
)
|
136
139
|
|
137
140
|
settings.agent.functions = functions
|
138
141
|
|
@@ -0,0 +1,127 @@
|
|
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.mcp_hub_artifact import MCPHubArtifact
|
9
|
+
from ...types import Response
|
10
|
+
|
11
|
+
|
12
|
+
def _get_kwargs() -> dict[str, Any]:
|
13
|
+
_kwargs: dict[str, Any] = {
|
14
|
+
"method": "get",
|
15
|
+
"url": "/mcp/hub",
|
16
|
+
}
|
17
|
+
|
18
|
+
return _kwargs
|
19
|
+
|
20
|
+
|
21
|
+
def _parse_response(
|
22
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
23
|
+
) -> Optional[list["MCPHubArtifact"]]:
|
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 = MCPHubArtifact.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["MCPHubArtifact"]]:
|
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["MCPHubArtifact"]]:
|
54
|
+
"""
|
55
|
+
Raises:
|
56
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
57
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
58
|
+
|
59
|
+
Returns:
|
60
|
+
Response[list['MCPHubArtifact']]
|
61
|
+
"""
|
62
|
+
|
63
|
+
kwargs = _get_kwargs()
|
64
|
+
|
65
|
+
response = client.get_httpx_client().request(
|
66
|
+
**kwargs,
|
67
|
+
)
|
68
|
+
|
69
|
+
return _build_response(client=client, response=response)
|
70
|
+
|
71
|
+
|
72
|
+
def sync(
|
73
|
+
*,
|
74
|
+
client: AuthenticatedClient,
|
75
|
+
) -> Optional[list["MCPHubArtifact"]]:
|
76
|
+
"""
|
77
|
+
Raises:
|
78
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
79
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
80
|
+
|
81
|
+
Returns:
|
82
|
+
list['MCPHubArtifact']
|
83
|
+
"""
|
84
|
+
|
85
|
+
return sync_detailed(
|
86
|
+
client=client,
|
87
|
+
).parsed
|
88
|
+
|
89
|
+
|
90
|
+
async def asyncio_detailed(
|
91
|
+
*,
|
92
|
+
client: AuthenticatedClient,
|
93
|
+
) -> Response[list["MCPHubArtifact"]]:
|
94
|
+
"""
|
95
|
+
Raises:
|
96
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
97
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
98
|
+
|
99
|
+
Returns:
|
100
|
+
Response[list['MCPHubArtifact']]
|
101
|
+
"""
|
102
|
+
|
103
|
+
kwargs = _get_kwargs()
|
104
|
+
|
105
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
106
|
+
|
107
|
+
return _build_response(client=client, response=response)
|
108
|
+
|
109
|
+
|
110
|
+
async def asyncio(
|
111
|
+
*,
|
112
|
+
client: AuthenticatedClient,
|
113
|
+
) -> Optional[list["MCPHubArtifact"]]:
|
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
|
+
list['MCPHubArtifact']
|
121
|
+
"""
|
122
|
+
|
123
|
+
return (
|
124
|
+
await asyncio_detailed(
|
125
|
+
client=client,
|
126
|
+
)
|
127
|
+
).parsed
|
File without changes
|
@@ -0,0 +1,168 @@
|
|
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_information_request import AgentInformationRequest
|
9
|
+
from ...models.agent_information_response import AgentInformationResponse
|
10
|
+
from ...types import Response
|
11
|
+
|
12
|
+
|
13
|
+
def _get_kwargs(
|
14
|
+
*,
|
15
|
+
body: AgentInformationRequest,
|
16
|
+
) -> dict[str, Any]:
|
17
|
+
headers: dict[str, Any] = {}
|
18
|
+
|
19
|
+
_kwargs: dict[str, Any] = {
|
20
|
+
"method": "post",
|
21
|
+
"url": "/generation/agents/information",
|
22
|
+
}
|
23
|
+
|
24
|
+
_body = body.to_dict()
|
25
|
+
|
26
|
+
_kwargs["json"] = _body
|
27
|
+
headers["Content-Type"] = "application/json"
|
28
|
+
|
29
|
+
_kwargs["headers"] = headers
|
30
|
+
return _kwargs
|
31
|
+
|
32
|
+
|
33
|
+
def _parse_response(
|
34
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
35
|
+
) -> Optional[AgentInformationResponse]:
|
36
|
+
if response.status_code == 200:
|
37
|
+
response_200 = AgentInformationResponse.from_dict(response.json())
|
38
|
+
|
39
|
+
return response_200
|
40
|
+
if client.raise_on_unexpected_status:
|
41
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
42
|
+
else:
|
43
|
+
return None
|
44
|
+
|
45
|
+
|
46
|
+
def _build_response(
|
47
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
48
|
+
) -> Response[AgentInformationResponse]:
|
49
|
+
return Response(
|
50
|
+
status_code=HTTPStatus(response.status_code),
|
51
|
+
content=response.content,
|
52
|
+
headers=response.headers,
|
53
|
+
parsed=_parse_response(client=client, response=response),
|
54
|
+
)
|
55
|
+
|
56
|
+
|
57
|
+
def sync_detailed(
|
58
|
+
*,
|
59
|
+
client: AuthenticatedClient,
|
60
|
+
body: AgentInformationRequest,
|
61
|
+
) -> Response[AgentInformationResponse]:
|
62
|
+
"""Run information generation agent
|
63
|
+
|
64
|
+
Run information generation agent
|
65
|
+
|
66
|
+
Args:
|
67
|
+
body (AgentInformationRequest): generation agent information request
|
68
|
+
|
69
|
+
Raises:
|
70
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
71
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
72
|
+
|
73
|
+
Returns:
|
74
|
+
Response[AgentInformationResponse]
|
75
|
+
"""
|
76
|
+
|
77
|
+
kwargs = _get_kwargs(
|
78
|
+
body=body,
|
79
|
+
)
|
80
|
+
|
81
|
+
response = client.get_httpx_client().request(
|
82
|
+
**kwargs,
|
83
|
+
)
|
84
|
+
|
85
|
+
return _build_response(client=client, response=response)
|
86
|
+
|
87
|
+
|
88
|
+
def sync(
|
89
|
+
*,
|
90
|
+
client: AuthenticatedClient,
|
91
|
+
body: AgentInformationRequest,
|
92
|
+
) -> Optional[AgentInformationResponse]:
|
93
|
+
"""Run information generation agent
|
94
|
+
|
95
|
+
Run information generation agent
|
96
|
+
|
97
|
+
Args:
|
98
|
+
body (AgentInformationRequest): generation agent information request
|
99
|
+
|
100
|
+
Raises:
|
101
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
102
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
103
|
+
|
104
|
+
Returns:
|
105
|
+
AgentInformationResponse
|
106
|
+
"""
|
107
|
+
|
108
|
+
return sync_detailed(
|
109
|
+
client=client,
|
110
|
+
body=body,
|
111
|
+
).parsed
|
112
|
+
|
113
|
+
|
114
|
+
async def asyncio_detailed(
|
115
|
+
*,
|
116
|
+
client: AuthenticatedClient,
|
117
|
+
body: AgentInformationRequest,
|
118
|
+
) -> Response[AgentInformationResponse]:
|
119
|
+
"""Run information generation agent
|
120
|
+
|
121
|
+
Run information generation agent
|
122
|
+
|
123
|
+
Args:
|
124
|
+
body (AgentInformationRequest): generation agent information request
|
125
|
+
|
126
|
+
Raises:
|
127
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
128
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
129
|
+
|
130
|
+
Returns:
|
131
|
+
Response[AgentInformationResponse]
|
132
|
+
"""
|
133
|
+
|
134
|
+
kwargs = _get_kwargs(
|
135
|
+
body=body,
|
136
|
+
)
|
137
|
+
|
138
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
139
|
+
|
140
|
+
return _build_response(client=client, response=response)
|
141
|
+
|
142
|
+
|
143
|
+
async def asyncio(
|
144
|
+
*,
|
145
|
+
client: AuthenticatedClient,
|
146
|
+
body: AgentInformationRequest,
|
147
|
+
) -> Optional[AgentInformationResponse]:
|
148
|
+
"""Run information generation agent
|
149
|
+
|
150
|
+
Run information generation agent
|
151
|
+
|
152
|
+
Args:
|
153
|
+
body (AgentInformationRequest): generation agent information request
|
154
|
+
|
155
|
+
Raises:
|
156
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
157
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
158
|
+
|
159
|
+
Returns:
|
160
|
+
AgentInformationResponse
|
161
|
+
"""
|
162
|
+
|
163
|
+
return (
|
164
|
+
await asyncio_detailed(
|
165
|
+
client=client,
|
166
|
+
body=body,
|
167
|
+
)
|
168
|
+
).parsed
|
@@ -10,7 +10,7 @@ from ...types import UNSET, Response, Unset
|
|
10
10
|
|
11
11
|
|
12
12
|
def _get_kwargs(
|
13
|
-
|
13
|
+
knowledgebase_name: str,
|
14
14
|
*,
|
15
15
|
environment: Union[Unset, str] = UNSET,
|
16
16
|
) -> dict[str, Any]:
|
@@ -22,7 +22,7 @@ def _get_kwargs(
|
|
22
22
|
|
23
23
|
_kwargs: dict[str, Any] = {
|
24
24
|
"method": "delete",
|
25
|
-
"url": f"/knowledgebases/{
|
25
|
+
"url": f"/knowledgebases/{knowledgebase_name}",
|
26
26
|
"params": params,
|
27
27
|
}
|
28
28
|
|
@@ -50,17 +50,17 @@ def _build_response(*, client: Union[AuthenticatedClient, Client], response: htt
|
|
50
50
|
|
51
51
|
|
52
52
|
def sync_detailed(
|
53
|
-
|
53
|
+
knowledgebase_name: str,
|
54
54
|
*,
|
55
55
|
client: AuthenticatedClient,
|
56
56
|
environment: Union[Unset, str] = UNSET,
|
57
57
|
) -> Response[Knowledgebase]:
|
58
58
|
"""Delete environment
|
59
59
|
|
60
|
-
Deletes an knowledgebase by
|
60
|
+
Deletes an knowledgebase by Name.
|
61
61
|
|
62
62
|
Args:
|
63
|
-
|
63
|
+
knowledgebase_name (str):
|
64
64
|
environment (Union[Unset, str]):
|
65
65
|
|
66
66
|
Raises:
|
@@ -72,7 +72,7 @@ def sync_detailed(
|
|
72
72
|
"""
|
73
73
|
|
74
74
|
kwargs = _get_kwargs(
|
75
|
-
|
75
|
+
knowledgebase_name=knowledgebase_name,
|
76
76
|
environment=environment,
|
77
77
|
)
|
78
78
|
|
@@ -84,17 +84,17 @@ def sync_detailed(
|
|
84
84
|
|
85
85
|
|
86
86
|
def sync(
|
87
|
-
|
87
|
+
knowledgebase_name: str,
|
88
88
|
*,
|
89
89
|
client: AuthenticatedClient,
|
90
90
|
environment: Union[Unset, str] = UNSET,
|
91
91
|
) -> Optional[Knowledgebase]:
|
92
92
|
"""Delete environment
|
93
93
|
|
94
|
-
Deletes an knowledgebase by
|
94
|
+
Deletes an knowledgebase by Name.
|
95
95
|
|
96
96
|
Args:
|
97
|
-
|
97
|
+
knowledgebase_name (str):
|
98
98
|
environment (Union[Unset, str]):
|
99
99
|
|
100
100
|
Raises:
|
@@ -106,24 +106,24 @@ def sync(
|
|
106
106
|
"""
|
107
107
|
|
108
108
|
return sync_detailed(
|
109
|
-
|
109
|
+
knowledgebase_name=knowledgebase_name,
|
110
110
|
client=client,
|
111
111
|
environment=environment,
|
112
112
|
).parsed
|
113
113
|
|
114
114
|
|
115
115
|
async def asyncio_detailed(
|
116
|
-
|
116
|
+
knowledgebase_name: str,
|
117
117
|
*,
|
118
118
|
client: AuthenticatedClient,
|
119
119
|
environment: Union[Unset, str] = UNSET,
|
120
120
|
) -> Response[Knowledgebase]:
|
121
121
|
"""Delete environment
|
122
122
|
|
123
|
-
Deletes an knowledgebase by
|
123
|
+
Deletes an knowledgebase by Name.
|
124
124
|
|
125
125
|
Args:
|
126
|
-
|
126
|
+
knowledgebase_name (str):
|
127
127
|
environment (Union[Unset, str]):
|
128
128
|
|
129
129
|
Raises:
|
@@ -135,7 +135,7 @@ async def asyncio_detailed(
|
|
135
135
|
"""
|
136
136
|
|
137
137
|
kwargs = _get_kwargs(
|
138
|
-
|
138
|
+
knowledgebase_name=knowledgebase_name,
|
139
139
|
environment=environment,
|
140
140
|
)
|
141
141
|
|
@@ -145,17 +145,17 @@ async def asyncio_detailed(
|
|
145
145
|
|
146
146
|
|
147
147
|
async def asyncio(
|
148
|
-
|
148
|
+
knowledgebase_name: str,
|
149
149
|
*,
|
150
150
|
client: AuthenticatedClient,
|
151
151
|
environment: Union[Unset, str] = UNSET,
|
152
152
|
) -> Optional[Knowledgebase]:
|
153
153
|
"""Delete environment
|
154
154
|
|
155
|
-
Deletes an knowledgebase by
|
155
|
+
Deletes an knowledgebase by Name.
|
156
156
|
|
157
157
|
Args:
|
158
|
-
|
158
|
+
knowledgebase_name (str):
|
159
159
|
environment (Union[Unset, str]):
|
160
160
|
|
161
161
|
Raises:
|
@@ -168,7 +168,7 @@ async def asyncio(
|
|
168
168
|
|
169
169
|
return (
|
170
170
|
await asyncio_detailed(
|
171
|
-
|
171
|
+
knowledgebase_name=knowledgebase_name,
|
172
172
|
client=client,
|
173
173
|
environment=environment,
|
174
174
|
)
|
@@ -10,7 +10,7 @@ from ...types import UNSET, Response, Unset
|
|
10
10
|
|
11
11
|
|
12
12
|
def _get_kwargs(
|
13
|
-
|
13
|
+
knowledgebase_name: str,
|
14
14
|
*,
|
15
15
|
environment: Union[Unset, str] = UNSET,
|
16
16
|
) -> dict[str, Any]:
|
@@ -22,7 +22,7 @@ def _get_kwargs(
|
|
22
22
|
|
23
23
|
_kwargs: dict[str, Any] = {
|
24
24
|
"method": "get",
|
25
|
-
"url": f"/knowledgebases/{
|
25
|
+
"url": f"/knowledgebases/{knowledgebase_name}",
|
26
26
|
"params": params,
|
27
27
|
}
|
28
28
|
|
@@ -50,17 +50,17 @@ def _build_response(*, client: Union[AuthenticatedClient, Client], response: htt
|
|
50
50
|
|
51
51
|
|
52
52
|
def sync_detailed(
|
53
|
-
|
53
|
+
knowledgebase_name: str,
|
54
54
|
*,
|
55
55
|
client: AuthenticatedClient,
|
56
56
|
environment: Union[Unset, str] = UNSET,
|
57
57
|
) -> Response[Knowledgebase]:
|
58
58
|
"""Get knowledgebase
|
59
59
|
|
60
|
-
Returns an knowledgebase by
|
60
|
+
Returns an knowledgebase by Name.
|
61
61
|
|
62
62
|
Args:
|
63
|
-
|
63
|
+
knowledgebase_name (str):
|
64
64
|
environment (Union[Unset, str]):
|
65
65
|
|
66
66
|
Raises:
|
@@ -72,7 +72,7 @@ def sync_detailed(
|
|
72
72
|
"""
|
73
73
|
|
74
74
|
kwargs = _get_kwargs(
|
75
|
-
|
75
|
+
knowledgebase_name=knowledgebase_name,
|
76
76
|
environment=environment,
|
77
77
|
)
|
78
78
|
|
@@ -84,17 +84,17 @@ def sync_detailed(
|
|
84
84
|
|
85
85
|
|
86
86
|
def sync(
|
87
|
-
|
87
|
+
knowledgebase_name: str,
|
88
88
|
*,
|
89
89
|
client: AuthenticatedClient,
|
90
90
|
environment: Union[Unset, str] = UNSET,
|
91
91
|
) -> Optional[Knowledgebase]:
|
92
92
|
"""Get knowledgebase
|
93
93
|
|
94
|
-
Returns an knowledgebase by
|
94
|
+
Returns an knowledgebase by Name.
|
95
95
|
|
96
96
|
Args:
|
97
|
-
|
97
|
+
knowledgebase_name (str):
|
98
98
|
environment (Union[Unset, str]):
|
99
99
|
|
100
100
|
Raises:
|
@@ -106,24 +106,24 @@ def sync(
|
|
106
106
|
"""
|
107
107
|
|
108
108
|
return sync_detailed(
|
109
|
-
|
109
|
+
knowledgebase_name=knowledgebase_name,
|
110
110
|
client=client,
|
111
111
|
environment=environment,
|
112
112
|
).parsed
|
113
113
|
|
114
114
|
|
115
115
|
async def asyncio_detailed(
|
116
|
-
|
116
|
+
knowledgebase_name: str,
|
117
117
|
*,
|
118
118
|
client: AuthenticatedClient,
|
119
119
|
environment: Union[Unset, str] = UNSET,
|
120
120
|
) -> Response[Knowledgebase]:
|
121
121
|
"""Get knowledgebase
|
122
122
|
|
123
|
-
Returns an knowledgebase by
|
123
|
+
Returns an knowledgebase by Name.
|
124
124
|
|
125
125
|
Args:
|
126
|
-
|
126
|
+
knowledgebase_name (str):
|
127
127
|
environment (Union[Unset, str]):
|
128
128
|
|
129
129
|
Raises:
|
@@ -135,7 +135,7 @@ async def asyncio_detailed(
|
|
135
135
|
"""
|
136
136
|
|
137
137
|
kwargs = _get_kwargs(
|
138
|
-
|
138
|
+
knowledgebase_name=knowledgebase_name,
|
139
139
|
environment=environment,
|
140
140
|
)
|
141
141
|
|
@@ -145,17 +145,17 @@ async def asyncio_detailed(
|
|
145
145
|
|
146
146
|
|
147
147
|
async def asyncio(
|
148
|
-
|
148
|
+
knowledgebase_name: str,
|
149
149
|
*,
|
150
150
|
client: AuthenticatedClient,
|
151
151
|
environment: Union[Unset, str] = UNSET,
|
152
152
|
) -> Optional[Knowledgebase]:
|
153
153
|
"""Get knowledgebase
|
154
154
|
|
155
|
-
Returns an knowledgebase by
|
155
|
+
Returns an knowledgebase by Name.
|
156
156
|
|
157
157
|
Args:
|
158
|
-
|
158
|
+
knowledgebase_name (str):
|
159
159
|
environment (Union[Unset, str]):
|
160
160
|
|
161
161
|
Raises:
|
@@ -168,7 +168,7 @@ async def asyncio(
|
|
168
168
|
|
169
169
|
return (
|
170
170
|
await asyncio_detailed(
|
171
|
-
|
171
|
+
knowledgebase_name=knowledgebase_name,
|
172
172
|
client=client,
|
173
173
|
environment=environment,
|
174
174
|
)
|