beamlit 0.0.34rc66__py3-none-any.whl → 0.0.34rc68__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.
@@ -6,7 +6,7 @@ from logging import getLogger
6
6
  from langgraph.checkpoint.memory import MemorySaver
7
7
  from langgraph.prebuilt import create_react_agent
8
8
 
9
- from beamlit.api.models import get_model
9
+ from beamlit.api.models import get_model, list_models
10
10
  from beamlit.authentication import new_client
11
11
  from beamlit.common.settings import init
12
12
  from beamlit.errors import UnexpectedStatus
@@ -102,9 +102,20 @@ def agent(
102
102
 
103
103
  if override_agent is None:
104
104
  if chat_model is None:
105
- raise ValueError(f"You must provide a model, to create one got to "
106
- f"{settings.app_url}/{settings.workspace}/global-inference-network/models/create\n"
107
- "After creating a model, add it to your agent spec\n"
105
+ models_select = ""
106
+ try:
107
+ models = list_models.sync_detailed(
108
+ environment=settings.environment, client=client
109
+ )
110
+ models = ", ".join([model.metadata.name for model in models.parsed])
111
+ models_select = f"You can select one from the your models: {models}"
112
+ except Exception as e:
113
+ pass
114
+
115
+ raise ValueError(f"You must provide a model.\n"
116
+ f"{models_select}\n"
117
+ f"You can create one at {settings.app_url}/{settings.workspace}/global-inference-network/models/create\n"
118
+ "Add it to your agent spec\n"
108
119
  "agent={\n"
109
120
  " \"metadata\": {\n"
110
121
  f" \"name\": \"{agent.metadata.name}\",\n"
@@ -23,10 +23,10 @@ from beamlit.models import AgentChain, Function, FunctionKit
23
23
  logger = getLogger(__name__)
24
24
 
25
25
  def get_functions(
26
- client:Union[AuthenticatedClient, None]=None,
27
- dir:Union[str, None]=None,
28
26
  mcp_hub:Union[list[str], None]=None,
29
27
  remote_functions:Union[list[str], None]=None,
28
+ client:Union[AuthenticatedClient, None]=None,
29
+ dir:Union[str, None]=None,
30
30
  chain:Union[list[AgentChain], None]=None,
31
31
  remote_functions_empty:bool=True,
32
32
  from_decorator:str="function",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: beamlit
3
- Version: 0.0.34rc66
3
+ Version: 0.0.34rc68
4
4
  Summary: Add your description here
5
5
  Author-email: cploujoux <ch.ploujoux@gmail.com>
6
6
  Requires-Python: >=3.12
@@ -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=vfCjiFHuu02uTTGicxMlFzjyICQkIjpXrBGs-7uJEsg,2826
9
9
  beamlit/agents/chat.py,sha256=b7-ZkRqgS7nxFLbh_fOf9riAoPYnlb9_vHxaf2xYuvI,4057
10
- beamlit/agents/decorator.py,sha256=TK4PZ8t2N6xnjqBbYB8fmnzhg1hDBPvzrvRzaOk6990,5425
10
+ beamlit/agents/decorator.py,sha256=IU4iZDAGAYt3KdeEWxmEyYBMFuJvtihBLY6vacDlFg8,5926
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
@@ -141,7 +141,7 @@ beamlit/deploy/deploy.py,sha256=h8ugvkSGcMKLqM-_uD5BZUzng5tJRp-Gea1Jup6QzTE,1025
141
141
  beamlit/deploy/format.py,sha256=U6UZEFAYLnGJJ7O2YmSdlUUFhnWNGAv6NZ-DW4KTgvI,2049
142
142
  beamlit/deploy/parser.py,sha256=Ga0poCZkoRnuTw082QnTcNGCBJncoRAnVsn8-1FsaJE,6907
143
143
  beamlit/functions/__init__.py,sha256=NcQPZZNfWhAJ1T1F6Xn21LFPMbZ7aMR2Sve3uZOkBCQ,170
144
- beamlit/functions/decorator.py,sha256=S9trFiDvLKlN-2f8SXccS44AxyCMX1blYhW_HJ12YXc,8714
144
+ beamlit/functions/decorator.py,sha256=e4Q5vpmM96U9NihKMBWkBISIbr0tMc3CxECAJlGQATs,8714
145
145
  beamlit/functions/github/__init__.py,sha256=gYnUkeegukOfbymdabuuJkScvH-_ZJygX05BoqkPn0o,49
146
146
  beamlit/functions/github/github.py,sha256=FajzLCNkpXcwfgnC0l9rOGT2eSPLCz8-qrMzK9N_ZNc,598
147
147
  beamlit/functions/github/kit/__init__.py,sha256=jBwPqZv6C23_utukohxqXZwrlicNlI7PYPUj0Den7Cw,136
@@ -262,6 +262,6 @@ beamlit/serve/app.py,sha256=_aG2UVQ3Y85rUW3ehu9TlzLnowkfh54IIz558ftqOMw,3638
262
262
  beamlit/serve/middlewares/__init__.py,sha256=1dVmnOmhAQWvWktqHkKSIX-YoF6fmMU8xkUQuhg_rJU,148
263
263
  beamlit/serve/middlewares/accesslog.py,sha256=Mu4T4_9OvHybjA0ApzZFpgi2C8f3X1NbUk-76v634XM,631
264
264
  beamlit/serve/middlewares/processtime.py,sha256=lDAaIasZ4bwvN-HKHvZpaD9r-yrkVNZYx4abvbjbrCg,411
265
- beamlit-0.0.34rc66.dist-info/METADATA,sha256=PocYFLUBKhxV7rsY7W22p2x2Dn-PowpBuoV7vdll_30,2412
266
- beamlit-0.0.34rc66.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
267
- beamlit-0.0.34rc66.dist-info/RECORD,,
265
+ beamlit-0.0.34rc68.dist-info/METADATA,sha256=bIoGyCBjA63Kj4YDv91RZ9lzWwRkXq0ePPChbVqTj_8,2412
266
+ beamlit-0.0.34rc68.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
267
+ beamlit-0.0.34rc68.dist-info/RECORD,,