beamlit 0.0.56rc105__py3-none-any.whl → 0.0.56rc107__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/functions/mcp/mcp.py +5 -2
- beamlit/functions/remote/remote.py +2 -2
- beamlit/models/agent_information_response.py +0 -9
- {beamlit-0.0.56rc105.dist-info → beamlit-0.0.56rc107.dist-info}/METADATA +1 -1
- {beamlit-0.0.56rc105.dist-info → beamlit-0.0.56rc107.dist-info}/RECORD +8 -8
- {beamlit-0.0.56rc105.dist-info → beamlit-0.0.56rc107.dist-info}/WHEEL +0 -0
- {beamlit-0.0.56rc105.dist-info → beamlit-0.0.56rc107.dist-info}/entry_points.txt +0 -0
- {beamlit-0.0.56rc105.dist-info → beamlit-0.0.56rc107.dist-info}/licenses/LICENSE +0 -0
beamlit/functions/mcp/mcp.py
CHANGED
@@ -17,7 +17,10 @@ from mcp import ClientSession
|
|
17
17
|
from mcp.client.sse import sse_client
|
18
18
|
from mcp.types import CallToolResult, ListToolsResult
|
19
19
|
|
20
|
+
|
21
|
+
|
20
22
|
from beamlit.authentication.authentication import AuthenticatedClient
|
23
|
+
from beamlit.authentication import get_authentication_headers
|
21
24
|
from beamlit.common.settings import get_settings
|
22
25
|
|
23
26
|
from .utils import create_schema_model
|
@@ -36,7 +39,7 @@ class MCPClient:
|
|
36
39
|
async def list_sse_tools(self) -> ListToolsResult:
|
37
40
|
# Create a new context for each SSE connection
|
38
41
|
try:
|
39
|
-
async with sse_client(f"{self.url}/sse") as (read_stream, write_stream):
|
42
|
+
async with sse_client(f"{self.url}/sse", headers=get_authentication_headers(settings)) as (read_stream, write_stream):
|
40
43
|
async with ClientSession(read_stream, write_stream) as session:
|
41
44
|
await session.initialize()
|
42
45
|
response = await session.list_tools()
|
@@ -66,7 +69,7 @@ class MCPClient:
|
|
66
69
|
arguments: dict[str, Any] = None,
|
67
70
|
) -> requests.Response | AsyncIterator[CallToolResult]:
|
68
71
|
if self._sse:
|
69
|
-
async with sse_client(f"{self.url}/sse") as (read_stream, write_stream):
|
72
|
+
async with sse_client(f"{self.url}/sse", headers=get_authentication_headers(settings)) as (read_stream, write_stream):
|
70
73
|
async with ClientSession(read_stream, write_stream) as session:
|
71
74
|
await session.initialize()
|
72
75
|
response = await session.call_tool(tool_name, arguments or {})
|
@@ -119,15 +119,15 @@ class RemoteToolkit:
|
|
119
119
|
|
120
120
|
def initialize(self) -> None:
|
121
121
|
"""Initialize the session and retrieve the remote function details."""
|
122
|
+
settings = get_settings()
|
122
123
|
if self._function is None:
|
123
124
|
try:
|
124
|
-
response = get_function.sync_detailed(self.function, client=self.client)
|
125
|
+
response = get_function.sync_detailed(self.function, client=self.client, environment=settings.environment)
|
125
126
|
function_name = self.function.upper().replace("-", "_")
|
126
127
|
if os.getenv(f"BL_FUNCTION_{function_name}_SERVICE_NAME"):
|
127
128
|
self._service_name = os.getenv(f"BL_FUNCTION_{function_name}_SERVICE_NAME")
|
128
129
|
self._function = response.parsed
|
129
130
|
except UnexpectedStatus as e:
|
130
|
-
settings = get_settings()
|
131
131
|
functions = list_functions.sync_detailed(
|
132
132
|
client=self.client,
|
133
133
|
environment=settings.environment,
|
@@ -15,13 +15,11 @@ class AgentInformationResponse:
|
|
15
15
|
Attributes:
|
16
16
|
description (Union[Unset, str]): Description of the agent
|
17
17
|
display_name (Union[Unset, str]): Display name of the agent
|
18
|
-
name (Union[Unset, str]): Name of the agent
|
19
18
|
prompt (Union[Unset, str]): Prompt of the agent
|
20
19
|
"""
|
21
20
|
|
22
21
|
description: Union[Unset, str] = UNSET
|
23
22
|
display_name: Union[Unset, str] = UNSET
|
24
|
-
name: Union[Unset, str] = UNSET
|
25
23
|
prompt: Union[Unset, str] = UNSET
|
26
24
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
27
25
|
|
@@ -30,8 +28,6 @@ class AgentInformationResponse:
|
|
30
28
|
|
31
29
|
display_name = self.display_name
|
32
30
|
|
33
|
-
name = self.name
|
34
|
-
|
35
31
|
prompt = self.prompt
|
36
32
|
|
37
33
|
field_dict: dict[str, Any] = {}
|
@@ -41,8 +37,6 @@ class AgentInformationResponse:
|
|
41
37
|
field_dict["description"] = description
|
42
38
|
if display_name is not UNSET:
|
43
39
|
field_dict["displayName"] = display_name
|
44
|
-
if name is not UNSET:
|
45
|
-
field_dict["name"] = name
|
46
40
|
if prompt is not UNSET:
|
47
41
|
field_dict["prompt"] = prompt
|
48
42
|
|
@@ -57,14 +51,11 @@ class AgentInformationResponse:
|
|
57
51
|
|
58
52
|
display_name = d.pop("displayName", UNSET)
|
59
53
|
|
60
|
-
name = d.pop("name", UNSET)
|
61
|
-
|
62
54
|
prompt = d.pop("prompt", UNSET)
|
63
55
|
|
64
56
|
agent_information_response = cls(
|
65
57
|
description=description,
|
66
58
|
display_name=display_name,
|
67
|
-
name=name,
|
68
59
|
prompt=prompt,
|
69
60
|
)
|
70
61
|
|
@@ -149,9 +149,9 @@ beamlit/functions/__init__.py,sha256=Mnoqpa1dm7TXwjodBbF_40JyD78aXsOYWmqjDSnA1lU
|
|
149
149
|
beamlit/functions/common.py,sha256=4SK1N0VoQiydUT4frGT9OWMRxgHgMHUcsBhicMkcMmc,9996
|
150
150
|
beamlit/functions/decorator.py,sha256=iQbLwUo0K83DFJ3ub8O5jKtkbSINnku6GZcKJ9h7-5E,2292
|
151
151
|
beamlit/functions/local/local.py,sha256=KjkHWBxGlG9fliXnOOwZQEop1g2o10IaLiPo4Zu_XAk,1929
|
152
|
-
beamlit/functions/mcp/mcp.py,sha256=
|
152
|
+
beamlit/functions/mcp/mcp.py,sha256=7qftM5-EyY8DriXgVV1H-7KHoO7_Dn23QzQpMolRFk8,5767
|
153
153
|
beamlit/functions/mcp/utils.py,sha256=V7bah6cymdtjJ_LJUrNcHDeApDHA6uXvaGVeFJGKj2U,1850
|
154
|
-
beamlit/functions/remote/remote.py,sha256=
|
154
|
+
beamlit/functions/remote/remote.py,sha256=BQkRHOITBndco3ewH2g0_PXMef5OCx2g21GEQlS1_L4,6743
|
155
155
|
beamlit/models/__init__.py,sha256=Pb6m_N_UwQ7N-EgdlhaciTHuXyD-8OCwbLicC9Lee1w,10084
|
156
156
|
beamlit/models/acl.py,sha256=tH67gsl_BMaviSbTaaIkO1g9cWZgJ6VgAnYVjQSzGZY,3952
|
157
157
|
beamlit/models/agent.py,sha256=pkFemfg0OUAuiqebiT3PurXhjAKvgCa_YOPuyqFVE2o,4264
|
@@ -159,7 +159,7 @@ beamlit/models/agent_chain.py,sha256=Vz6galRoT20JRM3mAfaJ_HbOX2pS1pL_fyjYM35b0NI
|
|
159
159
|
beamlit/models/agent_history.py,sha256=76ZHoaz7oq3-2ikNQj25NmzyXOzx5JIPxOlfUyljRQg,5124
|
160
160
|
beamlit/models/agent_history_event.py,sha256=Ed_xaedwLEPNuM807Ldj5xqUBj4Eua9NqpCzpTRi0Og,3820
|
161
161
|
beamlit/models/agent_information_request.py,sha256=l5t_9R2IoZeS-FyPnrwkbQQT7Avzy8fe4ZzFuaNJls4,1868
|
162
|
-
beamlit/models/agent_information_response.py,sha256=
|
162
|
+
beamlit/models/agent_information_response.py,sha256=I-mm4d-mhd521Pkd3aZwVRv0Q9C4u0bCjglK50bnSkE,2345
|
163
163
|
beamlit/models/agent_release.py,sha256=AXtHX_Ze7cMh2tKnRw2usRWnLf2B9u_iFPTF6WYdJLM,1928
|
164
164
|
beamlit/models/agent_spec.py,sha256=EKYoV5NTc1AVz_8_R6-Cm2LUvR6kiJsd-aPk4iaEd5c,13221
|
165
165
|
beamlit/models/api_key.py,sha256=oKuqDF0xe2Z2-6yJqulbzlXEQyM3W7lvQn6FXCktaaU,4278
|
@@ -282,8 +282,8 @@ beamlit/serve/app.py,sha256=lM59fdUtfkfAYNPWSCU9pkXIPBnhgVGvvgfoMkSVtks,4531
|
|
282
282
|
beamlit/serve/middlewares/__init__.py,sha256=O7fyfE1DIYmajFY9WWdzxCgeAQWZzJfeUjzHGbpWaAk,309
|
283
283
|
beamlit/serve/middlewares/accesslog.py,sha256=lcu33j4epFSHRBaeTpyt8deNb3kaM3K91-andw4fp80,1112
|
284
284
|
beamlit/serve/middlewares/processtime.py,sha256=3x5w1yQexB0xFNKK6fgLbINxT-eLLunfZ6UDV0bIIF4,944
|
285
|
-
beamlit-0.0.
|
286
|
-
beamlit-0.0.
|
287
|
-
beamlit-0.0.
|
288
|
-
beamlit-0.0.
|
289
|
-
beamlit-0.0.
|
285
|
+
beamlit-0.0.56rc107.dist-info/METADATA,sha256=KgH3gUuxMqxqWvDfWar59ZjNAsqE1RrCRivH1PMftvs,3515
|
286
|
+
beamlit-0.0.56rc107.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
287
|
+
beamlit-0.0.56rc107.dist-info/entry_points.txt,sha256=zxhgdn7SP-Otk4rEv7LMPAAa9w4TUCLbu9TJi9-K3xg,115
|
288
|
+
beamlit-0.0.56rc107.dist-info/licenses/LICENSE,sha256=p5PNQvpvyDT_0aYBDgmV1fFI_vAD2aSV0wWG7VTgRis,1069
|
289
|
+
beamlit-0.0.56rc107.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|