uipath-langchain 0.0.93__tar.gz → 0.0.95__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.

Files changed (152) hide show
  1. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/PKG-INFO +2 -2
  2. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/docs/chat_models.md +1 -1
  3. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/docs/context_grounding_retriever.md +10 -2
  4. uipath_langchain-0.0.95/docs/context_grounding_vector_store.md +35 -0
  5. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/pyproject.toml +2 -2
  6. uipath_langchain-0.0.95/src/uipath_langchain/_cli/_templates/langgraph.json.template +7 -0
  7. uipath_langchain-0.0.95/src/uipath_langchain/_cli/_templates/main.py.template +33 -0
  8. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/src/uipath_langchain/_cli/cli_init.py +46 -14
  9. uipath_langchain-0.0.95/src/uipath_langchain/_cli/cli_new.py +76 -0
  10. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/src/uipath_langchain/middlewares.py +2 -0
  11. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/uv.lock +1462 -1417
  12. uipath_langchain-0.0.93/docs/context_grounding_chain.md +0 -38
  13. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/.cursorrules +0 -0
  14. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/.editorconfig +0 -0
  15. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/.gitattributes +0 -0
  16. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/.github/workflows/build.yml +0 -0
  17. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/.github/workflows/cd.yml +0 -0
  18. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/.github/workflows/ci.yml +0 -0
  19. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/.github/workflows/commitlint.yml +0 -0
  20. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/.github/workflows/lint.yml +0 -0
  21. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/.github/workflows/test.yml +0 -0
  22. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/.gitignore +0 -0
  23. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/.pre-commit-config.yaml +0 -0
  24. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/.python-version +0 -0
  25. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/.vscode/extensions.json +0 -0
  26. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/.vscode/settings.json +0 -0
  27. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/CONTRIBUTING.md +0 -0
  28. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/LICENSE +0 -0
  29. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/README.md +0 -0
  30. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/docs/interrupt_models.md +0 -0
  31. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/docs/sample_images/multi-agent-distributed/coder-agent-package-overview.png +0 -0
  32. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/docs/sample_images/multi-agent-distributed/coder-agent-process-configuration.png +0 -0
  33. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/docs/sample_images/multi-agent-distributed/planner-agent-package-overview.png +0 -0
  34. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/docs/sample_images/multi-agent-distributed/planner-agent-process-configuration.png +0 -0
  35. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/docs/sample_images/multi-agent-distributed/researcher-agent-package-overview.png +0 -0
  36. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/docs/sample_images/multi-agent-distributed/researcher-agent-process-configuration.png +0 -0
  37. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/docs/sample_images/ticket-classification/activate-apps.png +0 -0
  38. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/docs/sample_images/ticket-classification/activate-deployment.png +0 -0
  39. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/docs/sample_images/ticket-classification/copy-folder-path.png +0 -0
  40. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/docs/sample_images/ticket-classification/deploy-solution-package-wizard.png +0 -0
  41. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/docs/sample_images/ticket-classification/deploy-solution-package.png +0 -0
  42. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/docs/sample_images/ticket-classification/monitor-agent.png +0 -0
  43. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/docs/sample_images/ticket-classification/navigate-to-solution-folder.png +0 -0
  44. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/docs/sample_images/ticket-classification/resume-condition.png +0 -0
  45. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/docs/sample_images/ticket-classification/run-agent.png +0 -0
  46. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/docs/sample_images/ticket-classification/solution-destination-folder.png +0 -0
  47. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/docs/sample_images/ticket-classification/start-job.png +0 -0
  48. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/docs/sample_images/ticket-classification/upload-solution-package.png +0 -0
  49. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/company-research-agent/.env.example +0 -0
  50. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/company-research-agent/agent.mermaid +0 -0
  51. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/company-research-agent/graph.py +0 -0
  52. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/company-research-agent/langgraph.json +0 -0
  53. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/company-research-agent/pyproject.toml +0 -0
  54. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/company-research-agent/uipath.json +0 -0
  55. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/company-research-agent/uv.lock +0 -0
  56. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/hitl-inbox-server/database.py +0 -0
  57. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/hitl-inbox-server/main.py +0 -0
  58. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/hitl-inbox-server/models.py +0 -0
  59. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/hitl-inbox-server/pyproject.toml +0 -0
  60. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/hitl-inbox-server/schemas.py +0 -0
  61. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/hitl-inbox-server/templates/index.html +0 -0
  62. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/hitl-inbox-server/uv.lock +0 -0
  63. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/multi-agent-planner-researcher-coder-distributed/.env.example +0 -0
  64. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/multi-agent-planner-researcher-coder-distributed/README.md +0 -0
  65. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/multi-agent-planner-researcher-coder-distributed/coder.mermaid +0 -0
  66. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/multi-agent-planner-researcher-coder-distributed/langgraph.json +0 -0
  67. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/multi-agent-planner-researcher-coder-distributed/planner.mermaid +0 -0
  68. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/multi-agent-planner-researcher-coder-distributed/pyproject.toml +0 -0
  69. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/multi-agent-planner-researcher-coder-distributed/researcher.mermaid +0 -0
  70. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/multi-agent-planner-researcher-coder-distributed/src/multi-agent-distributed/coder.py +0 -0
  71. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/multi-agent-planner-researcher-coder-distributed/src/multi-agent-distributed/planner.py +0 -0
  72. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/multi-agent-planner-researcher-coder-distributed/src/multi-agent-distributed/researcher.py +0 -0
  73. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/multi-agent-planner-researcher-coder-distributed/uipath.json +0 -0
  74. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/multi-agent-planner-researcher-coder-distributed/uv.lock +0 -0
  75. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/multi-agent-supervisor-researcher-coder/.env.example +0 -0
  76. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/multi-agent-supervisor-researcher-coder/README.md +0 -0
  77. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/multi-agent-supervisor-researcher-coder/agent.mermaid +0 -0
  78. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/multi-agent-supervisor-researcher-coder/graph.py +0 -0
  79. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/multi-agent-supervisor-researcher-coder/langgraph.json +0 -0
  80. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/multi-agent-supervisor-researcher-coder/pyproject.toml +0 -0
  81. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/multi-agent-supervisor-researcher-coder/uipath.json +0 -0
  82. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/multi-agent-supervisor-researcher-coder/uv.lock +0 -0
  83. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/retrieval-chain/.env.example +0 -0
  84. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/retrieval-chain/README.md +0 -0
  85. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/retrieval-chain/main.py +0 -0
  86. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/retrieval-chain/pyproject.toml +0 -0
  87. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/retrieval-chain/uv.lock +0 -0
  88. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/simple-local-mcp/.env.example +0 -0
  89. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/simple-local-mcp/README.md +0 -0
  90. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/simple-local-mcp/agent.mermaid +0 -0
  91. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/simple-local-mcp/langgraph.json +0 -0
  92. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/simple-local-mcp/pyproject.toml +0 -0
  93. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/simple-local-mcp/src/simple-local-mcp/graph.py +0 -0
  94. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/simple-local-mcp/src/simple-local-mcp/math_server.py +0 -0
  95. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/simple-local-mcp/src/simple-local-mcp/weather_server.py +0 -0
  96. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/simple-local-mcp/uipath.json +0 -0
  97. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/simple-local-mcp/uv.lock +0 -0
  98. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/simple-remote-mcp/.env.example +0 -0
  99. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/simple-remote-mcp/README.md +0 -0
  100. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/simple-remote-mcp/agent.mermaid +0 -0
  101. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/simple-remote-mcp/langgraph.json +0 -0
  102. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/simple-remote-mcp/main.py +0 -0
  103. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/simple-remote-mcp/pyproject.toml +0 -0
  104. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/simple-remote-mcp/uipath.json +0 -0
  105. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/simple-remote-mcp/uv.lock +0 -0
  106. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/ticket-classification/.env.example +0 -0
  107. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/ticket-classification/README.md +0 -0
  108. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/ticket-classification/agent.mermaid +0 -0
  109. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/ticket-classification/escalation_app_solution/generic-escalation-app-solution-1.0.0.zip +0 -0
  110. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/ticket-classification/langgraph.json +0 -0
  111. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/ticket-classification/main.py +0 -0
  112. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/ticket-classification/pyproject.toml +0 -0
  113. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/ticket-classification/uipath.json +0 -0
  114. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/samples/ticket-classification/uv.lock +0 -0
  115. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/src/uipath_langchain/__init__.py +0 -0
  116. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/src/uipath_langchain/_cli/__init__.py +0 -0
  117. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/src/uipath_langchain/_cli/_runtime/_context.py +0 -0
  118. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/src/uipath_langchain/_cli/_runtime/_escalation.py +0 -0
  119. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/src/uipath_langchain/_cli/_runtime/_exception.py +0 -0
  120. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/src/uipath_langchain/_cli/_runtime/_input.py +0 -0
  121. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/src/uipath_langchain/_cli/_runtime/_output.py +0 -0
  122. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/src/uipath_langchain/_cli/_runtime/_runtime.py +0 -0
  123. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/src/uipath_langchain/_cli/_utils/_graph.py +0 -0
  124. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/src/uipath_langchain/_cli/cli_run.py +0 -0
  125. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/src/uipath_langchain/_utils/__init__.py +0 -0
  126. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/src/uipath_langchain/_utils/_request_mixin.py +0 -0
  127. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/src/uipath_langchain/_utils/_settings.py +0 -0
  128. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/src/uipath_langchain/_utils/_sleep_policy.py +0 -0
  129. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/src/uipath_langchain/chat/__init__.py +0 -0
  130. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/src/uipath_langchain/chat/models.py +0 -0
  131. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/src/uipath_langchain/chat/utils/__init__.py +0 -0
  132. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/src/uipath_langchain/chat/utils/_chat_types.py +0 -0
  133. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/src/uipath_langchain/embeddings/__init__.py +0 -0
  134. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/src/uipath_langchain/embeddings/embeddings.py +0 -0
  135. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/src/uipath_langchain/retrievers/__init__.py +0 -0
  136. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/src/uipath_langchain/retrievers/context_grounding_retriever.py +0 -0
  137. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/src/uipath_langchain/tracers/AsyncUiPathTracer.py +0 -0
  138. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/src/uipath_langchain/tracers/UiPathTracer.py +0 -0
  139. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/src/uipath_langchain/tracers/__init__.py +0 -0
  140. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/src/uipath_langchain/tracers/_events.py +0 -0
  141. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/src/uipath_langchain/tracers/_instrument_traceable.py +0 -0
  142. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/src/uipath_langchain/tracers/_utils.py +0 -0
  143. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/src/uipath_langchain/utils/__init__.py +0 -0
  144. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/src/uipath_langchain/utils/_request_mixin.py +0 -0
  145. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/src/uipath_langchain/utils/_settings.py +0 -0
  146. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/src/uipath_langchain/utils/_sleep_policy.py +0 -0
  147. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/src/uipath_langchain/vectorstores/context_grounding_vectorstore.py +0 -0
  148. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/tests/__init__.py +0 -0
  149. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/tests/test_dummy.py +0 -0
  150. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/tests/test_langchain_client.py +0 -0
  151. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/tests/tracers/__init__.py +0 -0
  152. {uipath_langchain-0.0.93 → uipath_langchain-0.0.95}/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.93
