Skip to content

Commit a25c8ec

Browse files
authored
Merge pull request #105 from UiPath/docs/update-chat-models
docs: update llms
2 parents 9238685 + 7ac3649 commit a25c8ec

1 file changed

Lines changed: 92 additions & 2 deletions

File tree

packages/uipath-llamaindex/docs/llms_and_embeddings.md

Lines changed: 92 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# LLMs and Embeddings
22

33
UiPath provides pre-configured LLM and embedding classes that handle authentication, routing, and configuration automatically, allowing you to focus on building your agents.
4-
You do not need to add tokens from OpenAI, usage of these models will consume `Agent Units` on your account.
4+
You do not need to add API keys from OpenAI, AWS, or Google, usage of these models will consume `Agent Units` on your account.
55

66
## UiPathOpenAI
77

@@ -97,10 +97,100 @@ embeddings = embed_model.get_text_embedding_batch(texts)
9797
print(f"Number of embeddings: {len(embeddings)}")
9898
```
9999

100+
## UiPathChatBedrock and UiPathChatBedrockConverse
101+
102+
`UiPathChatBedrock` and `UiPathChatBedrockConverse` provide access to AWS Bedrock models through UiPath using the Invoke API and Converse API respectively.
103+
104+
### Installation
105+
106+
These classes require additional dependencies. Install them with:
107+
108+
```bash
109+
pip install uipath-llamaindex[bedrock]
110+
# or using uv:
111+
uv add 'uipath-llamaindex[bedrock]'
112+
```
113+
114+
### Example Usage
115+
116+
```python
117+
from uipath_llamaindex.llms.bedrock import UiPathChatBedrockConverse
118+
from uipath_llamaindex.llms import BedrockModel
119+
from llama_index.core.llms import ChatMessage
120+
121+
# Create an LLM instance with default settings
122+
llm = UiPathChatBedrockConverse()
123+
124+
# Or use a specific model
125+
llm = UiPathChatBedrockConverse(model=BedrockModel.anthropic_claude_sonnet_4_5)
126+
127+
# Create chat messages
128+
messages = [
129+
ChatMessage(role="user", content="Hello"),
130+
]
131+
132+
# Generate a response
133+
response = llm.chat(messages)
134+
print(response)
135+
```
136+
137+
Similarly, `UiPathChatBedrock` can be used with the Invoke API:
138+
139+
```python
140+
from uipath_llamaindex.llms.bedrock import UiPathChatBedrock
141+
from uipath_llamaindex.llms import BedrockModel
142+
143+
llm = UiPathChatBedrock(model=BedrockModel.anthropic_claude_sonnet_4)
144+
```
145+
146+
Currently, the following models can be used (this list can be updated in the future):
147+
148+
- `anthropic.claude-3-7-sonnet-20250219-v1:0`, `anthropic.claude-sonnet-4-20250514-v1:0`, `anthropic.claude-sonnet-4-5-20250929-v1:0`, `anthropic.claude-haiku-4-5-20251001-v1:0`
149+
150+
## UiPathVertex
151+
152+
`UiPathVertex` provides access to Google Vertex AI (Gemini) models through UiPath.
153+
154+
### Installation
155+
156+
This class requires additional dependencies. Install them with:
157+
158+
```bash
159+
pip install uipath-llamaindex[vertex]
160+
# or using uv:
161+
uv add 'uipath-llamaindex[vertex]'
162+
```
163+
164+
### Example Usage
165+
166+
```python
167+
from uipath_llamaindex.llms.vertex import UiPathVertex
168+
from uipath_llamaindex.llms import GeminiModel
169+
from llama_index.core.llms import ChatMessage
170+
171+
# Create an LLM instance with default settings
172+
llm = UiPathVertex()
173+
174+
# Or use a specific model
175+
llm = UiPathVertex(model=GeminiModel.gemini_2_5_pro)
176+
177+
# Create chat messages
178+
messages = [
179+
ChatMessage(role="user", content="Hello"),
180+
]
181+
182+
# Generate a response
183+
response = llm.chat(messages)
184+
print(response)
185+
```
186+
187+
Currently, the following models can be used (this list can be updated in the future):
188+
189+
- `gemini-2.0-flash-001`, `gemini-2.5-flash`, `gemini-2.5-pro`
100190

101191
## Integration with LlamaIndex
102192

103-
Both classes integrate seamlessly with LlamaIndex components:
193+
These classes integrate seamlessly with LlamaIndex components:
104194

105195
### Using with Agents
106196

0 commit comments

Comments
 (0)