Skip to content

Commit fa76ae7

Browse files
cosminachoandrei-rusu
authored andcommitted
feat: added uipath-langchain-client
1 parent 7d04575 commit fa76ae7

47 files changed

Lines changed: 1327 additions & 4249 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/integration_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
uses: actions/checkout@v4
5757

5858
- name: Install Dependencies
59-
run: uv sync
59+
run: uv sync --all-extras
6060

6161
- name: Run testcase
6262
env:

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,8 @@ cython_debug/
173173
# PyPI configuration file
174174
.pypirc
175175

176+
.vscode/
177+
176178

177179
**/uipath.db
178180
**/.uipath

pyproject.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "uipath-langchain"
3-
version = "0.5.66"
3+
version = "1.0.0"
44
description = "Python SDK that enables developers to build and deploy LangGraph agents to the UiPath Cloud Platform"
55
readme = { file = "README.md", content-type = "text/markdown" }
66
requires-python = ">=3.11"
@@ -10,7 +10,6 @@ dependencies = [
1010
"langgraph>=1.0.0, <2.0.0",
1111
"langchain-core>=1.2.11, <2.0.0",
1212
"langgraph-checkpoint-sqlite>=3.0.3, <4.0.0",
13-
"langchain-openai>=1.0.0, <2.0.0",
1413
"langchain>=1.0.0, <2.0.0",
1514
"pydantic-settings>=2.6.0",
1615
"python-dotenv>=1.0.1",
@@ -20,6 +19,7 @@ dependencies = [
2019
"jsonpath-ng>=1.7.0",
2120
"mcp==1.26.0",
2221
"langchain-mcp-adapters==0.2.1",
22+
"uipath-langchain-client[openai]>=1.1.7",
2323
]
2424

2525
classifiers = [
@@ -35,8 +35,10 @@ maintainers = [
3535
]
3636

3737
[project.optional-dependencies]
38-
vertex = ["langchain-google-genai>=2.0.0", "google-generativeai>=0.8.0"]
39-
bedrock = ["langchain-aws>=0.2.35", "boto3-stubs>=1.41.4"]
38+
bedrock = ["uipath-langchain-client[aws]>=1.1.7"]
39+
anthropic = ["uipath-langchain-client[anthropic]>=1.1.7"]
40+
vertex = ["uipath-langchain-client[google,vertexai]>=1.1.7"]
41+
all = ["uipath-langchain-client[all]>=1.1.7"]
4042

4143
[project.entry-points."uipath.middlewares"]
4244
register = "uipath_langchain.middlewares:register_middleware"
@@ -82,8 +84,6 @@ select = ["E", "F", "B", "I"]
8284

8385
[tool.ruff.lint.per-file-ignores]
8486
"*" = ["E501"]
85-
"src/uipath_langchain/chat/bedrock.py" = ["E402"]
86-
"src/uipath_langchain/chat/vertex.py" = ["E402"]
8787

8888
[tool.ruff.format]
8989
quote-style = "double"

samples/bring-your-own-model/main.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
from langchain_core.messages import HumanMessage, SystemMessage
2-
from langgraph.graph import START, StateGraph, END
3-
from uipath_langchain.chat import UiPathChatOpenAI
2+
from langgraph.graph import END, START, StateGraph
43
from pydantic import BaseModel
54

5+
from uipath_langchain.chat import UiPathChatOpenAI
6+
67

78
class GraphState(BaseModel):
89
topic: str
@@ -11,11 +12,11 @@ class GraphState(BaseModel):
1112
class GraphOutput(BaseModel):
1213
report: str
1314

15+
1416
async def generate_report(state: GraphState) -> GraphOutput:
1517
system_prompt = "You are a report generator. Please provide a brief report based on the given topic."
1618
llm = UiPathChatOpenAI(
17-
byo_connection_id="my-custom-model",
18-
model_name="gpt-4o-2024-11-20"
19+
byo_connection_id="my-custom-model", model_name="gpt-4o-2024-11-20"
1920
)
2021
output = await llm.ainvoke(
2122
[SystemMessage(system_prompt), HumanMessage(state.topic)]

samples/chat-uipath-agent/graph.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
from langchain.agents import create_agent
2-
from uipath_langchain.chat import UiPathChatOpenAI
32
from langchain_community.tools import DuckDuckGoSearchResults
43

4+
from uipath_langchain.chat import UiPathChatOpenAI
5+
56
search_tool = DuckDuckGoSearchResults()
67

78
movie_system_prompt = """You are an advanced AI assistant specializing in movie research and analysis. Your primary functions are:

0 commit comments

Comments
 (0)