Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
uses: actions/checkout@v4

- name: Install Dependencies
run: uv sync
run: uv sync --all-extras

- name: Run testcase
env:
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ cython_debug/
# PyPI configuration file
.pypirc

.vscode/


**/uipath.db
**/.uipath
Expand Down
10 changes: 5 additions & 5 deletions pyproject.toml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you should increase the major version of uipath-langchain-python as it is not backwards compatible. Some methods used in uipath-agents-python are removed.

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ dependencies = [
"langgraph>=1.0.0, <2.0.0",
"langchain-core>=1.2.5, <2.0.0",
"langgraph-checkpoint-sqlite>=3.0.3, <4.0.0",
"langchain-openai>=1.0.0, <2.0.0",
"langchain>=1.0.0, <2.0.0",
"pydantic-settings>=2.6.0",
"python-dotenv>=1.0.1",
Expand All @@ -20,6 +19,7 @@ dependencies = [
"jsonpath-ng>=1.7.0",
"mcp==1.24.0",
"langchain-mcp-adapters==0.2.1",
"uipath-langchain-client[openai]>=1.0.12",
]

classifiers = [
Expand All @@ -35,8 +35,10 @@ maintainers = [
]

[project.optional-dependencies]
vertex = ["langchain-google-genai>=2.0.0", "google-generativeai>=0.8.0"]
bedrock = ["langchain-aws>=0.2.35", "boto3-stubs>=1.41.4"]
bedrock = ["uipath-langchain-client[aws]>=1.0.12"]
anthropic = ["uipath-langchain-client[anthropic]>=1.0.12"]
vertex = ["uipath-langchain-client[google,vertexai]>=1.0.12"]
all = ["uipath-langchain-client[all]>=1.0.12"]

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

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

[tool.ruff.format]
quote-style = "double"
Expand Down
9 changes: 5 additions & 4 deletions samples/bring-your-own-model/main.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
from langchain_core.messages import HumanMessage, SystemMessage
from langgraph.graph import START, StateGraph, END
from uipath_langchain.chat import UiPathChatOpenAI
from langgraph.graph import END, START, StateGraph
from pydantic import BaseModel

from uipath_langchain.chat import UiPathChatOpenAI


class GraphState(BaseModel):
topic: str
Expand All @@ -11,11 +12,11 @@ class GraphState(BaseModel):
class GraphOutput(BaseModel):
report: str


async def generate_report(state: GraphState) -> GraphOutput:
system_prompt = "You are a report generator. Please provide a brief report based on the given topic."
llm = UiPathChatOpenAI(
byo_connection_id="my-custom-model",
model_name="gpt-4o-2024-11-20"
byo_connection_id="my-custom-model", model_name="gpt-4o-2024-11-20"
)
output = await llm.ainvoke(
[SystemMessage(system_prompt), HumanMessage(state.topic)]
Expand Down
3 changes: 2 additions & 1 deletion samples/chat-uipath-agent/graph.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
from langchain.agents import create_agent
from uipath_langchain.chat import UiPathChatOpenAI
from langchain_community.tools import DuckDuckGoSearchResults

from uipath_langchain.chat import UiPathChatOpenAI

search_tool = DuckDuckGoSearchResults()

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