beamlit 0.0.55rc102__py3-none-any.whl → 0.0.56__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/chain.py CHANGED
@@ -5,12 +5,13 @@ from typing import Callable
5
5
 
6
6
  import pydantic
7
7
  import typing_extensions as t
8
+ from langchain_core.tools.base import BaseTool, ToolException
9
+
8
10
  from beamlit.api.agents import list_agents
9
11
  from beamlit.authentication.authentication import AuthenticatedClient
10
12
  from beamlit.common.settings import get_settings
11
13
  from beamlit.models import Agent, AgentChain
12
14
  from beamlit.run import RunClient
13
- from langchain_core.tools.base import BaseTool, ToolException
14
15
 
15
16
 
16
17
  class ChainTool(BaseTool):
@@ -175,10 +175,10 @@ def agent(
175
175
  "def hello_world(query: str):\n"
176
176
  " return 'Hello, world!'\n")
177
177
  try:
178
- _agent = create_react_agent(chat_model, functions, checkpointer=memory, stateModifier=agent.spec.prompt or "")
178
+ _agent = create_react_agent(chat_model, functions, checkpointer=memory, state_modifier=agent.spec.prompt or "")
179
179
  except AttributeError: # special case for azure-marketplace where it uses the old OpenAI interface (no tools)
180
180
  logger.warning("Using the old OpenAI interface for Azure Marketplace, no tools available")
181
- _agent = create_react_agent(chat_model, [], checkpointer=memory, stateModifier=agent.spec.prompt or "")
181
+ _agent = create_react_agent(chat_model, [], checkpointer=memory, state_modifier=agent.spec.prompt or "")
182
182
 
183
183
  settings.agent.agent = _agent
184
184
  else:
beamlit/agents/thread.py CHANGED
@@ -22,7 +22,10 @@ def get_default_thread(request: Request) -> str:
22
22
  return request.headers.get("X-Beamlit-Sub")
23
23
  authorization = request.headers.get("Authorization", request.headers.get("X-Beamlit-Authorization"))
24
24
  if authorization and len(authorization.split("Bearer ")) > 1:
25
- token = authorization.split(" ")[1]
26
- decoded = jwt.decode(token, options={"verify_signature": False})
27
- return decoded["sub"]
25
+ try:
26
+ token = authorization.split(" ")[1]
27
+ decoded = jwt.decode(token, options={"verify_signature": False})
28
+ return decoded["sub"]
29
+ except Exception:
30
+ return ""
28
31
  return ""
beamlit/deploy/format.py CHANGED
@@ -5,8 +5,6 @@ It includes functions to convert arguments, parameters, dictionaries, and agent
5
5
 
6
6
  import ast
7
7
 
8
- from beamlit.models import AgentChain, StoreFunctionParameter
9
-
10
8
 
11
9
  def arg_to_list(arg: ast.List):
12
10
  value = []
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: beamlit
3
- Version: 0.0.55rc102
3
+ Version: 0.0.56
4
4
  Summary: Add your description here
5
5
  Author-email: cploujoux <ch.ploujoux@gmail.com>
6
6
  License-File: LICENSE
@@ -5,10 +5,10 @@ beamlit/py.typed,sha256=8ZJUsxZiuOy1oJeVhsTWQhTG_6pTVHVXk5hJL79ebTk,25
5
5
  beamlit/run.py,sha256=ERZ0tA7TsocV_2LC81QbxPxCokNCSmrZv4kqh9sGEkc,3494
6
6
  beamlit/types.py,sha256=E1hhDh_zXfsSQ0NCt9-uw90_Mr5iIlsdfnfvxv5HarU,1005
7
7
  beamlit/agents/__init__.py,sha256=bWsFaXUbAps3IsL3Prti89m1s714vICXodbQi77h3vY,206
8
- beamlit/agents/chain.py,sha256=DPXMBZwyrkerto57pKJ0lFPcdrOeRyKLl4Vind_6ScM,4332
8
+ beamlit/agents/chain.py,sha256=xtOTOFQR9Wml-ZwW06cKZB4dIPmkQxpBx1dPyaE3PKk,4333
9
9
  beamlit/agents/chat.py,sha256=ItuS9zXkALgXVa6IevNpCVKvsicwg9OcUf4_VqO1x5Q,8603
