Skip to content

Commit b9fc17d

Browse files
committed
revert some imports
1 parent 189f0f2 commit b9fc17d

4 files changed

Lines changed: 8 additions & 10 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from langchain_core.messages import HumanMessage, SystemMessage
22
from langgraph.graph import START, StateGraph, END
3-
from uipath_langchain_client.clients.openai import UiPathChatOpenAI
43
from pydantic import BaseModel
4+
from uipath_langchain.chat import UiPathChat
55

66

77
class GraphState(BaseModel):

samples/chat-uipath-agent/graph.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from langchain.agents import create_agent
22
from langchain_community.tools import DuckDuckGoSearchResults
33

4-
from uipath_langchain_client.clients.openai import UiPathAzureChatOpenAI
4+
from uipath_langchain.chat import UiPathChatOpenAI
55
search_tool = DuckDuckGoSearchResults()
66

77
movie_system_prompt = """You are an advanced AI assistant specializing in movie research and analysis. Your primary functions are:
@@ -27,5 +27,5 @@
2727
DO NOT do any math calculations unless specifically related to movie statistics or box office figures.
2828
"""
2929

30-
llm = UiPathAzureChatOpenAI(model="gpt-4o-mini-2024-07-18")
30+
llm = UiPathChatOpenAI(model="gpt-4o-mini-2024-07-18")
3131
graph = create_agent(llm, tools=[search_tool], system_prompt=movie_system_prompt)

samples/email-organizer-agent/src/email_organizer/main.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
from uipath.platform.common import CreateTask
1010
from email_organizer.outlook_client import OutlookClient
1111
from difflib import SequenceMatcher
12-
from uipath_langchain_client.clients.openai import UiPathAzureChatOpenAI
13-
12+
from uipath_langchain.chat import UiPathChat
1413
# Configuration
1514
DEFAULT_CONFIDENCE = 0.0
1615
USER = 'me'
@@ -365,7 +364,7 @@ async def llm_node(state: GraphState) -> Command:
365364
"""
366365

367366

368-
llm = UiPathAzureChatOpenAI(model="gpt-4o-mini-2024-07-18")
367+
llm = UiPathChat(model="gpt-4o-mini-2024-07-18")
369368

370369
structured_llm = llm.with_structured_output(RuleSuggestions)
371370
response = await structured_llm.ainvoke(prompt)

samples/joke-agent/graph.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
from uipath.core.guardrails import GuardrailScope
1010

1111
from middleware import CustomFilterAction, LoggingMiddleware
12-
from uipath_langchain_client.clients.openai import UiPathAzureChatOpenAI
1312
from uipath_langchain.guardrails import (
1413
BlockAction,
1514
PIIDetectionEntity,
@@ -21,7 +20,7 @@
2120
UiPathPromptInjectionMiddleware,
2221
)
2322
from uipath_langchain.guardrails.actions import LoggingSeverityLevel
24-
23+
from uipath_langchain.chat import UiPathChat
2524

2625
# Define input schema for the agent
2726
class Input(BaseModel):
@@ -34,8 +33,8 @@ class Output(BaseModel):
3433
joke: str
3534

3635

37-
# Initialize UiPathAzureChatOpenAI LLM
38-
llm = UiPathAzureChatOpenAI(model="gpt-4o-2024-08-06", temperature=0.7)
36+
# Initialize UiPathChat LLM
37+
llm = UiPathChat(model="gpt-4o-2024-08-06", temperature=0.7)
3938

4039

4140
@tool

0 commit comments

Comments
 (0)