beamlit 0.0.59rc122__py3-none-any.whl → 0.0.59rc124__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.
@@ -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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: beamlit
3
- Version: 0.0.59rc122
3
+ Version: 0.0.59rc124
4
4
  Summary: Add your description here
5
5
  Author-email: cploujoux <ch.ploujoux@gmail.com>
6
6
  License-File: LICENSE
@@ -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=VtFtMu8rNIS5fAUr39MnUIW8EGrY_84fUnkz2859yK4,8338
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
@@ -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.59rc122.dist-info/METADATA,sha256=m_SrV1-nCvObekAwovLP11nDfiDg1oV8yL497RpLxoM,3547
258
- beamlit-0.0.59rc122.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
259
- beamlit-0.0.59rc122.dist-info/entry_points.txt,sha256=zxhgdn7SP-Otk4rEv7LMPAAa9w4TUCLbu9TJi9-K3xg,115
260
- beamlit-0.0.59rc122.dist-info/licenses/LICENSE,sha256=p5PNQvpvyDT_0aYBDgmV1fFI_vAD2aSV0wWG7VTgRis,1069
261
- beamlit-0.0.59rc122.dist-info/RECORD,,
257
+ beamlit-0.0.59rc124.dist-info/METADATA,sha256=FIAPsgRStlEEjUucK5ousxjERRUxWQsbbmkaiVQstxc,3547
258
+ beamlit-0.0.59rc124.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
259
+ beamlit-0.0.59rc124.dist-info/entry_points.txt,sha256=zxhgdn7SP-Otk4rEv7LMPAAa9w4TUCLbu9TJi9-K3xg,115
260
+ beamlit-0.0.59rc124.dist-info/licenses/LICENSE,sha256=p5PNQvpvyDT_0aYBDgmV1fFI_vAD2aSV0wWG7VTgRis,1069
261
+ beamlit-0.0.59rc124.dist-info/RECORD,,