10
- beamlit/agents/decorator.py,sha256=Ni8ndJthPvF1VuyGRfB5DJAqk-H2YRUCYNcA16NiPYE,8251
11
- beamlit/agents/thread.py,sha256=XNqj2WI3W2roQB7J5mpF1wEuGb3VtfvKQvWaEPx-sx8,1014
10
+ beamlit/agents/decorator.py,sha256=KdOKKf_svJc7Pa-eyP-_sXqEndZrEIQCV5Yfgz-zoQE,8253
11
+ beamlit/agents/thread.py,sha256=PVP9Gey8fMZHA-Cs8WbfmdSlD7g-n4HKuk1sTVf8yOQ,1087
12
12
  beamlit/agents/voice/openai.py,sha256=-RDBwl16i4TbUhFo5-77Ci3zmI3Y8U2yf2MmvXR2haQ,9479
13
13
  beamlit/agents/voice/utils.py,sha256=tQidyM40Ewuy12wKqpvJLvfJgneQ0sZf50dqnerPGHg,836
14
14
  beamlit/api/__init__.py,sha256=zTSiG_ujSjAqWPyc435YXaX9XTlpMjiJWBbV-f-YtdA,45
@@ -141,7 +141,7 @@ beamlit/common/slugify.py,sha256=QPJqa1VrSjRle931RN37t24rUjAbyZEg1UFAp2fLgac,679
141
141
  beamlit/common/utils.py,sha256=eG201z9gMRnhoHkaZGNtfFUbCzfg_Y59JR4ciMgidW8,1465
142
142
  beamlit/deploy/__init__.py,sha256=uRsI_-gTbbki59LlvubeTfG6wfI3o2XqZODW0QXA-Ao,292
143
143
  beamlit/deploy/deploy.py,sha256=V07m0GKEKvQKjyw5r5UR2IsXQxhgyH6OeSgexj3AAtY,11232
144
- beamlit/deploy/format.py,sha256=-S55hQnEf0JhivU4ca3gepWhA7jZD1ik-eHiPBfHyyk,1225
144
+ beamlit/deploy/format.py,sha256=W3ESUHyFv-iZDjVnHOf9YFDDXZSXYIFFbwCoL1GInE0,1162
145
145
  beamlit/deploy/parser.py,sha256=gjRUhOVtfKnc1UNc_FhXsEfj9zrMNuq8W93pNsJBpo0,7586
146
146
  beamlit/functions/__init__.py,sha256=Mnoqpa1dm7TXwjodBbF_40JyD78aXsOYWmqjDSnA1lU,317
147
147
  beamlit/functions/common.py,sha256=IkdxQYrvu6H4cPgqc0OeXquCInMtGvmq6GP2FA1rh7w,9221
@@ -263,8 +263,8 @@ beamlit/serve/app.py,sha256=lM59fdUtfkfAYNPWSCU9pkXIPBnhgVGvvgfoMkSVtks,4531
263
263
  beamlit/serve/middlewares/__init__.py,sha256=O7fyfE1DIYmajFY9WWdzxCgeAQWZzJfeUjzHGbpWaAk,309
264
264
  beamlit/serve/middlewares/accesslog.py,sha256=lcu33j4epFSHRBaeTpyt8deNb3kaM3K91-andw4fp80,1112
265
265
  beamlit/serve/middlewares/processtime.py,sha256=3x5w1yQexB0xFNKK6fgLbINxT-eLLunfZ6UDV0bIIF4,944
266
- beamlit-0.0.55rc102.dist-info/METADATA,sha256=zcT936JVIIEX3SwobY_6roXRfHTmI_cci4BpwHuMDx4,3515
267
- beamlit-0.0.55rc102.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
268
- beamlit-0.0.55rc102.dist-info/entry_points.txt,sha256=zxhgdn7SP-Otk4rEv7LMPAAa9w4TUCLbu9TJi9-K3xg,115
269
- beamlit-0.0.55rc102.dist-info/licenses/LICENSE,sha256=p5PNQvpvyDT_0aYBDgmV1fFI_vAD2aSV0wWG7VTgRis,1069
270
- beamlit-0.0.55rc102.dist-info/RECORD,,
266
+ beamlit-0.0.56.dist-info/METADATA,sha256=QPzb3KfWYpka39mhO_EIDoRxIlZifjcKJwf9Cp22-W0,3510
267
+ beamlit-0.0.56.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
268
+ beamlit-0.0.56.dist-info/entry_points.txt,sha256=zxhgdn7SP-Otk4rEv7LMPAAa9w4TUCLbu9TJi9-K3xg,115
269
+ beamlit-0.0.56.dist-info/licenses/LICENSE,sha256=p5PNQvpvyDT_0aYBDgmV1fFI_vAD2aSV0wWG7VTgRis,1069
270
+ beamlit-0.0.56.dist-info/RECORD,,