beamlit 0.0.34rc65__py3-none-any.whl → 0.0.34rc67__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
@@ -100,7 +100,31 @@ def agent(
100
100
  )
101
101
  settings.agent.functions = functions
102
102
 
103
- if override_agent is None and chat_model is not None:
103
+ if override_agent is None:
104
+ if chat_model is None:
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"
119
+ "agent={\n"
120
+ " \"metadata\": {\n"
121
+ f" \"name\": \"{agent.metadata.name}\",\n"
122
+ " },\n"
123
+ " \"spec\": {\n"
124
+ " \"model\": \"MODEL_NAME\",\n"
125
+ f" \"description\": \"{agent.spec.description}\",\n"
126
+ " },\n"
127
+ "}")
104
128
  memory = MemorySaver()
105
129
  if len(functions) == 0:
106
130
  raise ValueError("You can define this function in directory "
@@ -57,6 +57,7 @@ class Settings(BaseSettings):
57
57
  type: str = Field(default="agent")
58
58
  name: str = Field(default="beamlit-agent")
59
59
  base_url: str = Field(default="https://api.beamlit.com/v0")
60
+ app_url: str = Field(default="https://app.beamlit.com")
60
61
  run_url: str = Field(default="https://run.beamlit.com")
61
62
  mcp_hub_url: str = Field(default="https://mcp-hub-server.beamlit.workers.com")
62
63
  registry_url: str = Field(default="https://us.registry.beamlit.com")
@@ -73,7 +74,8 @@ class Settings(BaseSettings):
73
74
  self.run_url = os.getenv('BL_RUN_URL') or "https://run.beamlit.dev"
74
75
  self.mcp_hub_url = os.getenv('BL_MCP_HUB_URL') or "https://mcp-hub-server.beamlit.workers.dev"
75
76
  self.registry_url = os.getenv('BL_REGISTRY_URL') or "https://eu.registry.beamlit.dev"
76
-
77
+ self.app_url = os.getenv('BL_APP_URL') or "https://app.beamlit.dev"
78
+
77
79
  @classmethod
78
80
  def settings_customise_sources(
79
81
  cls,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: beamlit
3
- Version: 0.0.34rc65
3
+ Version: 0.0.34rc67
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=alz0ZPki6BYH4qQRfF5i4faPQV96cr5Q_VTn3DMeQ8Y,4743
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
@@ -133,7 +133,7 @@ beamlit/common/error.py,sha256=f9oJDFxhoHK-vpjxBgEp0NwWIk0N_THPemUI7uQxVzU,270
133
133
  beamlit/common/instrumentation.py,sha256=8sbYCrkC_2BsdAZ_1cWTw5aRtMUz2xvN2tsG0rovBtA,5351
134
134
  beamlit/common/logger.py,sha256=nN_dSOl4bs13QU3Rod-w3e3jYOnlSrHx3_bs-ACY6Aw,1115
135
135
  beamlit/common/secrets.py,sha256=sid81bOe3LflkMKDHwBsBs9nIju8bp5-v9qU9gkyNMc,212
136
- beamlit/common/settings.py,sha256=b2rvby-ufG3M0AB1ReoWFM-1EzF1LaE-gbokO9HvQDI,3810
136
+ beamlit/common/settings.py,sha256=OL1pZLB3BgN7QPCz9VR7gjYb-LoYpelilS7rU7FubCE,3962
137
137
  beamlit/common/slugify.py,sha256=nR29r37IdWS2i44ZC6ZsXRgqKPYmvMGtFQ7BuIQUTlc,90
138
138
  beamlit/common/utils.py,sha256=jouz5igBvT37Xn_e94-foCHyQczVim-UzVcoIF6RWJ4,657
139
139
  beamlit/deploy/__init__.py,sha256=GS7l7Jtm2yKs7iNLKcfjYO-rAhUzggQ3xiYSf3oxLBY,91
@@ -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.34rc65.dist-info/METADATA,sha256=-Xa2kRZiGR3uVjLBH5SJHB2Xd8SNs40qezqTb2pPea8,2412
266
- beamlit-0.0.34rc65.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
267
- beamlit-0.0.34rc65.dist-info/RECORD,,
265
+ beamlit-0.0.34rc67.dist-info/METADATA,sha256=KOqWQ-ydB02a134mSEqvHIiIQhw1Q2UJmoq-MxrqrRw,2412
266
+ beamlit-0.0.34rc67.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
267
+ beamlit-0.0.34rc67.dist-info/RECORD,,