beamlit 0.0.34rc61__py3-none-any.whl → 0.0.34rc63__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/chat.py +9 -4
- beamlit/agents/decorator.py +13 -140
- beamlit/api/service_accounts/create_workspace_service_account.py +3 -1
- beamlit/api/service_accounts/delete_workspace_service_account.py +3 -1
- beamlit/api/service_accounts/get_workspace_service_accounts.py +3 -1
- beamlit/api/service_accounts/update_workspace_service_account.py +3 -1
- beamlit/deploy/deploy.py +8 -6
- beamlit/functions/__init__.py +2 -2
- beamlit/functions/decorator.py +148 -1
- beamlit/models/__init__.py +3 -1
- beamlit/serve/app.py +1 -1
- {beamlit-0.0.34rc61.dist-info → beamlit-0.0.34rc63.dist-info}/METADATA +1 -1
- {beamlit-0.0.34rc61.dist-info → beamlit-0.0.34rc63.dist-info}/RECORD +14 -14
- {beamlit-0.0.34rc61.dist-info → beamlit-0.0.34rc63.dist-info}/WHEEL +0 -0
beamlit/agents/chat.py
CHANGED
@@ -1,4 +1,7 @@
|
|
1
1
|
from logging import getLogger
|
2
|
+
from typing import Tuple, Union
|
3
|
+
|
4
|
+
from langchain_core.language_models import BaseChatModel
|
2
5
|
|
3
6
|
from beamlit.authentication import get_authentication_headers, new_client
|
4
7
|
from beamlit.common.settings import get_settings
|
@@ -39,11 +42,11 @@ def get_cohere_chat_model(**kwargs):
|
|
39
42
|
|
40
43
|
return ChatCohere(**kwargs)
|
41
44
|
|
42
|
-
def get_chat_model(name: str, agent_model: Model):
|
45
|
+
def get_chat_model(name: str, agent_model: Union[Model, None] = None) -> Tuple[BaseChatModel, str, str]:
|
43
46
|
settings = get_settings()
|
44
47
|
client = new_client()
|
45
48
|
|
46
|
-
environment = (agent_model.metadata and agent_model.metadata.environment) or settings.environment
|
49
|
+
environment = (agent_model and agent_model.metadata and agent_model.metadata.environment) or settings.environment
|
47
50
|
headers = get_authentication_headers(settings)
|
48
51
|
headers["X-Beamlit-Environment"] = environment
|
49
52
|
|
@@ -84,7 +87,8 @@ def get_chat_model(name: str, agent_model: Model):
|
|
84
87
|
}
|
85
88
|
|
86
89
|
provider = (
|
87
|
-
agent_model
|
90
|
+
agent_model
|
91
|
+
and agent_model.spec
|
88
92
|
and agent_model.spec.runtime
|
89
93
|
and agent_model.spec.runtime.type_
|
90
94
|
)
|
@@ -93,7 +97,8 @@ def get_chat_model(name: str, agent_model: Model):
|
|
93
97
|
provider = "openai"
|
94
98
|
|
95
99
|
model = (
|
96
|
-
agent_model
|
100
|
+
agent_model
|
101
|
+
and agent_model.spec
|
97
102
|
and agent_model.spec.runtime
|
98
103
|
and agent_model.spec.runtime.model
|
99
104
|
)
|
beamlit/agents/decorator.py
CHANGED
@@ -1,122 +1,20 @@
|
|
1
1
|
# Import necessary modules
|
2
|
-
import ast
|
3
|
-
import asyncio
|
4
2
|
import functools
|
5
|
-
import importlib
|
6
|
-
import os
|
7
3
|
from logging import getLogger
|
8
4
|
|
9
|
-
from langchain_core.tools import StructuredTool
|
10
5
|
from langgraph.checkpoint.memory import MemorySaver
|
11
6
|
from langgraph.prebuilt import create_react_agent
|
12
|
-
from langchain_core.tools.base import create_schema_from_function
|
13
7
|
|
14
8
|
from beamlit.api.models import get_model
|
15
9
|
from beamlit.authentication import new_client
|
16
|
-
from beamlit.common import
|
17
|
-
from beamlit.common.settings import get_settings, init
|
10
|
+
from beamlit.common.settings import init
|
18
11
|
from beamlit.errors import UnexpectedStatus
|
19
|
-
from beamlit.functions
|
20
|
-
from beamlit.functions.remote.remote import RemoteToolkit
|
12
|
+
from beamlit.functions import get_functions
|
21
13
|
from beamlit.models import Agent, AgentMetadata, AgentSpec
|
22
14
|
|
23
|
-
from .chain import ChainToolkit
|
24
15
|
from .chat import get_chat_model
|
25
16
|
|
26
17
|
|
27
|
-
def get_functions(client, dir="src/functions", from_decorator="function", remote_functions_empty=True):
|
28
|
-
functions = []
|
29
|
-
logger = getLogger(__name__)
|
30
|
-
settings = get_settings()
|
31
|
-
|
32
|
-
# Walk through all Python files in functions directory and subdirectories
|
33
|
-
if not os.path.exists(dir):
|
34
|
-
if remote_functions_empty:
|
35
|
-
logger.warn(f"Functions directory {dir} not found")
|
36
|
-
return []
|
37
|
-
for root, _, files in os.walk(dir):
|
38
|
-
for file in files:
|
39
|
-
if file.endswith(".py"):
|
40
|
-
file_path = os.path.join(root, file)
|
41
|
-
# Read and compile the file content
|
42
|
-
with open(file_path) as f:
|
43
|
-
try:
|
44
|
-
file_content = f.read()
|
45
|
-
# Parse the file content to find decorated functions
|
46
|
-
tree = ast.parse(file_content)
|
47
|
-
|
48
|
-
# Look for function definitions with decorators
|
49
|
-
for node in ast.walk(tree):
|
50
|
-
if (
|
51
|
-
not isinstance(node, ast.FunctionDef)
|
52
|
-
and not isinstance(node, ast.AsyncFunctionDef)
|
53
|
-
) or len(node.decorator_list) == 0:
|
54
|
-
continue
|
55
|
-
decorator = node.decorator_list[0]
|
56
|
-
|
57
|
-
decorator_name = ""
|
58
|
-
if isinstance(decorator, ast.Call):
|
59
|
-
decorator_name = decorator.func.id
|
60
|
-
if isinstance(decorator, ast.Name):
|
61
|
-
decorator_name = decorator.id
|
62
|
-
|
63
|
-
if decorator_name == from_decorator:
|
64
|
-
# Get the function name and decorator name
|
65
|
-
func_name = node.name
|
66
|
-
|
67
|
-
# Import the module to get the actual function
|
68
|
-
spec = importlib.util.spec_from_file_location(func_name, file_path)
|
69
|
-
module = importlib.util.module_from_spec(spec)
|
70
|
-
spec.loader.exec_module(module)
|
71
|
-
# Check if kit=True in the decorator arguments
|
72
|
-
is_kit = False
|
73
|
-
if isinstance(decorator, ast.Call):
|
74
|
-
for keyword in decorator.keywords:
|
75
|
-
if keyword.arg == "kit" and isinstance(
|
76
|
-
keyword.value, ast.Constant
|
77
|
-
):
|
78
|
-
is_kit = keyword.value.value
|
79
|
-
if is_kit and not settings.remote:
|
80
|
-
kit_functions = get_functions(
|
81
|
-
client,
|
82
|
-
dir=os.path.join(root),
|
83
|
-
from_decorator="kit",
|
84
|
-
remote_functions_empty=remote_functions_empty,
|
85
|
-
)
|
86
|
-
functions.extend(kit_functions)
|
87
|
-
|
88
|
-
# Get the decorated function
|
89
|
-
if not is_kit and hasattr(module, func_name):
|
90
|
-
func = getattr(module, func_name)
|
91
|
-
if settings.remote:
|
92
|
-
toolkit = RemoteToolkit(client, slugify(func.__name__))
|
93
|
-
toolkit.initialize()
|
94
|
-
functions.extend(toolkit.get_tools())
|
95
|
-
else:
|
96
|
-
if asyncio.iscoroutinefunction(func):
|
97
|
-
functions.append(
|
98
|
-
StructuredTool(
|
99
|
-
name=func.__name__,
|
100
|
-
description=func.__doc__,
|
101
|
-
func=func,
|
102
|
-
coroutine=func,
|
103
|
-
args_schema=create_schema_from_function(func.__name__, func)
|
104
|
-
)
|
105
|
-
)
|
106
|
-
else:
|
107
|
-
functions.append(
|
108
|
-
StructuredTool(
|
109
|
-
name=func.__name__,
|
110
|
-
description=func.__doc__,
|
111
|
-
func=func,
|
112
|
-
args_schema=create_schema_from_function(func.__name__, func)
|
113
|
-
)
|
114
|
-
)
|
115
|
-
except Exception as e:
|
116
|
-
logger.warning(f"Error processing {file_path}: {e!s}")
|
117
|
-
return functions
|
118
|
-
|
119
|
-
|
120
18
|
def agent(
|
121
19
|
agent: Agent | dict = None,
|
122
20
|
override_model=None,
|
@@ -148,15 +46,6 @@ def agent(
|
|
148
46
|
|
149
47
|
return wrapped
|
150
48
|
|
151
|
-
# Initialize functions array to store decorated functions
|
152
|
-
functions = get_functions(
|
153
|
-
client,
|
154
|
-
dir=settings.agent.functions_directory,
|
155
|
-
remote_functions_empty=not remote_functions,
|
156
|
-
)
|
157
|
-
|
158
|
-
|
159
|
-
|
160
49
|
if agent is not None:
|
161
50
|
metadata = AgentMetadata(**agent.get("metadata", {}))
|
162
51
|
spec = AgentSpec(**agent.get("spec", {}))
|
@@ -187,32 +76,16 @@ def agent(
|
|
187
76
|
settings.agent.chat_model = chat_model
|
188
77
|
logger.info(f"Chat model configured, using: {provider}:{model}")
|
189
78
|
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
logger.warn(f"Failed to initialize MCP server {server}: {e!s}")
|
199
|
-
|
200
|
-
if remote_functions:
|
201
|
-
for function in remote_functions:
|
202
|
-
try:
|
203
|
-
toolkit = RemoteToolkit(client, function)
|
204
|
-
toolkit.initialize()
|
205
|
-
functions.extend(toolkit.get_tools())
|
206
|
-
except Exception as e:
|
207
|
-
logger.warn(f"Failed to initialize remote function {function}: {e!s}")
|
208
|
-
|
209
|
-
if agent.spec.agent_chain:
|
210
|
-
toolkit = ChainToolkit(client, agent.spec.agent_chain)
|
211
|
-
toolkit.initialize()
|
212
|
-
functions.extend(toolkit.get_tools())
|
213
|
-
|
79
|
+
functions = get_functions(
|
80
|
+
client=client,
|
81
|
+
dir=settings.agent.functions_directory,
|
82
|
+
mcp_hub=mcp_hub,
|
83
|
+
remote_functions=remote_functions,
|
84
|
+
chain=agent.spec.agent_chain,
|
85
|
+
remote_functions_empty=not remote_functions,
|
86
|
+
)
|
214
87
|
settings.agent.functions = functions
|
215
|
-
|
88
|
+
|
216
89
|
if override_agent is None and len(functions) == 0:
|
217
90
|
raise ValueError(
|
218
91
|
"You must define at least one function, you can define this function in directory "
|
@@ -225,8 +98,8 @@ def agent(
|
|
225
98
|
|
226
99
|
if override_agent is None and chat_model is not None:
|
227
100
|
memory = MemorySaver()
|
228
|
-
|
229
|
-
settings.agent.agent =
|
101
|
+
_agent = create_react_agent(chat_model, functions, checkpointer=memory)
|
102
|
+
settings.agent.agent = _agent
|
230
103
|
else:
|
231
104
|
settings.agent.agent = override_agent
|
232
105
|
return wrapper
|
@@ -6,7 +6,9 @@ import httpx
|
|
6
6
|
from ... import errors
|
7
7
|
from ...client import AuthenticatedClient, Client
|
8
8
|
from ...models.create_workspace_service_account_body import CreateWorkspaceServiceAccountBody
|
9
|
-
from ...models.create_workspace_service_account_response_200 import
|
9
|
+
from ...models.create_workspace_service_account_response_200 import (
|
10
|
+
CreateWorkspaceServiceAccountResponse200,
|
11
|
+
)
|
10
12
|
from ...types import Response
|
11
13
|
|
12
14
|
|
@@ -5,7 +5,9 @@ import httpx
|
|
5
5
|
|
6
6
|
from ... import errors
|
7
7
|
from ...client import AuthenticatedClient, Client
|
8
|
-
from ...models.delete_workspace_service_account_response_200 import
|
8
|
+
from ...models.delete_workspace_service_account_response_200 import (
|
9
|
+
DeleteWorkspaceServiceAccountResponse200,
|
10
|
+
)
|
9
11
|
from ...types import Response
|
10
12
|
|
11
13
|
|
@@ -5,7 +5,9 @@ import httpx
|
|
5
5
|
|
6
6
|
from ... import errors
|
7
7
|
from ...client import AuthenticatedClient, Client
|
8
|
-
from ...models.get_workspace_service_accounts_response_200_item import
|
8
|
+
from ...models.get_workspace_service_accounts_response_200_item import (
|
9
|
+
GetWorkspaceServiceAccountsResponse200Item,
|
10
|
+
)
|
9
11
|
from ...types import Response
|
10
12
|
|
11
13
|
|
@@ -6,7 +6,9 @@ import httpx
|
|
6
6
|
from ... import errors
|
7
7
|
from ...client import AuthenticatedClient, Client
|
8
8
|
from ...models.update_workspace_service_account_body import UpdateWorkspaceServiceAccountBody
|
9
|
-
from ...models.update_workspace_service_account_response_200 import
|
9
|
+
from ...models.update_workspace_service_account_response_200 import (
|
10
|
+
UpdateWorkspaceServiceAccountResponse200,
|
11
|
+
)
|
10
12
|
from ...types import Response
|
11
13
|
|
12
14
|
|
beamlit/deploy/deploy.py
CHANGED
@@ -3,11 +3,15 @@ import json
|
|
3
3
|
import os
|
4
4
|
import shutil
|
5
5
|
import sys
|
6
|
-
from pathlib import Path
|
7
|
-
import yaml
|
8
6
|
from logging import getLogger
|
7
|
+
from pathlib import Path
|
9
8
|
from typing import Literal
|
10
9
|
|
10
|
+
import yaml
|
11
|
+
|
12
|
+
from beamlit.api.agents import get_agent
|
13
|
+
from beamlit.authentication import new_client
|
14
|
+
from beamlit.client import AuthenticatedClient
|
11
15
|
from beamlit.common import slugify
|
12
16
|
from beamlit.common.settings import Settings, get_settings, init
|
13
17
|
from beamlit.models import (
|
@@ -19,9 +23,7 @@ from beamlit.models import (
|
|
19
23
|
FunctionSpec,
|
20
24
|
MetadataLabels,
|
21
25
|
)
|
22
|
-
|
23
|
-
from beamlit.authentication import new_client
|
24
|
-
from beamlit.client import AuthenticatedClient
|
26
|
+
|
25
27
|
from .format import arg_to_dict
|
26
28
|
from .parser import Resource, get_description, get_parameters, get_resources
|
27
29
|
|
@@ -110,7 +112,7 @@ def get_agent_yaml(
|
|
110
112
|
try:
|
111
113
|
agent_response = get_agent.sync(agent.metadata.name, client=client)
|
112
114
|
agent.spec.repository = agent_response.spec.repository
|
113
|
-
except Exception
|
115
|
+
except Exception:
|
114
116
|
pass
|
115
117
|
agent.spec.functions = [slugify(function.metadata.name) for (_, function) in functions]
|
116
118
|
agent.metadata.labels = agent.metadata.labels and MetadataLabels.from_dict(agent.metadata.labels) or MetadataLabels()
|
beamlit/functions/__init__.py
CHANGED
beamlit/functions/decorator.py
CHANGED
@@ -1,15 +1,162 @@
|
|
1
1
|
"""Decorators for creating function tools with Beamlit and LangChain integration."""
|
2
|
+
import ast
|
2
3
|
import asyncio
|
3
4
|
import functools
|
5
|
+
import importlib.util
|
6
|
+
import os
|
4
7
|
from collections.abc import Callable
|
5
8
|
from logging import getLogger
|
9
|
+
from typing import Union
|
6
10
|
|
7
11
|
from fastapi import Request
|
12
|
+
from langchain_core.tools import StructuredTool
|
13
|
+
from langchain_core.tools.base import create_schema_from_function
|
8
14
|
|
9
|
-
from beamlit.
|
15
|
+
from beamlit.authentication import new_client
|
16
|
+
from beamlit.client import AuthenticatedClient
|
17
|
+
from beamlit.common import slugify
|
18
|
+
from beamlit.common.settings import get_settings
|
19
|
+
from beamlit.functions.mcp.mcp import MCPClient, MCPToolkit
|
20
|
+
from beamlit.functions.remote.remote import RemoteToolkit
|
21
|
+
from beamlit.models import AgentChain, Function, FunctionKit
|
10
22
|
|
11
23
|
logger = getLogger(__name__)
|
12
24
|
|
25
|
+
def get_functions(
|
26
|
+
client:Union[AuthenticatedClient, None]=None,
|
27
|
+
dir:Union[str, None]=None,
|
28
|
+
mcp_hub:Union[list[str], None]=None,
|
29
|
+
remote_functions:Union[list[str], None]=None,
|
30
|
+
chain:Union[list[AgentChain], None]=None,
|
31
|
+
remote_functions_empty:bool=True,
|
32
|
+
from_decorator:str="function",
|
33
|
+
):
|
34
|
+
from beamlit.agents.chain import ChainToolkit
|
35
|
+
|
36
|
+
settings = get_settings()
|
37
|
+
if client is None:
|
38
|
+
client = new_client()
|
39
|
+
if dir is None:
|
40
|
+
dir = settings.agent.functions_directory
|
41
|
+
|
42
|
+
functions = []
|
43
|
+
logger = getLogger(__name__)
|
44
|
+
settings = get_settings()
|
45
|
+
|
46
|
+
# Walk through all Python files in functions directory and subdirectories
|
47
|
+
if not os.path.exists(dir):
|
48
|
+
if remote_functions_empty:
|
49
|
+
logger.warn(f"Functions directory {dir} not found")
|
50
|
+
return []
|
51
|
+
for root, _, files in os.walk(dir):
|
52
|
+
for file in files:
|
53
|
+
if file.endswith(".py"):
|
54
|
+
file_path = os.path.join(root, file)
|
55
|
+
# Read and compile the file content
|
56
|
+
with open(file_path) as f:
|
57
|
+
try:
|
58
|
+
file_content = f.read()
|
59
|
+
# Parse the file content to find decorated functions
|
60
|
+
tree = ast.parse(file_content)
|
61
|
+
|
62
|
+
# Look for function definitions with decorators
|
63
|
+
for node in ast.walk(tree):
|
64
|
+
if (
|
65
|
+
not isinstance(node, ast.FunctionDef)
|
66
|
+
and not isinstance(node, ast.AsyncFunctionDef)
|
67
|
+
) or len(node.decorator_list) == 0:
|
68
|
+
continue
|
69
|
+
decorator = node.decorator_list[0]
|
70
|
+
|
71
|
+
decorator_name = ""
|
72
|
+
if isinstance(decorator, ast.Call):
|
73
|
+
decorator_name = decorator.func.id
|
74
|
+
if isinstance(decorator, ast.Name):
|
75
|
+
decorator_name = decorator.id
|
76
|
+
if decorator_name == from_decorator:
|
77
|
+
# Get the function name and decorator name
|
78
|
+
func_name = node.name
|
79
|
+
|
80
|
+
# Import the module to get the actual function
|
81
|
+
spec = importlib.util.spec_from_file_location(func_name, file_path)
|
82
|
+
module = importlib.util.module_from_spec(spec)
|
83
|
+
spec.loader.exec_module(module)
|
84
|
+
# Check if kit=True in the decorator arguments
|
85
|
+
is_kit = False
|
86
|
+
if isinstance(decorator, ast.Call):
|
87
|
+
for keyword in decorator.keywords:
|
88
|
+
if keyword.arg == "kit" and isinstance(
|
89
|
+
keyword.value, ast.Constant
|
90
|
+
):
|
91
|
+
is_kit = keyword.value.value
|
92
|
+
if is_kit and not settings.remote:
|
93
|
+
kit_functions = get_functions(
|
94
|
+
client=client,
|
95
|
+
dir=os.path.join(root),
|
96
|
+
remote_functions_empty=remote_functions_empty,
|
97
|
+
from_decorator="kit",
|
98
|
+
)
|
99
|
+
functions.extend(kit_functions)
|
100
|
+
|
101
|
+
# Get the decorated function
|
102
|
+
if not is_kit and hasattr(module, func_name):
|
103
|
+
func = getattr(module, func_name)
|
104
|
+
if settings.remote:
|
105
|
+
toolkit = RemoteToolkit(client, slugify(func.__name__))
|
106
|
+
toolkit.initialize()
|
107
|
+
functions.extend(toolkit.get_tools())
|
108
|
+
else:
|
109
|
+
if asyncio.iscoroutinefunction(func):
|
110
|
+
functions.append(
|
111
|
+
StructuredTool(
|
112
|
+
name=func.__name__,
|
113
|
+
description=func.__doc__,
|
114
|
+
func=func,
|
115
|
+
coroutine=func,
|
116
|
+
args_schema=create_schema_from_function(func.__name__, func)
|
117
|
+
)
|
118
|
+
)
|
119
|
+
else:
|
120
|
+
|
121
|
+
functions.append(
|
122
|
+
StructuredTool(
|
123
|
+
name=func.__name__,
|
124
|
+
description=func.__doc__,
|
125
|
+
func=func,
|
126
|
+
args_schema=create_schema_from_function(func.__name__, func)
|
127
|
+
)
|
128
|
+
)
|
129
|
+
except Exception as e:
|
130
|
+
logger.warning(f"Error processing {file_path}: {e!s}")
|
131
|
+
|
132
|
+
if mcp_hub:
|
133
|
+
for server in mcp_hub:
|
134
|
+
try:
|
135
|
+
mcp_client = MCPClient(client, server)
|
136
|
+
toolkit = MCPToolkit(client=mcp_client)
|
137
|
+
toolkit.initialize()
|
138
|
+
functions.extend(toolkit.get_tools())
|
139
|
+
except Exception as e:
|
140
|
+
logger.warn(f"Failed to initialize MCP server {server}: {e!s}")
|
141
|
+
|
142
|
+
if remote_functions:
|
143
|
+
for function in remote_functions:
|
144
|
+
try:
|
145
|
+
toolkit = RemoteToolkit(client, function)
|
146
|
+
toolkit.initialize()
|
147
|
+
functions.extend(toolkit.get_tools())
|
148
|
+
except Exception as e:
|
149
|
+
logger.warn(f"Failed to initialize remote function {function}: {e!s}")
|
150
|
+
|
151
|
+
if chain:
|
152
|
+
toolkit = ChainToolkit(client, chain)
|
153
|
+
toolkit.initialize()
|
154
|
+
functions.extend(toolkit.get_tools())
|
155
|
+
|
156
|
+
return functions
|
157
|
+
|
158
|
+
|
159
|
+
|
13
160
|
def kit(bl_kit: FunctionKit = None, **kwargs: dict) -> Callable:
|
14
161
|
"""Create function tools with Beamlit and LangChain integration."""
|
15
162
|
|
beamlit/models/__init__.py
CHANGED
@@ -33,7 +33,9 @@ from .function_spec import FunctionSpec
|
|
33
33
|
from .get_trace_ids_response_200 import GetTraceIdsResponse200
|
34
34
|
from .get_trace_logs_response_200 import GetTraceLogsResponse200
|
35
35
|
from .get_trace_response_200 import GetTraceResponse200
|
36
|
-
from .get_workspace_service_accounts_response_200_item import
|
36
|
+
from .get_workspace_service_accounts_response_200_item import (
|
37
|
+
GetWorkspaceServiceAccountsResponse200Item,
|
38
|
+
)
|
37
39
|
from .increase_and_rate_metric import IncreaseAndRateMetric
|
38
40
|
from .integration_config import IntegrationConfig
|
39
41
|
from .integration_connection import IntegrationConnection
|
beamlit/serve/app.py
CHANGED
@@ -16,8 +16,8 @@ from beamlit.common import HTTPError, get_settings, init
|
|
16
16
|
from beamlit.common.instrumentation import (
|
17
17
|
get_resource_attributes,
|
18
18
|
get_span_exporter,
|
19
|
-
shutdown_instrumentation,
|
20
19
|
instrument_app,
|
20
|
+
shutdown_instrumentation,
|
21
21
|
)
|
22
22
|
|
23
23
|
from .middlewares import AccessLogMiddleware, AddProcessTimeHeader
|
@@ -6,8 +6,8 @@ beamlit/run.py,sha256=HtDYDjD7oVfQ8r3T5_t4qN5UDJOJfsQILi45Z21ArAg,1446
|
|
6
6
|
beamlit/types.py,sha256=E1hhDh_zXfsSQ0NCt9-uw90_Mr5iIlsdfnfvxv5HarU,1005
|
7
7
|
beamlit/agents/__init__.py,sha256=nf1iwQwGtCG6nDqyVhxfWoqR6dv6X3bvSpCeqkTCFaM,101
|
8
8
|
beamlit/agents/chain.py,sha256=vfCjiFHuu02uTTGicxMlFzjyICQkIjpXrBGs-7uJEsg,2826
|
9
|
-
beamlit/agents/chat.py,sha256=
|
10
|
-
beamlit/agents/decorator.py,sha256=
|
9
|
+
beamlit/agents/chat.py,sha256=4-MDbQ5Csrj0fjgdJo0EMf0tujkOWUYBHCEjyBqaeYc,3766
|
10
|
+
beamlit/agents/decorator.py,sha256=YU8FHrn9bYfgKuGtt42iPzOqiVvWC9GzbFLmhTacIsU,4183
|
11
11
|
beamlit/api/__init__.py,sha256=zTSiG_ujSjAqWPyc435YXaX9XTlpMjiJWBbV-f-YtdA,45
|
12
12
|
beamlit/api/agents/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
13
13
|
beamlit/api/agents/create_agent.py,sha256=t5Pr62My2EhQlcIY71MrI73-0_q5Djr3a_Ybt9MIiQQ,3587
|
@@ -98,12 +98,12 @@ beamlit/api/privateclusters/update_private_cluster.py,sha256=Urb5GGuVcSwQy2WBlru
|
|
98
98
|
beamlit/api/privateclusters/update_private_cluster_health.py,sha256=PxCyl5ZEIqpQ_PKIr9ErqjZcoTSKlTZS1YgTT1JwhCg,2572
|
99
99
|
beamlit/api/service_accounts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
100
100
|
beamlit/api/service_accounts/create_api_key_for_service_account.py,sha256=Ee9CXzYqVh9OTJeai8bKaclznuWpJiPd74aPHZYZdeQ,4525
|
101
|
-
beamlit/api/service_accounts/create_workspace_service_account.py,sha256=
|
101
|
+
beamlit/api/service_accounts/create_workspace_service_account.py,sha256=D3NkGoPZyMi6ibj29F7xbJd5aLI2jw2vLSl1qDRGhW4,4648
|
102
102
|
beamlit/api/service_accounts/delete_api_key_for_service_account.py,sha256=bS2OWtO7Dn8FU2uaTe9h7VCxiobti8Ka2NtTUKBd31Q,2621
|
103
|
-
beamlit/api/service_accounts/delete_workspace_service_account.py,sha256=
|
104
|
-
beamlit/api/service_accounts/get_workspace_service_accounts.py,sha256=
|
103
|
+
beamlit/api/service_accounts/delete_workspace_service_account.py,sha256=XEz6-DkWZTmuaTOMooaywKvBsGilBYR-xG32RsXP5Mw,4136
|
104
|
+
beamlit/api/service_accounts/get_workspace_service_accounts.py,sha256=6c7T_WsXCuotQomm4zkAkAkhdLEcgVyvon9aYHPiEiI,4151
|
105
105
|
beamlit/api/service_accounts/list_api_keys_for_service_account.py,sha256=skp0PmjxfW7EGAyRcVAye_SKfryKjvsTuhSRxeIaXDo,4066
|
106
|
-
beamlit/api/service_accounts/update_workspace_service_account.py,sha256=
|
106
|
+
beamlit/api/service_accounts/update_workspace_service_account.py,sha256=Y4rQL8Yx8yRZSzTJz5-ESP5zQ0juVhuoX6xwpg5ZM00,4912
|
107
107
|
beamlit/api/store/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
108
108
|
beamlit/api/store/get_store_agent.py,sha256=UjvsRXyFsXZLf4utQjpiOiPM7KxlRj4C-x_ac5EXoLk,3624
|
109
109
|
beamlit/api/store/get_store_function.py,sha256=kEbg91jJh0XAXmipjzwg931mxkMCZ820PxiJ89zYbso,3756
|
@@ -137,11 +137,11 @@ beamlit/common/settings.py,sha256=b2rvby-ufG3M0AB1ReoWFM-1EzF1LaE-gbokO9HvQDI,38
|
|
137
137
|
beamlit/common/slugify.py,sha256=nR29r37IdWS2i44ZC6ZsXRgqKPYmvMGtFQ7BuIQUTlc,90
|
138
138
|
beamlit/common/utils.py,sha256=jouz5igBvT37Xn_e94-foCHyQczVim-UzVcoIF6RWJ4,657
|
139
139
|
beamlit/deploy/__init__.py,sha256=GS7l7Jtm2yKs7iNLKcfjYO-rAhUzggQ3xiYSf3oxLBY,91
|
140
|
-
beamlit/deploy/deploy.py,sha256=
|
140
|
+
beamlit/deploy/deploy.py,sha256=h8ugvkSGcMKLqM-_uD5BZUzng5tJRp-Gea1Jup6QzTE,10257
|
141
141
|
beamlit/deploy/format.py,sha256=U6UZEFAYLnGJJ7O2YmSdlUUFhnWNGAv6NZ-DW4KTgvI,2049
|
142
142
|
beamlit/deploy/parser.py,sha256=Ga0poCZkoRnuTw082QnTcNGCBJncoRAnVsn8-1FsaJE,6907
|
143
|
-
beamlit/functions/__init__.py,sha256=
|
144
|
-
beamlit/functions/decorator.py,sha256=
|
143
|
+
beamlit/functions/__init__.py,sha256=NcQPZZNfWhAJ1T1F6Xn21LFPMbZ7aMR2Sve3uZOkBCQ,170
|
144
|
+
beamlit/functions/decorator.py,sha256=WkNF4-Y6XC9m-W9LRDJpzQEruQf98FxLpdY-Tc1VCUE,8679
|
145
145
|
beamlit/functions/github/__init__.py,sha256=gYnUkeegukOfbymdabuuJkScvH-_ZJygX05BoqkPn0o,49
|
146
146
|
beamlit/functions/github/github.py,sha256=FajzLCNkpXcwfgnC0l9rOGT2eSPLCz8-qrMzK9N_ZNc,598
|
147
147
|
beamlit/functions/github/kit/__init__.py,sha256=jBwPqZv6C23_utukohxqXZwrlicNlI7PYPUj0Den7Cw,136
|
@@ -152,7 +152,7 @@ beamlit/functions/mcp/mcp.py,sha256=-LL7O35vTlcYfF1MSlEY83rBKKShJTaHB-y9MRPAEiU,
|
|
152
152
|
beamlit/functions/remote/remote.py,sha256=AL8WhD7yXZ18h3iU4vE9E4JtJt0n_i-ZwlbBDoolnEs,3767
|
153
153
|
beamlit/functions/search/__init__.py,sha256=5NAthQ9PBwrkNg1FpLRx4flauvv0HyWuwaVS589c1Pw,49
|
154
154
|
beamlit/functions/search/search.py,sha256=8s9ECltq7YE17j6rTxb12uY2EQY4_eTLHmwlIMThI0w,515
|
155
|
-
beamlit/models/__init__.py,sha256=
|
155
|
+
beamlit/models/__init__.py,sha256=YMCHuYVLqV03yE_D8TB15I07F7wS1DYV022owTeMRYA,7897
|
156
156
|
beamlit/models/acl.py,sha256=tH67gsl_BMaviSbTaaIkO1g9cWZgJ6VgAnYVjQSzGZY,3952
|
157
157
|
beamlit/models/agent.py,sha256=nGRGNghN5RID5q8oikPVzj1_Aahh9GmDhVPMIA901zc,4372
|
158
158
|
beamlit/models/agent_chain.py,sha256=8PN8wVSayS-LoBN2nahZsOmr6r3t62H_LPDK_8fnkM8,2255
|
@@ -258,10 +258,10 @@ beamlit/models/websocket_channel.py,sha256=jg3vN7yS_oOIwGtndtIUr1LsyEA58RXLXahqS
|
|
258
258
|
beamlit/models/workspace.py,sha256=7G3Q9_D9n7_AczznYOToAsEGjWgMJwhnFb3flYNg2ro,4245
|
259
259
|
beamlit/models/workspace_labels.py,sha256=WbnUY6eCTkUNdY7hhhSF-KQCl8fWFfkCf7hzCTiNp4A,1246
|
260
260
|
beamlit/models/workspace_user.py,sha256=70CcifQWYbeWG7TDui4pblTzUe5sVK0AS19vNCzKE8g,3423
|
261
|
-
beamlit/serve/app.py,sha256=
|
261
|
+
beamlit/serve/app.py,sha256=_aG2UVQ3Y85rUW3ehu9TlzLnowkfh54IIz558ftqOMw,3638
|
262
262
|
beamlit/serve/middlewares/__init__.py,sha256=1dVmnOmhAQWvWktqHkKSIX-YoF6fmMU8xkUQuhg_rJU,148
|
263
263
|
beamlit/serve/middlewares/accesslog.py,sha256=Mu4T4_9OvHybjA0ApzZFpgi2C8f3X1NbUk-76v634XM,631
|
264
264
|
beamlit/serve/middlewares/processtime.py,sha256=lDAaIasZ4bwvN-HKHvZpaD9r-yrkVNZYx4abvbjbrCg,411
|
265
|
-
beamlit-0.0.
|
266
|
-
beamlit-0.0.
|
267
|
-
beamlit-0.0.
|
265
|
+
beamlit-0.0.34rc63.dist-info/METADATA,sha256=5yT2O9_PcJv8YSEgI8j46uT5f40N1oCx-I0fhj9zPdg,2412
|
266
|
+
beamlit-0.0.34rc63.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
267
|
+
beamlit-0.0.34rc63.dist-info/RECORD,,
|
File without changes
|