uipath-langchain 0.0.95__tar.gz → 0.0.96__tar.gz
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.
Potentially problematic release.
This version of uipath-langchain might be problematic. Click here for more details.
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/PKG-INFO +2 -2
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/pyproject.toml +2 -2
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/src/uipath_langchain/_cli/cli_init.py +14 -21
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/src/uipath_langchain/_cli/cli_new.py +21 -26
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/uv.lock +1425 -1425
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/.cursorrules +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/.editorconfig +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/.gitattributes +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/.github/workflows/build.yml +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/.github/workflows/cd.yml +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/.github/workflows/ci.yml +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/.github/workflows/commitlint.yml +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/.github/workflows/lint.yml +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/.github/workflows/test.yml +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/.gitignore +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/.pre-commit-config.yaml +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/.python-version +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/.vscode/extensions.json +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/.vscode/settings.json +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/CONTRIBUTING.md +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/LICENSE +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/README.md +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/docs/chat_models.md +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/docs/context_grounding_retriever.md +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/docs/context_grounding_vector_store.md +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/docs/interrupt_models.md +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/docs/sample_images/multi-agent-distributed/coder-agent-package-overview.png +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/docs/sample_images/multi-agent-distributed/coder-agent-process-configuration.png +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/docs/sample_images/multi-agent-distributed/planner-agent-package-overview.png +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/docs/sample_images/multi-agent-distributed/planner-agent-process-configuration.png +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/docs/sample_images/multi-agent-distributed/researcher-agent-package-overview.png +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/docs/sample_images/multi-agent-distributed/researcher-agent-process-configuration.png +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/docs/sample_images/ticket-classification/activate-apps.png +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/docs/sample_images/ticket-classification/activate-deployment.png +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/docs/sample_images/ticket-classification/copy-folder-path.png +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/docs/sample_images/ticket-classification/deploy-solution-package-wizard.png +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/docs/sample_images/ticket-classification/deploy-solution-package.png +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/docs/sample_images/ticket-classification/monitor-agent.png +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/docs/sample_images/ticket-classification/navigate-to-solution-folder.png +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/docs/sample_images/ticket-classification/resume-condition.png +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/docs/sample_images/ticket-classification/run-agent.png +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/docs/sample_images/ticket-classification/solution-destination-folder.png +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/docs/sample_images/ticket-classification/start-job.png +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/docs/sample_images/ticket-classification/upload-solution-package.png +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/company-research-agent/.env.example +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/company-research-agent/agent.mermaid +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/company-research-agent/graph.py +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/company-research-agent/langgraph.json +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/company-research-agent/pyproject.toml +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/company-research-agent/uipath.json +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/company-research-agent/uv.lock +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/hitl-inbox-server/database.py +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/hitl-inbox-server/main.py +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/hitl-inbox-server/models.py +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/hitl-inbox-server/pyproject.toml +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/hitl-inbox-server/schemas.py +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/hitl-inbox-server/templates/index.html +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/hitl-inbox-server/uv.lock +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/multi-agent-planner-researcher-coder-distributed/.env.example +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/multi-agent-planner-researcher-coder-distributed/README.md +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/multi-agent-planner-researcher-coder-distributed/coder.mermaid +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/multi-agent-planner-researcher-coder-distributed/langgraph.json +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/multi-agent-planner-researcher-coder-distributed/planner.mermaid +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/multi-agent-planner-researcher-coder-distributed/pyproject.toml +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/multi-agent-planner-researcher-coder-distributed/researcher.mermaid +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/multi-agent-planner-researcher-coder-distributed/src/multi-agent-distributed/coder.py +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/multi-agent-planner-researcher-coder-distributed/src/multi-agent-distributed/planner.py +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/multi-agent-planner-researcher-coder-distributed/src/multi-agent-distributed/researcher.py +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/multi-agent-planner-researcher-coder-distributed/uipath.json +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/multi-agent-planner-researcher-coder-distributed/uv.lock +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/multi-agent-supervisor-researcher-coder/.env.example +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/multi-agent-supervisor-researcher-coder/README.md +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/multi-agent-supervisor-researcher-coder/agent.mermaid +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/multi-agent-supervisor-researcher-coder/graph.py +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/multi-agent-supervisor-researcher-coder/langgraph.json +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/multi-agent-supervisor-researcher-coder/pyproject.toml +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/multi-agent-supervisor-researcher-coder/uipath.json +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/multi-agent-supervisor-researcher-coder/uv.lock +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/retrieval-chain/.env.example +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/retrieval-chain/README.md +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/retrieval-chain/main.py +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/retrieval-chain/pyproject.toml +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/retrieval-chain/uv.lock +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/simple-local-mcp/.env.example +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/simple-local-mcp/README.md +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/simple-local-mcp/agent.mermaid +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/simple-local-mcp/langgraph.json +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/simple-local-mcp/pyproject.toml +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/simple-local-mcp/src/simple-local-mcp/graph.py +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/simple-local-mcp/src/simple-local-mcp/math_server.py +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/simple-local-mcp/src/simple-local-mcp/weather_server.py +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/simple-local-mcp/uipath.json +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/simple-local-mcp/uv.lock +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/simple-remote-mcp/.env.example +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/simple-remote-mcp/README.md +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/simple-remote-mcp/agent.mermaid +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/simple-remote-mcp/langgraph.json +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/simple-remote-mcp/main.py +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/simple-remote-mcp/pyproject.toml +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/simple-remote-mcp/uipath.json +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/simple-remote-mcp/uv.lock +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/ticket-classification/.env.example +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/ticket-classification/README.md +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/ticket-classification/agent.mermaid +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/ticket-classification/escalation_app_solution/generic-escalation-app-solution-1.0.0.zip +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/ticket-classification/langgraph.json +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/ticket-classification/main.py +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/ticket-classification/pyproject.toml +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/ticket-classification/uipath.json +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/samples/ticket-classification/uv.lock +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/src/uipath_langchain/__init__.py +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/src/uipath_langchain/_cli/__init__.py +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/src/uipath_langchain/_cli/_runtime/_context.py +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/src/uipath_langchain/_cli/_runtime/_escalation.py +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/src/uipath_langchain/_cli/_runtime/_exception.py +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/src/uipath_langchain/_cli/_runtime/_input.py +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/src/uipath_langchain/_cli/_runtime/_output.py +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/src/uipath_langchain/_cli/_runtime/_runtime.py +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/src/uipath_langchain/_cli/_templates/langgraph.json.template +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/src/uipath_langchain/_cli/_templates/main.py.template +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/src/uipath_langchain/_cli/_utils/_graph.py +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/src/uipath_langchain/_cli/cli_run.py +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/src/uipath_langchain/_utils/__init__.py +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/src/uipath_langchain/_utils/_request_mixin.py +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/src/uipath_langchain/_utils/_settings.py +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/src/uipath_langchain/_utils/_sleep_policy.py +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/src/uipath_langchain/chat/__init__.py +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/src/uipath_langchain/chat/models.py +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/src/uipath_langchain/chat/utils/__init__.py +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/src/uipath_langchain/chat/utils/_chat_types.py +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/src/uipath_langchain/embeddings/__init__.py +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/src/uipath_langchain/embeddings/embeddings.py +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/src/uipath_langchain/middlewares.py +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/src/uipath_langchain/retrievers/__init__.py +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/src/uipath_langchain/retrievers/context_grounding_retriever.py +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/src/uipath_langchain/tracers/AsyncUiPathTracer.py +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/src/uipath_langchain/tracers/UiPathTracer.py +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/src/uipath_langchain/tracers/__init__.py +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/src/uipath_langchain/tracers/_events.py +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/src/uipath_langchain/tracers/_instrument_traceable.py +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/src/uipath_langchain/tracers/_utils.py +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/src/uipath_langchain/utils/__init__.py +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/src/uipath_langchain/utils/_request_mixin.py +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/src/uipath_langchain/utils/_settings.py +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/src/uipath_langchain/utils/_sleep_policy.py +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/src/uipath_langchain/vectorstores/context_grounding_vectorstore.py +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/tests/__init__.py +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/tests/test_dummy.py +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/tests/test_langchain_client.py +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/tests/tracers/__init__.py +0 -0
- {uipath_langchain-0.0.95 → uipath_langchain-0.0.96}/tests/tracers/test_instrument_traceable.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: uipath-langchain
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.96
|
|
4
4
|
Summary: UiPath Langchain
|
|
5
5
|
Project-URL: Homepage, https://uipath.com
|
|
6
6
|
Project-URL: Repository, https://github.com/UiPath/uipath-langchain-python
|
|
@@ -25,7 +25,7 @@ Requires-Dist: pydantic-settings>=2.6.0
|
|
|
25
25
|
Requires-Dist: python-dotenv>=1.0.1
|
|
26
26
|
Requires-Dist: requests>=2.23.3
|
|
27
27
|
Requires-Dist: types-requests>=2.32.0.20241016
|
|
28
|
-
Requires-Dist: uipath<2.1.0,>=2.0.
|
|
28
|
+
Requires-Dist: uipath<2.1.0,>=2.0.28
|
|
29
29
|
Provides-Extra: langchain
|
|
30
30
|
Description-Content-Type: text/markdown
|
|
31
31
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "uipath-langchain"
|
|
3
|
-
version = "0.0.
|
|
3
|
+
version = "0.0.96"
|
|
4
4
|
description = "UiPath Langchain"
|
|
5
5
|
readme = { file = "README.md", content-type = "text/markdown" }
|
|
6
6
|
requires-python = ">=3.10"
|
|
7
7
|
dependencies = [
|
|
8
|
-
"uipath>=2.0.
|
|
8
|
+
"uipath>=2.0.28, <2.1.0",
|
|
9
9
|
"langgraph>=0.2.70",
|
|
10
10
|
"langchain-core>=0.3.34",
|
|
11
11
|
"langgraph-checkpoint-sqlite>=2.0.3",
|
|
@@ -4,14 +4,15 @@ import os
|
|
|
4
4
|
import uuid
|
|
5
5
|
from typing import Any, Dict
|
|
6
6
|
|
|
7
|
-
import click
|
|
8
7
|
from langgraph.graph.state import CompiledStateGraph
|
|
8
|
+
from uipath._cli._utils._console import ConsoleLogger
|
|
9
9
|
from uipath._cli._utils._parse_ast import generate_bindings_json # type: ignore
|
|
10
10
|
from uipath._cli.middlewares import MiddlewareResult
|
|
11
|
-
from uipath._cli.spinner import Spinner
|
|
12
11
|
|
|
13
12
|
from ._utils._graph import LangGraphConfig
|
|
14
13
|
|
|
14
|
+
console = ConsoleLogger()
|
|
15
|
+
|
|
15
16
|
|
|
16
17
|
def resolve_refs(schema, root=None):
|
|
17
18
|
"""Recursively resolves $ref references in a JSON schema."""
|
|
@@ -95,7 +96,6 @@ def generate_schema_from_graph(graph: CompiledStateGraph) -> Dict[str, Any]:
|
|
|
95
96
|
|
|
96
97
|
async def langgraph_init_middleware_async(entrypoint: str) -> MiddlewareResult:
|
|
97
98
|
"""Middleware to check for langgraph.json and create uipath.json with schemas"""
|
|
98
|
-
spinner = Spinner("Initializing UiPath project...")
|
|
99
99
|
config = LangGraphConfig()
|
|
100
100
|
if not config.exists:
|
|
101
101
|
return MiddlewareResult(
|
|
@@ -103,7 +103,6 @@ async def langgraph_init_middleware_async(entrypoint: str) -> MiddlewareResult:
|
|
|
103
103
|
) # Continue with normal flow if no langgraph.json
|
|
104
104
|
|
|
105
105
|
try:
|
|
106
|
-
spinner.start()
|
|
107
106
|
config.load_config()
|
|
108
107
|
entrypoints = []
|
|
109
108
|
all_bindings = {"version": "2.0", "resources": []}
|
|
@@ -134,8 +133,8 @@ async def langgraph_init_middleware_async(entrypoint: str) -> MiddlewareResult:
|
|
|
134
133
|
if "resources" in file_bindings:
|
|
135
134
|
all_bindings["resources"] = file_bindings["resources"]
|
|
136
135
|
except Exception as e:
|
|
137
|
-
|
|
138
|
-
f"
|
|
136
|
+
console.warning(
|
|
137
|
+
f"Warning: Could not generate bindings for {graph.file_path}: {str(e)}"
|
|
139
138
|
)
|
|
140
139
|
|
|
141
140
|
new_entrypoint: dict[str, Any] = {
|
|
@@ -148,21 +147,18 @@ async def langgraph_init_middleware_async(entrypoint: str) -> MiddlewareResult:
|
|
|
148
147
|
entrypoints.append(new_entrypoint)
|
|
149
148
|
|
|
150
149
|
except Exception as e:
|
|
151
|
-
|
|
152
|
-
print(f"Error during graph load: {e}")
|
|
150
|
+
console.error(f"Error during graph load: {e}")
|
|
153
151
|
return MiddlewareResult(
|
|
154
152
|
should_continue=False,
|
|
155
|
-
error_message=f"❌ Failed to load graph '{graph.name}': {str(e)}",
|
|
156
153
|
should_include_stacktrace=True,
|
|
157
154
|
)
|
|
158
155
|
finally:
|
|
159
156
|
await graph.cleanup()
|
|
160
157
|
|
|
161
158
|
if entrypoint and not entrypoints:
|
|
162
|
-
|
|
159
|
+
console.error(f"Error: No graph found with name '{entrypoint}'")
|
|
163
160
|
return MiddlewareResult(
|
|
164
161
|
should_continue=False,
|
|
165
|
-
error_message=f"❌ Error: No graph found with name '{entrypoint}'",
|
|
166
162
|
)
|
|
167
163
|
|
|
168
164
|
uipath_config = {"entryPoints": entrypoints, "bindings": all_bindings}
|
|
@@ -177,25 +173,22 @@ async def langgraph_init_middleware_async(entrypoint: str) -> MiddlewareResult:
|
|
|
177
173
|
try:
|
|
178
174
|
with open(mermaid_file_path, "w") as f:
|
|
179
175
|
f.write(mermaid_content)
|
|
176
|
+
console.success(f" Created '{mermaid_file_path}' file.")
|
|
180
177
|
except Exception as write_error:
|
|
181
|
-
|
|
178
|
+
console.error(
|
|
179
|
+
f"Error writing mermaid file for '{graph_name}': {str(write_error)}"
|
|
180
|
+
)
|
|
182
181
|
return MiddlewareResult(
|
|
183
182
|
should_continue=False,
|
|
184
|
-
error_message=f"❌ Error writing mermaid file for '{graph_name}': {str(write_error)}",
|
|
185
183
|
should_include_stacktrace=True,
|
|
186
184
|
)
|
|
187
|
-
|
|
188
|
-
return MiddlewareResult(
|
|
189
|
-
should_continue=False,
|
|
190
|
-
info_message=click.style("✓ ", fg="green", bold=True)
|
|
191
|
-
+ f" Configuration file {config_path} created successfully.",
|
|
192
|
-
)
|
|
185
|
+
console.success(f" Created '{config_path}' file.")
|
|
186
|
+
return MiddlewareResult(should_continue=False)
|
|
193
187
|
|
|
194
188
|
except Exception as e:
|
|
195
|
-
|
|
189
|
+
console.error(f"Error processing langgraph configuration: {str(e)}")
|
|
196
190
|
return MiddlewareResult(
|
|
197
191
|
should_continue=False,
|
|
198
|
-
error_message=f"❌ Error processing langgraph configuration: {str(e)}",
|
|
199
192
|
should_include_stacktrace=True,
|
|
200
193
|
)
|
|
201
194
|
|
|
@@ -2,8 +2,10 @@ import os
|
|
|
2
2
|
import shutil
|
|
3
3
|
|
|
4
4
|
import click
|
|
5
|
+
from uipath._cli._utils._console import ConsoleLogger
|
|
5
6
|
from uipath._cli.middlewares import MiddlewareResult
|
|
6
|
-
|
|
7
|
+
|
|
8
|
+
console = ConsoleLogger()
|
|
7
9
|
|
|
8
10
|
|
|
9
11
|
def generate_script(target_directory):
|
|
@@ -41,36 +43,29 @@ def generate_pyproject(target_directory, project_name):
|
|
|
41
43
|
|
|
42
44
|
def langgraph_new_middleware(name: str) -> MiddlewareResult:
|
|
43
45
|
"""Middleware to create demo langchain agent"""
|
|
44
|
-
|
|
46
|
+
|
|
45
47
|
directory = os.getcwd()
|
|
46
48
|
|
|
47
49
|
try:
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
click.style("✓ ", fg="green", bold=True) + " Agent created successfully."
|
|
65
|
-
)
|
|
66
|
-
return MiddlewareResult(
|
|
67
|
-
should_continue=False,
|
|
68
|
-
info_message="""Usage example: ` uipath run agent '{"topic": "UiPath"}' `""",
|
|
69
|
-
)
|
|
50
|
+
with console.spinner(f"Creating new agent {name} in current directory ..."):
|
|
51
|
+
generate_pyproject(directory, name)
|
|
52
|
+
generate_script(directory)
|
|
53
|
+
console.success("Created 'main.py' file.")
|
|
54
|
+
console.success("Created 'langgraph.json' file.")
|
|
55
|
+
generate_pyproject(directory, name)
|
|
56
|
+
console.success("Created 'pyproject.toml' file.")
|
|
57
|
+
os.system("uv sync")
|
|
58
|
+
ctx = click.get_current_context()
|
|
59
|
+
init_cmd = ctx.parent.command.get_command(ctx, "init") # type: ignore
|
|
60
|
+
ctx.invoke(init_cmd)
|
|
61
|
+
console.config(
|
|
62
|
+
" Please ensure to define either ANTHROPIC_API_KEY or OPENAI_API_KEY in your .env file."
|
|
63
|
+
)
|
|
64
|
+
console.hint(""" Run agent: uipath run agent '{"topic": "UiPath"}'""")
|
|
65
|
+
return MiddlewareResult(should_continue=False)
|
|
70
66
|
except Exception as e:
|
|
71
|
-
|
|
67
|
+
console.error(f"Error creating demo agent {str(e)}")
|
|
72
68
|
return MiddlewareResult(
|
|
73
69
|
should_continue=False,
|
|
74
|
-
error_message=f"❌ Error creating demo agent {str(e)}",
|
|
75
70
|
should_include_stacktrace=True,
|
|
76
71
|
)
|