Skip to content

Commit ec90a1a

Browse files
authored
Merge pull request #43 from UiPath/feature/rename_uipath_chat
feat(chat): rename UiPathNormalizedChatModel to UiPathChat
2 parents 1b8c7cf + 586e6b2 commit ec90a1a

File tree

5 files changed

+19
-19
lines changed

5 files changed

+19
-19
lines changed

docs/chat_models.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# UiPath chat models
22

3-
UiPath provides two chat models `UiPathAzureChatOpenAI` and `UiPathNormalizedChatModel`. These are compatible with langgraph as drop in replacements. You do not need to add tokens from OpenAI or Anthropic, usage of these chat models will consume `AI Units` on your account.
3+
UiPath provides two chat models `UiPathAzureChatOpenAI` and `UiPathChat`. These are compatible with langgraph as drop in replacements. You do not need to add tokens from OpenAI or Anthropic, usage of these chat models will consume `AI Units` on your account.
44

55
## UiPathAzureChatOpenAI
66

@@ -15,8 +15,8 @@ from langchain_openai import ChatOpenAI
1515
llm = ChatOpenAI(
1616
model="gpt-4o",
1717
temperature=0,
18-
max_tokens=None,
19-
timeout=None,
18+
max_tokens=4000,
19+
timeout=30,
2020
max_retries=2,
2121
# api_key="...", # if you prefer to pass api key in directly instaed of using env vars
2222
# base_url="...",
@@ -32,10 +32,10 @@ You can simply change `ChatOpenAi` with `UiPathAzureChatOpenAI`, you don't have
3232
from uipath_langchain.chat.models import UiPathAzureChatOpenAI
3333

3434
llm = UiPathAzureChatOpenAI(
35-
model="gpt-4o",
35+
model="gpt-4o-2024-08-06",
3636
temperature=0,
37-
max_tokens=None,
38-
timeout=None,
37+
max_tokens=4000,
38+
timeout=30,
3939
max_retries=2,
4040
# other params...
4141
)
@@ -45,9 +45,9 @@ Currently the following models can be used with `UiPathAzureChatOpenAI` (this li
4545
- `gpt-4`, `gpt-4-1106-Preview`, `gpt-4-32k`, `gpt-4-turbo-2024-04-09`, `gpt-4-vision-preview`, `gpt-4o-2024-05-13`, `gpt-4o-2024-08-06`, `gpt-4o-mini-2024-07-18`, `o3-mini-2025-01-31`
4646

4747

48-
## UiPathNormalizedChatModel
48+
## UiPathChat
4949

50-
`UiPathNormalizedChatModel` is a more versatile clas that can suport models from diferent vendors including OpenAI.
50+
`UiPathChat` is a more versatile clas that can suport models from diferent vendors including OpenAI.
5151

5252
### Example usage
5353

@@ -66,12 +66,12 @@ llm = ChatAnthropic(
6666
)
6767
```
6868

69-
You can replace it with `UiPathNormalizedChatModel` like so:
69+
You can replace it with `UiPathChat` like so:
7070

7171
```python
72-
from uipath_langchain.chat.models import UiPathNormalizedChatModel
72+
from uipath_langchain.chat.models import UiPathChat
7373

74-
llm = UiPathNormalizedChatModel(
74+
llm = UiPathChat(
7575
model="anthropic.claude-3-opus-20240229-v1:0",
7676
temperature=0,
7777
max_tokens=1024,
@@ -81,7 +81,7 @@ llm = UiPathNormalizedChatModel(
8181
)
8282
```
8383

84-
Currently the following models can be used with `UiPathNormalizedChatModel` (this list can be updated in the future):
84+
Currently the following models can be used with `UiPathChat` (this list can be updated in the future):
8585
- `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`
8686

8787
### Note

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "uipath-langchain"
3-
version = "0.0.96"
3+
version = "0.0.97"
44
description = "UiPath Langchain"
55
readme = { file = "README.md", content-type = "text/markdown" }
66
requires-python = ">=3.10"

src/uipath_langchain/chat/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
from .models import UiPathAzureChatOpenAI, UiPathNormalizedChatModel
1+
from .models import UiPathAzureChatOpenAI, UiPathChat
22

33
__all__ = [
4-
"UiPathNormalizedChatModel",
4+
"UiPathChat",
55
"UiPathAzureChatOpenAI",
66
]

src/uipath_langchain/chat/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def endpoint(self) -> str:
7676
)
7777

7878

79-
class UiPathNormalizedChatModel(UiPathRequestMixin, AzureChatOpenAI):
79+
class UiPathChat(UiPathRequestMixin, AzureChatOpenAI):
8080
"""Custom LLM connector for LangChain integration with UiPath Normalized."""
8181

8282
def _create_chat_result(

tests/test_langchain_client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
from uipath_langchain.chat import (
2020
UiPathAzureChatOpenAI,
21-
UiPathNormalizedChatModel,
21+
UiPathChat,
2222
)
2323
from uipath_langchain.embeddings import (
2424
UiPathAzureOpenAIEmbeddings,
@@ -131,7 +131,7 @@ def test_cached_call_tokens(cached_llmgw_calls: Optional[SQLiteCache]):
131131

132132

133133
def test_normalized_cached_call(cached_llmgw_calls: Optional[SQLiteCache]):
134-
model = UiPathNormalizedChatModel(
134+
model = UiPathChat(
135135
model="anthropic.claude-3-5-sonnet-20240620-v1:0", cache=cached_llmgw_calls
136136
)
137137
messages = [
@@ -143,7 +143,7 @@ def test_normalized_cached_call(cached_llmgw_calls: Optional[SQLiteCache]):
143143

144144

145145
def test_normalized_cached_call_tokens(cached_llmgw_calls: Optional[SQLiteCache]):
146-
model = UiPathNormalizedChatModel(
146+
model = UiPathChat(
147147
model="anthropic.claude-3-5-sonnet-20240620-v1:0", cache=cached_llmgw_calls
148148
)
149149
messages = [

0 commit comments

Comments
 (0)