beamlit 0.0.23rc15__py3-none-any.whl → 0.0.24rc17__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,15 +5,14 @@ import importlib
5
5
  import os
6
6
  from logging import getLogger
7
7
 
8
- from langchain_core.tools import Tool
9
- from langgraph.checkpoint.memory import MemorySaver
10
- from langgraph.prebuilt import create_react_agent
11
-
12
8
  from beamlit.api.models import get_model_deployment
13
9
  from beamlit.authentication import new_client
14
10
  from beamlit.common.settings import get_settings, init
15
11
  from beamlit.errors import UnexpectedStatus
16
12
  from beamlit.models import AgentDeployment
13
+ from langchain_core.tools import Tool
14
+ from langgraph.checkpoint.memory import MemorySaver
15
+ from langgraph.prebuilt import create_react_agent
17
16
 
18
17
  from .chat import get_chat_model
19
18
 
beamlit/serve/app.py CHANGED
@@ -1,3 +1,4 @@
1
+ import asyncio
1
2
  import importlib
2
3
  import os
3
4
  import sys
@@ -6,11 +7,10 @@ from logging import getLogger
6
7
  from uuid import uuid4
7
8
 
8
9
  from asgi_correlation_id import CorrelationIdMiddleware
10
+ from beamlit.common.settings import get_settings, init
9
11
  from fastapi import FastAPI, Request, Response
10
12
  from fastapi.responses import JSONResponse
11
13
 
12
- from beamlit.common.settings import get_settings, init
13
-
14
14
  from .middlewares import AccessLogMiddleware, AddProcessTimeHeader
15
15
 
16
16
  sys.path.insert(0, os.getcwd())
@@ -53,7 +53,10 @@ async def root(request: Request):
53
53
  logger = getLogger(__name__)
54
54
  try:
55
55
  body = await request.json()
56
- response = await func(body)
56
+ if not asyncio.iscoroutinefunction(func):
57
+ response = func(body)
58
+ else:
59
+ response = await func(body)
57
60
  if isinstance(response, Response):
58
61
  return response
59
62
  if type(response) is str:
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.4
2
2
  Name: beamlit
3
- Version: 0.0.23rc15
3
+ Version: 0.0.24rc17
4
4
  Summary: Add your description here
5
5
  Author-email: cploujoux <ch.ploujoux@gmail.com>
6
6
  Requires-Python: >=3.12
@@ -6,7 +6,7 @@ beamlit/run.py,sha256=y61iDBaR0917ihj5q-cJ_r3BFW1Rn5K_kDAISw5O6aU,1339
6
6
  beamlit/types.py,sha256=E1hhDh_zXfsSQ0NCt9-uw90_Mr5iIlsdfnfvxv5HarU,1005
7
7
  beamlit/agents/__init__.py,sha256=nf1iwQwGtCG6nDqyVhxfWoqR6dv6X3bvSpCeqkTCFaM,101
8
8
  beamlit/agents/chat.py,sha256=aI7pObyywRyg3dBpubzHAUWTbTk1nwtxvpY7iIP1RLY,2704
9
- beamlit/agents/decorator.py,sha256=sN-JsLaPwiL-zzH5eZak76y3ObluIy8NFC3xpHFcDWc,6469
9
+ beamlit/agents/decorator.py,sha256=XDrWN-Xx4czSy1sIkfQY4t9-UnsM21vMll58CP1TRLw,6468
10
10
  beamlit/api/__init__.py,sha256=zTSiG_ujSjAqWPyc435YXaX9XTlpMjiJWBbV-f-YtdA,45
11
11
  beamlit/api/agents/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
12
  beamlit/api/agents/create_agent.py,sha256=HFExosu02JZqZz7I6U6WjN81TERz6p2i8CzQCyiRYXo,4112
@@ -294,10 +294,10 @@ beamlit/models/websocket_channel.py,sha256=tyNtsVR0cOwd6BK--ehBCH8bIjxtyPhiAkrxY
294
294
  beamlit/models/workspace.py,sha256=s7wS6ibswosB0FdUb3ry3BnlLa325axBdYPLI3ipe0Q,3986
295
295
  beamlit/models/workspace_labels.py,sha256=WbnUY6eCTkUNdY7hhhSF-KQCl8fWFfkCf7hzCTiNp4A,1246
296
296
  beamlit/models/workspace_user.py,sha256=70CcifQWYbeWG7TDui4pblTzUe5sVK0AS19vNCzKE8g,3423
297
- beamlit/serve/app.py,sha256=_0ZesKcczd1sYm8vs3ulbXO1M1boO_5DhFf3jSmjM4g,2398
297
+ beamlit/serve/app.py,sha256=UFIEb8wbvt8_ZGVXmRFimrG6TAod0ysTtn1E1_yByvA,2514
298
298
  beamlit/serve/middlewares/__init__.py,sha256=1dVmnOmhAQWvWktqHkKSIX-YoF6fmMU8xkUQuhg_rJU,148
299
299
  beamlit/serve/middlewares/accesslog.py,sha256=wM52-hcwtO-_hdM1pnsEJzerzJf1MzEyN5m85BdDccE,609
300
300
  beamlit/serve/middlewares/processtime.py,sha256=lDAaIasZ4bwvN-HKHvZpaD9r-yrkVNZYx4abvbjbrCg,411
301
- beamlit-0.0.23rc15.dist-info/METADATA,sha256=piLvTAjRvfpbIyBmUvCHSZHa2jxLezNRyfGLWmtIKBg,2027
302
- beamlit-0.0.23rc15.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
303
- beamlit-0.0.23rc15.dist-info/RECORD,,
301
+ beamlit-0.0.24rc17.dist-info/METADATA,sha256=8Rlj6oGJatG92HYskgSXJ4iubImPtr09qkHlDohMnM8,2027
302
+ beamlit-0.0.24rc17.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
303
+ beamlit-0.0.24rc17.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: hatchling 1.26.3
2
+ Generator: hatchling 1.27.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any