|
5 | 5 |
|
6 | 6 | import httpx |
7 | 7 | from openai import AsyncOpenAI, OpenAI |
8 | | -from pydantic_ai.models.openai import OpenAIModel |
| 8 | +from pydantic_ai.models.openai import OpenAIChatModel |
9 | 9 | from pydantic_ai.providers.openai import OpenAIProvider |
10 | 10 | from uipath._utils._ssl_context import get_httpx_client_kwargs |
11 | 11 | from uipath.utils import EndpointManager |
@@ -74,7 +74,7 @@ class UiPathChatOpenAI: |
74 | 74 |
|
75 | 75 | This client wraps the OpenAI SDK and configures it to use UiPath's |
76 | 76 | LLM Gateway endpoints with proper authentication and headers. |
77 | | - Returns PydanticAI-compatible OpenAIModel instances. |
| 77 | + Returns PydanticAI-compatible OpenAIChatModel instances. |
78 | 78 |
|
79 | 79 | Example: |
80 | 80 | ```python |
@@ -173,7 +173,7 @@ def __init__( |
173 | 173 | ) |
174 | 174 |
|
175 | 175 | # Create PydanticAI-compatible model |
176 | | - self._model = OpenAIModel( |
| 176 | + self._model = OpenAIChatModel( |
177 | 177 | self._model_name, |
178 | 178 | provider=OpenAIProvider(openai_client=self._async_client), |
179 | 179 | ) |
@@ -225,8 +225,8 @@ def _build_base_url(self) -> str: |
225 | 225 | raise ValueError("UIPATH_URL environment variable is required") |
226 | 226 |
|
227 | 227 | @property |
228 | | - def model(self) -> OpenAIModel: |
229 | | - """Get the PydanticAI-compatible OpenAIModel.""" |
| 228 | + def model(self) -> OpenAIChatModel: |
| 229 | + """Get the PydanticAI-compatible OpenAIChatModel.""" |
230 | 230 | return self._model |
231 | 231 |
|
232 | 232 | @property |
|
0 commit comments