beamlit 0.0.29rc27__py3-none-any.whl → 0.0.29rc29__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/decorator.py +10 -4
- beamlit/common/settings.py +2 -2
- beamlit/deploy/deploy.py +5 -5
- {beamlit-0.0.29rc27.dist-info → beamlit-0.0.29rc29.dist-info}/METADATA +1 -1
- {beamlit-0.0.29rc27.dist-info → beamlit-0.0.29rc29.dist-info}/RECORD +6 -6
- {beamlit-0.0.29rc27.dist-info → beamlit-0.0.29rc29.dist-info}/WHEEL +0 -0
beamlit/agents/decorator.py
CHANGED
@@ -17,16 +17,18 @@ from langchain_core.tools import Tool
|
|
17
17
|
from langgraph.checkpoint.memory import MemorySaver
|
18
18
|
from langgraph.prebuilt import create_react_agent
|
19
19
|
|
20
|
-
from .chat import get_chat_model
|
21
20
|
from .chain import ChainToolkit
|
21
|
+
from .chat import get_chat_model
|
22
|
+
|
22
23
|
|
23
|
-
def get_functions(dir="src/functions", from_decorator="function"):
|
24
|
+
def get_functions(dir="src/functions", from_decorator="function", remote_functions_empty=True):
|
24
25
|
functions = []
|
25
26
|
logger = getLogger(__name__)
|
26
27
|
|
27
28
|
# Walk through all Python files in functions directory and subdirectories
|
28
29
|
if not os.path.exists(dir):
|
29
|
-
|
30
|
+
if remote_functions_empty:
|
31
|
+
logger.warn(f"Functions directory {dir} not found")
|
30
32
|
return []
|
31
33
|
for root, _, files in os.walk(dir):
|
32
34
|
for file in files:
|
@@ -74,6 +76,7 @@ def get_functions(dir="src/functions", from_decorator="function"):
|
|
74
76
|
kit_functions = get_functions(
|
75
77
|
dir=os.path.join(root),
|
76
78
|
from_decorator="kit",
|
79
|
+
remote_functions_empty=remote_functions_empty,
|
77
80
|
)
|
78
81
|
functions.extend(kit_functions)
|
79
82
|
|
@@ -134,7 +137,10 @@ def agent(
|
|
134
137
|
return wrapped
|
135
138
|
|
136
139
|
# Initialize functions array to store decorated functions
|
137
|
-
functions = get_functions(
|
140
|
+
functions = get_functions(
|
141
|
+
dir=settings.agent.functions_directory,
|
142
|
+
remote_functions_empty=not remote_functions,
|
143
|
+
)
|
138
144
|
settings.agent.functions = functions
|
139
145
|
|
140
146
|
if agent is not None:
|
beamlit/common/settings.py
CHANGED
@@ -60,7 +60,7 @@ class Settings(BaseSettings):
|
|
60
60
|
base_url: str = Field(default="https://api.beamlit.com/v0")
|
61
61
|
run_url: str = Field(default="https://run.beamlit.com")
|
62
62
|
mcp_hub_url: str = Field(default="https://mcp-hub-server.beamlit.workers.com")
|
63
|
-
registry_url: str = Field(default="https://
|
63
|
+
registry_url: str = Field(default="https://us.registry.beamlit.com")
|
64
64
|
log_level: str = Field(default="INFO")
|
65
65
|
agent: SettingsAgent = SettingsAgent()
|
66
66
|
server: SettingsServer = SettingsServer()
|
@@ -72,7 +72,7 @@ class Settings(BaseSettings):
|
|
72
72
|
self.base_url = "https://api.beamlit.dev/v0"
|
73
73
|
self.run_url = "https://run.beamlit.dev"
|
74
74
|
self.mcp_hub_url = "https://mcp-hub-server.beamlit.workers.dev"
|
75
|
-
self.registry_url = "https://
|
75
|
+
self.registry_url = "https://eu.registry.beamlit.dev"
|
76
76
|
|
77
77
|
@classmethod
|
78
78
|
def settings_customise_sources(
|
beamlit/deploy/deploy.py
CHANGED
@@ -29,8 +29,8 @@ def set_default_values(resource: Resource, deployment: Agent | Function):
|
|
29
29
|
deployment.metadata.environment = settings.environment
|
30
30
|
if not deployment.metadata.name:
|
31
31
|
deployment.metadata.name = resource.name
|
32
|
-
if not deployment.metadata.
|
33
|
-
deployment.metadata.
|
32
|
+
if not deployment.metadata.display_name:
|
33
|
+
deployment.metadata.display_name = deployment.metadata.name
|
34
34
|
if not deployment.spec.description:
|
35
35
|
deployment.spec.description = get_description(None, resource)
|
36
36
|
if not deployment.spec.runtime:
|
@@ -111,14 +111,14 @@ apiVersion: beamlit.com/v1alpha1
|
|
111
111
|
kind: Agent
|
112
112
|
metadata:
|
113
113
|
name: {agent.metadata.name}
|
114
|
-
displayName: {agent.metadata.
|
114
|
+
displayName: {agent.metadata.display_name or agent.metadata.name}
|
115
115
|
environment: {settings.environment}
|
116
116
|
workspace: {settings.workspace}
|
117
117
|
spec:
|
118
118
|
enabled: true
|
119
119
|
policies: [{", ".join(agent.spec.policies or [])}]
|
120
120
|
functions: [{", ".join([f"{function.metadata.name}" for (_, function) in functions])}]
|
121
|
-
agentChain: {format_agent_chain(agent.spec.
|
121
|
+
agentChain: {format_agent_chain(agent.spec.agent_chain)}
|
122
122
|
model: {agent.spec.model}
|
123
123
|
runtime:
|
124
124
|
image: {agent.spec.runtime.image}
|
@@ -145,7 +145,7 @@ apiVersion: beamlit.com/v1alpha1
|
|
145
145
|
kind: Function
|
146
146
|
metadata:
|
147
147
|
name: {function.metadata.name}
|
148
|
-
displayName: {function.metadata.
|
148
|
+
displayName: {function.metadata.display_name or function.metadata.name}
|
149
149
|
environment: {settings.environment}
|
150
150
|
spec:
|
151
151
|
enabled: true
|
@@ -7,7 +7,7 @@ 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=HzBs3nI4xaH86I_r-M-HGGp6roXsJxMx-qXl_GrJaY0,2831
|
9
9
|
beamlit/agents/chat.py,sha256=gVyv4FGBdQTDhdutX8l64OUNa6Fdqaw4eCfEDRH0IPQ,3558
|
10
|
-
beamlit/agents/decorator.py,sha256=
|
10
|
+
beamlit/agents/decorator.py,sha256=4KxPcu6hPoB__1OdzpEJVD5N3QVa_syKd_Y6n6lVEjQ,9715
|
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
|
@@ -133,10 +133,10 @@ beamlit/common/generate.py,sha256=LtdCju_QayRS4lZrrb_0VHqWWvTcv4Mbf-iV1TB_Qko,75
|
|
133
133
|
beamlit/common/instrumentation.py,sha256=MsBDfFcMYqGDiHHj4j5hLHE4EWxZExkhmCeFS3SKzJY,3181
|
134
134
|
beamlit/common/logger.py,sha256=VFRbaZh93n8ZGugeeYKe88IP2nI3g2JNa7XN4j8wVJE,1116
|
135
135
|
beamlit/common/secrets.py,sha256=sid81bOe3LflkMKDHwBsBs9nIju8bp5-v9qU9gkyNMc,212
|
136
|
-
beamlit/common/settings.py,sha256=
|
136
|
+
beamlit/common/settings.py,sha256=inAjEPF1OG9fsamuuSKe4z-sZ-cfZ-Qn1evnME44Fz4,5777
|
137
137
|
beamlit/common/utils.py,sha256=jouz5igBvT37Xn_e94-foCHyQczVim-UzVcoIF6RWJ4,657
|
138
138
|
beamlit/deploy/__init__.py,sha256=GS7l7Jtm2yKs7iNLKcfjYO-rAhUzggQ3xiYSf3oxLBY,91
|
139
|
-
beamlit/deploy/deploy.py,sha256=
|
139
|
+
beamlit/deploy/deploy.py,sha256=on1i93SdECKrLVRMm3V2BRW5JeolPPq1dJHa4Evp0ns,9188
|
140
140
|
beamlit/deploy/format.py,sha256=78tOoeNPJ8969AhQTeFlIwZgQ3un8gmTSMmrYbRQSds,1818
|
141
141
|
beamlit/deploy/parser.py,sha256=uT-bezLX6yjyxr1ogm1GXIT_MeREqHDUBlKiyav5qg0,6912
|
142
142
|
beamlit/functions/__init__.py,sha256=_RPG1Bfg54JGdIPnViAU6n9zD7E1cDNsdXi8oYGskzE,138
|
@@ -254,6 +254,6 @@ beamlit/serve/app.py,sha256=OpwPjRdyHZK6J-ziPwhiRDGGa2mvCrFVcBFE6alJVOM,3071
|
|
254
254
|
beamlit/serve/middlewares/__init__.py,sha256=1dVmnOmhAQWvWktqHkKSIX-YoF6fmMU8xkUQuhg_rJU,148
|
255
255
|
beamlit/serve/middlewares/accesslog.py,sha256=Mu4T4_9OvHybjA0ApzZFpgi2C8f3X1NbUk-76v634XM,631
|
256
256
|
beamlit/serve/middlewares/processtime.py,sha256=lDAaIasZ4bwvN-HKHvZpaD9r-yrkVNZYx4abvbjbrCg,411
|
257
|
-
beamlit-0.0.
|
258
|
-
beamlit-0.0.
|
259
|
-
beamlit-0.0.
|
257
|
+
beamlit-0.0.29rc29.dist-info/METADATA,sha256=WGBXo_WZ4XmwGXOJAZoqq82BAcpdOQWgbymobbVBSr8,2405
|
258
|
+
beamlit-0.0.29rc29.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
259
|
+
beamlit-0.0.29rc29.dist-info/RECORD,,
|
File without changes
|