beamlit 0.0.58__py3-none-any.whl → 0.0.59__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 +6 -3
- beamlit/authentication/clientcredentials.py +1 -1
- beamlit/authentication/credentials.py +1 -2
- {beamlit-0.0.58.dist-info → beamlit-0.0.59.dist-info}/METADATA +1 -1
- {beamlit-0.0.58.dist-info → beamlit-0.0.59.dist-info}/RECORD +8 -8
- {beamlit-0.0.58.dist-info → beamlit-0.0.59.dist-info}/WHEEL +0 -0
- {beamlit-0.0.58.dist-info → beamlit-0.0.59.dist-info}/entry_points.txt +0 -0
- {beamlit-0.0.58.dist-info → beamlit-0.0.59.dist-info}/licenses/LICENSE +0 -0
beamlit/agents/decorator.py
CHANGED
@@ -8,7 +8,7 @@ import asyncio
|
|
8
8
|
import functools
|
9
9
|
import inspect
|
10
10
|
from logging import getLogger
|
11
|
-
from typing import Callable
|
11
|
+
from typing import Any, Callable
|
12
12
|
|
13
13
|
from langgraph.checkpoint.memory import MemorySaver
|
14
14
|
from langgraph.prebuilt import create_react_agent
|
@@ -37,6 +37,9 @@ async def initialize_agent(
|
|
37
37
|
client = new_client()
|
38
38
|
chat_model = override_model or None
|
39
39
|
|
40
|
+
if asyncio.iscoroutinefunction(override_agent):
|
41
|
+
override_agent = await override_agent()
|
42
|
+
|
40
43
|
if agent is not None:
|
41
44
|
metadata = Metadata(**agent.get("metadata", {}))
|
42
45
|
spec = AgentSpec(**agent.get("spec", {}))
|
@@ -125,7 +128,7 @@ async def initialize_agent(
|
|
125
128
|
def agent(
|
126
129
|
agent: Agent | dict = None,
|
127
130
|
override_model=None,
|
128
|
-
override_agent=None,
|
131
|
+
override_agent: Any | Callable = None,
|
129
132
|
override_functions=None,
|
130
133
|
remote_functions=None,
|
131
134
|
local_functions=None,
|
@@ -137,7 +140,7 @@ def agent(
|
|
137
140
|
Parameters:
|
138
141
|
agent (Agent | dict, optional): An `Agent` instance or a dictionary containing agent metadata and specifications.
|
139
142
|
override_model (Any, optional): An optional model to override the default agent model.
|
140
|
-
override_agent (Any, optional): An optional agent instance to override the default agent.
|
143
|
+
override_agent (Any, Callable, optional): An optional agent instance to override the default agent, or a function which returns an agent instance.
|
141
144
|
mcp_hub (Any, optional): An optional MCP hub configuration.
|
142
145
|
remote_functions (Any, optional): An optional list of remote functions to be integrated.
|
143
146
|
local_functions (Any, optional): An optional list of local functions to be integrated.
|
@@ -10,7 +10,6 @@ from pathlib import Path
|
|
10
10
|
from typing import List
|
11
11
|
|
12
12
|
import yaml
|
13
|
-
|
14
13
|
from beamlit.common.settings import Settings
|
15
14
|
|
16
15
|
logger = getLogger(__name__)
|
@@ -132,7 +131,7 @@ def load_config() -> Config:
|
|
132
131
|
workspaces.append(WorkspaceConfig(name=ws["name"], credentials=creds))
|
133
132
|
config.workspaces = workspaces
|
134
133
|
if "context" in data:
|
135
|
-
config.context = ContextConfig(
|
134
|
+
config.context = ContextConfig(workspace=data["context"].get("workspace", ""))
|
136
135
|
except yaml.YAMLError:
|
137
136
|
# Invalid YAML, use empty config
|
138
137
|
pass
|
@@ -7,7 +7,7 @@ beamlit/types.py,sha256=E1hhDh_zXfsSQ0NCt9-uw90_Mr5iIlsdfnfvxv5HarU,1005
|
|
7
7
|
beamlit/agents/__init__.py,sha256=bWsFaXUbAps3IsL3Prti89m1s714vICXodbQi77h3vY,206
|
8
8
|
beamlit/agents/chain.py,sha256=JsinjAYBr3oaM4heouZaiaV2jMmi779LHAMtD_4P59s,4867
|
9
9
|
beamlit/agents/chat.py,sha256=elnJbS28aSRXwmIsAlS0guVK7swRpbY61yFL1QVeGbI,8943
|
10
|
-
beamlit/agents/decorator.py,sha256=
|
10
|
+
beamlit/agents/decorator.py,sha256=YUhvdZfnfK33OuuWu66MWgxrN_8bcLQDe9iEUNGT2es,8519
|
11
11
|
beamlit/agents/thread.py,sha256=kMLqMlWZIHNJdsQHvtlh3C99LuMsS0XrMks-vJaV9U4,787
|
12
12
|
beamlit/agents/voice/openai.py,sha256=-RDBwl16i4TbUhFo5-77Ci3zmI3Y8U2yf2MmvXR2haQ,9479
|
13
13
|
beamlit/agents/voice/utils.py,sha256=tQidyM40Ewuy12wKqpvJLvfJgneQ0sZf50dqnerPGHg,836
|
@@ -115,8 +115,8 @@ beamlit/api/workspaces/update_workspace_user_role.py,sha256=Yn9iuJ4tKtauzBiJyU4-
|
|
115
115
|
beamlit/authentication/__init__.py,sha256=wiXqRbc7E-ulrH_ueA9duOGFvXeo7-RvhSD1XbFogMo,1020
|
116
116
|
beamlit/authentication/apikey.py,sha256=Q3Kz4Zbc_Lr6lYwiwiLo6AhggKcdqsd6xJjDi-nERiI,1557
|
117
117
|
beamlit/authentication/authentication.py,sha256=OgqS6YciBnh0MomeEaL2YuZt1fHPOfQUkRhsIu6tcvk,5812
|
118
|
-
beamlit/authentication/clientcredentials.py,sha256=
|
119
|
-
beamlit/authentication/credentials.py,sha256=
|
118
|
+
beamlit/authentication/clientcredentials.py,sha256=oKopOql7nugarWwcuJ_2mGaPODuIsixnxyX2I-yRTGM,5191
|
119
|
+
beamlit/authentication/credentials.py,sha256=YNMCRpNa2Cs7lN647Sz4-8LxfZtJPhSyyxCVwNzTAxo,8741
|
120
120
|
beamlit/authentication/device_mode.py,sha256=gBJqJpWQXEG8gZbWXhlvQyk8FfHH95-aqURUnudil-4,6526
|
121
121
|
beamlit/common/__init__.py,sha256=saX5X3hRCJ9erSlXuSkZ2VGgquvpgdcofAU_9sM4bCE,354
|
122
122
|
beamlit/common/error.py,sha256=eOftZvd6XsAcQIYl9V7B1msGnTZf-HO0hGxBw1uIxaA,763
|
@@ -254,8 +254,8 @@ beamlit/serve/app.py,sha256=5XZci-R95Zjl97wMtQd1BRtonnkJJ2AeoTVFPKGAOfA,4283
|
|
254
254
|
beamlit/serve/middlewares/__init__.py,sha256=O7fyfE1DIYmajFY9WWdzxCgeAQWZzJfeUjzHGbpWaAk,309
|
255
255
|
beamlit/serve/middlewares/accesslog.py,sha256=lcu33j4epFSHRBaeTpyt8deNb3kaM3K91-andw4fp80,1112
|
256
256
|
beamlit/serve/middlewares/processtime.py,sha256=3x5w1yQexB0xFNKK6fgLbINxT-eLLunfZ6UDV0bIIF4,944
|
257
|
-
beamlit-0.0.
|
258
|
-
beamlit-0.0.
|
259
|
-
beamlit-0.0.
|
260
|
-
beamlit-0.0.
|
261
|
-
beamlit-0.0.
|
257
|
+
beamlit-0.0.59.dist-info/METADATA,sha256=yrp2SCE0IZUOM1-gJkdGJAK0nY9G2DHi2HQvM9QVLNQ,3542
|
258
|
+
beamlit-0.0.59.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
259
|
+
beamlit-0.0.59.dist-info/entry_points.txt,sha256=zxhgdn7SP-Otk4rEv7LMPAAa9w4TUCLbu9TJi9-K3xg,115
|
260
|
+
beamlit-0.0.59.dist-info/licenses/LICENSE,sha256=p5PNQvpvyDT_0aYBDgmV1fFI_vAD2aSV0wWG7VTgRis,1069
|
261
|
+
beamlit-0.0.59.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|