3
+ Version: 0.0.95
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.14
28
+ Requires-Dist: uipath<2.1.0,>=2.0.23
29
29
  Provides-Extra: langchain
30
30
  Description-Content-Type: text/markdown
31
31
 
@@ -81,7 +81,7 @@ llm = UiPathNormalizedChatModel(
81
81
  )
82
82
  ```
83
83
 
84
- Currently the following models can be used with `UiPathAzureChatOpenAI` (this list can be updated in the future):
84
+ Currently the following models can be used with `UiPathNormalizedChatModel` (this list can be updated in the future):
85
85
  - `anthropic.claude-3-5-sonnet-20240620-v1:0`, `anthropic.claude-3-5-sonnet-20241022-v2:0`, `anthropic.claude-3-7-sonnet-20250219-v1:0`, `anthropic.claude-3-haiku-20240307-v1:0`, `gemini-1.5-pro-001`, `gemini-2.0-flash-001`, `gpt-4o-2024-05-13`, `gpt-4o-2024-08-06`, `gpt-4o-2024-11-20`, `gpt-4o-mini-2024-07-18`, `o3-mini-2025-01-31`
86
86
 
87
87
  ### Note
@@ -1,4 +1,4 @@
1
- # Context Grounding Retriever
1
+ # ContextGroundingRetriever
2
2
 
3
3
  The `ContextGroundingRetriever` is a document retrieval system that uses vector search to efficiently find and retrieve relevant information from your document store.
4
4
 
@@ -10,6 +10,8 @@ The `ContextGroundingRetriever` is a document retrieval system that uses vector
10
10
  - Retrieve context-relevant documents for various applications
11
11
 
12
12
 
13
+ You will need to create an index in `Context Grounding` to use this feature. To create an index go to organization `Admin` -> `AI Trust Layer` -> `Context Grounding`. There you can create a new index and add documents to it. See the full documentation [here](https://docs.uipath.com/automation-cloud/automation-cloud/latest/admin-guide/about-context-grounding) for more details.
14
+
13
15
  ## Basic Usage
14
16
 
15
17
  Create a simple retriever by specifying an index name:
@@ -18,7 +20,7 @@ Create a simple retriever by specifying an index name:
18
20
  from uipath_langchain.retrievers import ContextGroundingRetriever
19
21
 
20
22
  retriever = ContextGroundingRetriever(index_name = "Company Policy Context")
21
- pprint(retriever.invoke("What is the company policy on remote work?"))
23
+ print(retriever.invoke("What is the company policy on remote work?"))
22
24
  ```
