Skip to content

Commit c9fb4fe

Browse files
committed
chore: update passthrough endpoint for openai
1 parent 216fae1 commit c9fb4fe

4 files changed

Lines changed: 33 additions & 24 deletions

File tree

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-llamaindex"
3-
version = "0.1.6"
3+
version = "0.1.7"
44
description = "UiPath LlamaIndex SDK"
55
readme = { file = "README.md", content-type = "text/markdown" }
66
requires-python = ">=3.11"

src/uipath_llamaindex/llms/_openai.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from typing import Any
33

44
from llama_index.llms.azure_openai import AzureOpenAI # type: ignore
5+
from uipath._utils._ssl_context import get_httpx_client_kwargs
56
from uipath.utils import EndpointManager
67

78
from .supported_models import OpenAIModel
@@ -31,11 +32,12 @@ def __init__(
3132
defaults = {
3233
"model": model_value,
3334
"deployment_name": model_value,
34-
"azure_endpoint": f"{base_url}/{EndpointManager.get_passthrough_endpoint().format(model=model_value, api_version=api_version)}",
35+
"azure_endpoint": f"{base_url}/{EndpointManager.get_vendor_endpoint().format(vendor='openai', model=model_value)}",
3536
"api_key": os.environ.get("UIPATH_ACCESS_TOKEN"),
3637
"api_version": api_version,
3738
"is_chat_model": True,
3839
"default_headers": default_headers_dict,
40+
**get_httpx_client_kwargs(),
3941
}
4042
final_kwargs = {**defaults, **kwargs}
4143
super().__init__(**final_kwargs)

src/uipath_llamaindex/llms/vertex.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import httpx
66
from llama_index.core.callbacks import CallbackManager
77
from llama_index.core.constants import DEFAULT_NUM_OUTPUTS, DEFAULT_TEMPERATURE
8+
from uipath._utils._ssl_context import get_httpx_client_kwargs
89
from uipath.utils import EndpointManager
910

1011
from .supported_models import GeminiModel
@@ -179,11 +180,13 @@ def __init__(
179180
transport=_UrlRewriteTransport(uipath_url),
180181
headers=headers,
181182
follow_redirects=True,
183+
**get_httpx_client_kwargs(),
182184
),
183185
httpx_async_client=httpx.AsyncClient(
184186
transport=_AsyncUrlRewriteTransport(uipath_url),
185187
headers=headers,
186188
follow_redirects=True,
189+
**get_httpx_client_kwargs(),
187190
),
188191
)
189192

@@ -331,6 +334,7 @@ def _create_sync_client(self) -> google.genai.Client:
331334
transport=_UrlRewriteTransport(uipath_url),
332335
headers=headers,
333336
follow_redirects=True,
337+
**get_httpx_client_kwargs(),
334338
),
335339
)
336340

uv.lock

Lines changed: 25 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)