Skip to content

Commit 00a493b

Browse files
authored
Merge pull request #265 from UiPath/feat/entrypoints
feat: generate entry-points.json on init
2 parents b355a14 + 3415477 commit 00a493b

File tree

3 files changed

+22
-9
lines changed

3 files changed

+22
-9
lines changed

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[project]
22
name = "uipath-langchain"
3-
version = "0.0.151"
3+
version = "0.0.152"
44
description = "UiPath Langchain"
55
readme = { file = "README.md", content-type = "text/markdown" }
66
requires-python = ">=3.10"
77
dependencies = [
8-
"uipath>=2.1.137, <2.2.0",
8+
"uipath>=2.1.159, <2.2.0",
99
"langgraph>=0.5.0, <0.7.0",
1010
"langchain-core>=0.3.34",
1111
"langgraph-checkpoint-sqlite>=2.0.3",

src/uipath_langchain/_cli/cli_init.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,15 @@
1010

1111
import click
1212
from langgraph.graph.state import CompiledStateGraph
13+
from pydantic import TypeAdapter
1314
from uipath._cli._utils._console import ConsoleLogger
1415
from uipath._cli._utils._parse_ast import ( # type: ignore
1516
generate_bindings,
1617
write_bindings_file,
18+
write_entry_points_file,
1719
)
1820
from uipath._cli.middlewares import MiddlewareResult
19-
from uipath._cli.models.runtime_schema import Bindings
21+
from uipath._cli.models.runtime_schema import Bindings, Entrypoint, Entrypoints
2022

2123
from uipath_langchain._cli._utils._schema import generate_schema_from_graph
2224

@@ -228,7 +230,8 @@ async def langgraph_init_middleware_async(
228230
should_continue=False,
229231
)
230232

231-
uipath_config = {"entryPoints": entrypoints}
233+
# add here default settings like {'isConversational': false}
234+
uipath_config: dict[str, Any] = {}
232235

233236
if write_config:
234237
config_path = write_config(uipath_config)
@@ -239,6 +242,16 @@ async def langgraph_init_middleware_async(
239242
json.dump(uipath_config, f, indent=4)
240243
console.success(f"Created {click.style(config_path, fg='cyan')} file.")
241244

245+
entry_points_path = write_entry_points_file(
246+
Entrypoints(
247+
entry_points=[
248+
TypeAdapter(Entrypoint).validate_python(entry_point)
249+
for entry_point in entrypoints
250+
]
251+
) # type: ignore
252+
)
253+
console.success(f"Created {click.style(entry_points_path, fg='cyan')} file.")
254+
242255
for graph_name, mermaid_content in mermaids.items():
243256
mermaid_file_path = f"{graph_name}.mermaid"
244257
try:

uv.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)