23
25
 
24
26
  ## Integration with LangChain Tools
@@ -26,6 +28,7 @@ pprint(retriever.invoke("What is the company policy on remote work?"))
26
28
  You can easily integrate the retriever with LangChain's tool system:
27
29
 
28
30
  ```python
31
+ from langchain.agents import create_react_agent
29
32
  from langchain.tools.retriever import create_retriever_tool
30
33
  from uipath_langchain.retrievers import ContextGroundingRetriever
31
34
 
@@ -38,6 +41,11 @@ retriever_tool = create_retriever_tool(
38
41
  Use a meaningful query to load relevant information from the documents. Save the citation for later use.
39
42
  """
40
43
  )
44
+
45
+ # You can use the tool in your agents
46
+ model = OpenAI()
47
+ tools = [retriever_tool]
48
+ agent = create_react_agent(model, tools, prompt="Answer user questions as best as you can using the search tool.")
41
49
  ```
42
50
 
43
51
 
@@ -0,0 +1,35 @@
1
+ # ContextGroundingVectorStore
2
+
3
+ `ContextGroundingVectorStore` is a vector store implementation designed for context-aware document retrieval. It allows you to perform semantic searches and create retrieval chains with language models.
4
+
5
+ You will need to create an index in `Context Grounding` to use this feature. To create an index go to organization `Admin` -> `AI Trust Layer` -> `Context Grounding`. There you can create a new index and add documents to it. See the full documentation [here](https://docs.uipath.com/automation-cloud/automation-cloud/latest/admin-guide/about-context-grounding) for more details.
6
+
7
+
8
+ ## Searching Documents
9
+
10
+ The vector store supports various search methods:
11
+
12
+ ```python
13
+ from uipath_langchain.vectorstores.context_grounding_vectorstore import ContextGroundingVectorStore
14
+
15
+ vectorstore = ContextGroundingVectorStore(index_name="Company policy")
16
+
17
+ # Perform semantic searches with distance scores
18
+ docs_with_scores = vectorstore.asimilarity_search_with_score(query="What is the company policy on data storage?", k=5)
19
+
20
+ # Perform a similarity search with relevance scores
21
+ docs_with_relevance_scores = await vectorstore.asimilarity_search_with_relevance_scores(query=query, k=5)
22
+ ```
23
+
24
+ ## Creating a Retrieval Chain
25
+
26
+ You can integrate the vector store into a retrieval chain with a language model:
27
+
28
+ ```python
29
+ # Run a retrieval chain
30
+ model = UiPathAzureChatOpenAI(model="gpt-4o-2024-08-06", max_retries=3)
31
+ retrieval_chain = create_retrieval_chain(vectorstore=vectorstore, model=model)
32
+
33
+ query = "What is the ECCN for a laptop?"
34
+ result = retrieval_chain(query)
35
+ ```
@@ -1,11 +1,11 @@
1
1
  [project]
2
2
  name = "uipath-langchain"
3
- version = "0.0.93"
3
+ version = "0.0.95"
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.14, <2.1.0",
8
+ "uipath>=2.0.23, <2.1.0",
9
9
  "langgraph>=0.2.70",
10
10
  "langchain-core>=0.3.34",
11
11
  "langgraph-checkpoint-sqlite>=2.0.3",
@@ -0,0 +1,7 @@
1
+ {
2
+ "dependencies": ["."],
3
+ "graphs": {
4
+ "agent": "./main.py:graph"
5
+ },
6
+ "env": ".env"
7
+ }
@@ -0,0 +1,33 @@
1
+ from langchain_anthropic import ChatAnthropic
2
+ from langchain_core.messages import HumanMessage, SystemMessage
3
+ from langchain_openai import ChatOpenAI
4
+ from langgraph.graph import START, StateGraph, END
5
+ from pydantic import BaseModel
6
+ import os
7
+
8
+ class GraphInput(BaseModel):
9
+ topic: str
10
+
11
+ class GraphOutput(BaseModel):
12
+ report: str
13
+
14
+ async def generate_report(state: GraphInput) -> GraphOutput:
15
+ if os.getenv("ANTHROPIC_API_KEY"):
16
+ llm_model = ChatAnthropic(model="claude-3-5-sonnet-latest")
17
+ elif os.getenv("OPENAI_API_KEY"):
18
+ llm_model = ChatOpenAI(model="gpt-4o-mini", temperature=0)
19
+ else:
20
+ raise Exception("Error: Missing API Key. Please define either ANTHROPIC_API_KEY or OPENAI_API_KEY.")
21
+
22
+ system_prompt = "You are a report generator. Please provide a brief report based on the given topic."
23
+ output = await llm_model.ainvoke([SystemMessage(system_prompt), HumanMessage(state.topic)])
24
+ return GraphOutput(report=output.content)
25
+
26
+ builder = StateGraph(input=GraphInput, output=GraphOutput)
27
+
28
+ builder.add_node("generate_report", generate_report)
29
+
30
+ builder.add_edge(START, "generate_report")
31
+ builder.add_edge("generate_report", END)
32
+
33
+ graph = builder.compile()
@@ -4,9 +4,11 @@ import os
4
4
  import uuid
5
5
  from typing import Any, Dict
6
6
 
7
+ import click
7
8
  from langgraph.graph.state import CompiledStateGraph
8
9
  from uipath._cli._utils._parse_ast import generate_bindings_json # type: ignore
9
10
  from uipath._cli.middlewares import MiddlewareResult
11
+ from uipath._cli.spinner import Spinner
10
12
 
11
13
  from ._utils._graph import LangGraphConfig
12
14
 
@@ -32,6 +34,25 @@ def resolve_refs(schema, root=None):
32
34
  return schema
33
35
 
34
36
 
37
+ def process_nullable_types(
38
+ schema: Dict[str, Any] | list[Any] | Any,
39
+ ) -> Dict[str, Any] | list[Any]:
40
+ """Process the schema to handle nullable types by removing anyOf with null and keeping the base type."""
41
+ if isinstance(schema, dict):
42
+ if "anyOf" in schema and len(schema["anyOf"]) == 2:
43
+ types = [t.get("type") for t in schema["anyOf"]]
44
+ if "null" in types:
45
+ non_null_type = next(
46
+ t for t in schema["anyOf"] if t.get("type") != "null"
47
+ )
48
+ return non_null_type
49
+
50
+ return {k: process_nullable_types(v) for k, v in schema.items()}
51
+ elif isinstance(schema, list):
52
+ return [process_nullable_types(item) for item in schema]
53
+ return schema
54
+
55
+
35
56
  def generate_schema_from_graph(graph: CompiledStateGraph) -> Dict[str, Any]:
36
57
  """Extract input/output schema from a LangGraph graph"""
37
58
  schema = {
@@ -42,12 +63,14 @@ def generate_schema_from_graph(graph: CompiledStateGraph) -> Dict[str, Any]:
42
63
  if hasattr(graph, "input_schema"):
43
64
  if hasattr(graph.input_schema, "model_json_schema"):
44
65
  input_schema = graph.input_schema.model_json_schema()
45
-
46
66
  unpacked_ref_def_properties = resolve_refs(input_schema)
47
67
 
48
- schema["input"]["properties"] = unpacked_ref_def_properties.get(
49
- "properties", {}
68
+ # Process the schema to handle nullable types
69
+ processed_properties = process_nullable_types(
70
+ unpacked_ref_def_properties.get("properties", {})
50
71
  )
72
+
73
+ schema["input"]["properties"] = processed_properties
51
74
  schema["input"]["required"] = unpacked_ref_def_properties.get(
52
75
  "required", []
53
76
  )
@@ -55,11 +78,14 @@ def generate_schema_from_graph(graph: CompiledStateGraph) -> Dict[str, Any]:
55
78
  if hasattr(graph, "output_schema"):
56
79
  if hasattr(graph.output_schema, "model_json_schema"):
57
80
  output_schema = graph.output_schema.model_json_schema()
58
-
59
81
  unpacked_ref_def_properties = resolve_refs(output_schema)
60
- schema["output"]["properties"] = unpacked_ref_def_properties.get(
61
- "properties", {}
82
+
83
+ # Process the schema to handle nullable types
84
+ processed_properties = process_nullable_types(
85
+ unpacked_ref_def_properties.get("properties", {})
62
86
  )
87
+
88
+ schema["output"]["properties"] = processed_properties
63
89
  schema["output"]["required"] = unpacked_ref_def_properties.get(
64
90
  "required", []
65
91
  )
@@ -69,6 +95,7 @@ def generate_schema_from_graph(graph: CompiledStateGraph) -> Dict[str, Any]:
69
95
 
70
96
  async def langgraph_init_middleware_async(entrypoint: str) -> MiddlewareResult:
71
97
  """Middleware to check for langgraph.json and create uipath.json with schemas"""
98
+ spinner = Spinner("Initializing UiPath project...")
72
99
  config = LangGraphConfig()
73
100
  if not config.exists:
74
101
  return MiddlewareResult(
@@ -76,6 +103,7 @@ async def langgraph_init_middleware_async(entrypoint: str) -> MiddlewareResult:
76
103
  ) # Continue with normal flow if no langgraph.json
77
104
 
78
105
  try:
106
+ spinner.start()
79
107
  config.load_config()
80
108
  entrypoints = []
81
109
  all_bindings = {"version": "2.0", "resources": []}
@@ -98,7 +126,6 @@ async def langgraph_init_middleware_async(entrypoint: str) -> MiddlewareResult:
98
126
  mermaids[graph.name] = compiled_graph.get_graph(xray=1).draw_mermaid()
99
127
 
100
128
  try:
101
- print("Generating bindings for ", graph.file_path)
102
129
  # Make sure the file path exists
103
130
  if os.path.exists(graph.file_path):
104
131
  file_bindings = generate_bindings_json(graph.file_path)
@@ -108,7 +135,7 @@ async def langgraph_init_middleware_async(entrypoint: str) -> MiddlewareResult:
108
135
  all_bindings["resources"] = file_bindings["resources"]
109
136
  except Exception as e:
110
137
  print(
111
- f"Warning: Could not generate bindings for {graph.file_path}: {str(e)}"
138
+ f"⚠️ Warning: Could not generate bindings for {graph.file_path}: {str(e)}"
112
139
  )
113
140
 
114
141
  new_entrypoint: dict[str, Any] = {
@@ -121,19 +148,21 @@ async def langgraph_init_middleware_async(entrypoint: str) -> MiddlewareResult:
121
148
  entrypoints.append(new_entrypoint)
122
149
 
123
150
  except Exception as e:
151
+ spinner.stop()
124
152
  print(f"Error during graph load: {e}")
125
153
  return MiddlewareResult(
126
154
  should_continue=False,
127
- error_message=f"Failed to load graph '{graph.name}': {str(e)}",
155
+ error_message=f"Failed to load graph '{graph.name}': {str(e)}",
128
156
  should_include_stacktrace=True,
129
157
  )
130
158
  finally:
131
159
  await graph.cleanup()
132
160
 
133
161
  if entrypoint and not entrypoints:
162
+ spinner.stop()
134
163
  return MiddlewareResult(
135
164
  should_continue=False,
136
- error_message=f"Error: No graph found with name '{entrypoint}'",
165
+ error_message=f"Error: No graph found with name '{entrypoint}'",
137
166
  )
138
167
 
139
168
  uipath_config = {"entryPoints": entrypoints, "bindings": all_bindings}
@@ -149,21 +178,24 @@ async def langgraph_init_middleware_async(entrypoint: str) -> MiddlewareResult:
149
178
  with open(mermaid_file_path, "w") as f:
150
179
  f.write(mermaid_content)
151
180
  except Exception as write_error:
181
+ spinner.stop()
152
182
  return MiddlewareResult(
153
183
  should_continue=False,
154
- error_message=f"Error writing mermaid file for '{graph_name}': {str(write_error)}",
184
+ error_message=f"Error writing mermaid file for '{graph_name}': {str(write_error)}",
155
185
  should_include_stacktrace=True,
156
186
  )
157
-
187
+ spinner.stop()
158
188
  return MiddlewareResult(
159
189
  should_continue=False,
160
- info_message=f"Configuration file {config_path} created successfully.",
190
+ info_message=click.style(" ", fg="green", bold=True)
191
+ + f" Configuration file {config_path} created successfully.",
161
192
  )
162
193
 
163
194
  except Exception as e:
195
+ spinner.stop()
164
196
  return MiddlewareResult(
165
197
  should_continue=False,
166
- error_message=f"Error processing langgraph configuration: {str(e)}",
198
+ error_message=f"Error processing langgraph configuration: {str(e)}",
167
199
  should_include_stacktrace=True,
168
200
  )
169
201
 
@@ -0,0 +1,76 @@
1
+ import os
2
+ import shutil
3
+
4
+ import click
5
+ from uipath._cli.middlewares import MiddlewareResult
6
+ from uipath._cli.spinner import Spinner
7
+
8
+
9
+ def generate_script(target_directory):
10
+ template_script_path = os.path.join(
11
+ os.path.dirname(__file__), "_templates/main.py.template"
12
+ )
13
+ target_path = os.path.join(target_directory, "main.py")
14
+
15
+ shutil.copyfile(template_script_path, target_path)
16
+
17
+ template_langgraph_json_path = os.path.join(
18
+ os.path.dirname(__file__), "_templates/langgraph.json.template"
19
+ )
20
+ target_path = os.path.join(target_directory, "langgraph.json")
21
+ shutil.copyfile(template_langgraph_json_path, target_path)
22
+
23
+
24
+ def generate_pyproject(target_directory, project_name):
25
+ project_toml_path = os.path.join(target_directory, "pyproject.toml")
26
+ toml_content = f"""[project]
27
+ name = "{project_name}"
28
+ version = "0.0.1"
29
+ description = "{project_name}"
30
+ authors = [{{ name = "John Doe", email = "john.doe@myemail.com" }}]
31
+ dependencies = [
32
+ "uipath-langchain>=0.0.95",
33
+ "langchain-anthropic>=0.3.8",
34
+ ]
35
+ requires-python = ">=3.10"
36
+ """
37
+
38
+ with open(project_toml_path, "w") as f:
39
+ f.write(toml_content)
40
+
41
+
42
+ def langgraph_new_middleware(name: str) -> MiddlewareResult:
43
+ """Middleware to create demo langchain agent"""
44
+ spinner = Spinner("Creating demo agent...")
45
+ directory = os.getcwd()
46
+
47
+ try:
48
+ generate_script(directory)
49
+ click.echo(click.style("✓ ", fg="green", bold=True) + "Created main.py file")
50
+ click.echo(
51
+ click.style("✓ ", fg="green", bold=True) + "Created langgraph.json file"
52
+ )
53
+ generate_pyproject(directory, name)
54
+ click.echo(
55
+ click.style("✓ ", fg="green", bold=True) + "Created pyproject.toml file"
56
+ )
57
+ os.system("uv sync")
58
+ spinner.start()
59
+ ctx = click.get_current_context()
60
+ init_cmd = ctx.parent.command.get_command(ctx, "init") # type: ignore
61
+ ctx.invoke(init_cmd)
62
+ spinner.stop()
63
+ click.echo(
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
+ )
70
+ except Exception as e:
71
+ spinner.stop()
72
+ return MiddlewareResult(
73
+ should_continue=False,
74
+ error_message=f"❌ Error creating demo agent {str(e)}",
75
+ should_include_stacktrace=True,
76
+ )
@@ -1,6 +1,7 @@
1
1
  from uipath._cli.middlewares import Middlewares
2
2
 
3
3
  from ._cli.cli_init import langgraph_init_middleware
4
+ from ._cli.cli_new import langgraph_new_middleware
4
5
  from ._cli.cli_run import langgraph_run_middleware
5
6
 
6
7
 
@@ -8,3 +9,4 @@ def register_middleware():
8
9
  """This function will be called by the entry point system when uipath_langchain is installed"""
9
10
  Middlewares.register("init", langgraph_init_middleware)
10
11
  Middlewares.register("run", langgraph_run_middleware)
12
+ Middlewares.register("new", langgraph_new_middleware)