Skip to content

Commit 803e5e5

Browse files
authored
Refactor uipath_llm_client in order to integrate it as submodule in uipath (#36)
1 parent 5692afb commit 803e5e5

52 files changed

Lines changed: 177 additions & 276 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/cd-langchain.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
GH_TOKEN: ${{ github.token }}
3030
run: |
3131
# Check if the core package version was also modified in this push
32-
if ! git diff HEAD~1 --name-only | grep -q '^src/uipath_llm_client/__version__.py$'; then
32+
if ! git diff HEAD~1 --name-only | grep -q '^src/uipath/llm_client/__version__.py$'; then
3333
echo "Core package version unchanged — no need to wait."
3434
exit 0
3535
fi

.github/workflows/cd.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
branches:
66
- main
77
paths:
8-
- 'src/uipath_llm_client/__version__.py'
8+
- 'src/uipath/llm_client/__version__.py'
99
workflow_dispatch:
1010

1111
jobs:
@@ -63,7 +63,7 @@ jobs:
6363
- name: Get version
6464
id: version
6565
run: |
66-
VERSION=$(grep '^__version__' src/uipath_llm_client/__version__.py | sed -n 's/.*"\([^"]*\)".*/\1/p')
66+
VERSION=$(grep '^__version__' src/uipath/llm_client/__version__.py | sed -n 's/.*"\([^"]*\)".*/\1/p')
6767
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
6868
6969
- name: Extract changelog section

.github/workflows/ci_change_version.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,17 @@ jobs:
2222
2323
- name: Validate version update
2424
run: |
25-
core_changes=$(grep -E '^src/uipath_llm_client/' changes.txt | grep -v '__version__.py' || true)
26-
core_version=$(grep -E '^src/uipath_llm_client/__version__.py' changes.txt || true)
25+
core_changes=$(grep -E '^src/uipath/llm_client/' changes.txt | grep -v '__version__.py' || true)
26+
core_version=$(grep -E '^src/uipath/llm_client/__version__.py' changes.txt || true)
2727
if [ -n "$core_changes" ] && [ -z "$core_version" ]; then
28-
echo "::error::uipath-llm-client: package changes detected but no version update in src/uipath_llm_client/__version__.py"
28+
echo "::error::uipath-llm-client: package changes detected but no version update in src/uipath/llm_client/__version__.py"
2929
exit 1
3030
fi
3131
echo "✓ Version is consistent with changes."
3232
3333
- name: Validate changelog update
3434
run: |
35-
core_version=$(grep -E '^src/uipath_llm_client/__version__.py' changes.txt || true)
35+
core_version=$(grep -E '^src/uipath/llm_client/__version__.py' changes.txt || true)
3636
core_changelog=$(grep -E '^CHANGELOG.md' changes.txt || true)
3737
if [ -n "$core_version" ] && [ -z "$core_changelog" ]; then
3838
echo "::error::uipath-llm-client: version changed but no changelog update in CHANGELOG.md"

.github/workflows/publish-dev.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
cat changes.txt
2626
2727
# Check if core package changed
28-
if grep -qE '^src/uipath_llm_client/' changes.txt; then
28+
if grep -qE '^src/uipath/llm_client/' changes.txt; then
2929
echo "core=true" >> $GITHUB_OUTPUT
3030
echo "Core package has changes"
3131
else
@@ -90,13 +90,13 @@ jobs:
9090
# Process core package if changed
9191
if [ "$CORE_CHANGED" == "true" ]; then
9292
# Read current version from __version__.py
93-
CORE_VERSION=$(grep -oP '__version__\s*=\s*"\K[^"]+' src/uipath_llm_client/__version__.py)
93+
CORE_VERSION=$(grep -oP '__version__\s*=\s*"\K[^"]+' src/uipath/llm_client/__version__.py)
9494
DEV_VERSION="${CORE_VERSION}.dev1${PADDED_PR}${PADDED_RUN}"
9595
MIN_VERSION="${CORE_VERSION}.dev1${PADDED_PR}0000"
9696
MAX_VERSION="${CORE_VERSION}.dev1${PADDED_NEXT_PR}0000"
9797
9898
# Update __version__.py
99-
sed -i "s/__version__ = \".*\"/__version__ = \"${DEV_VERSION}\"/" src/uipath_llm_client/__version__.py
99+
sed -i "s/__version__ = \".*\"/__version__ = \"${DEV_VERSION}\"/" src/uipath/llm_client/__version__.py
100100
echo "Core package version set to $DEV_VERSION"
101101
102102
DEPENDENCIES_EXACT="${DEPENDENCIES_EXACT} \"uipath-llm-client==${DEV_VERSION}\",\n"

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
All notable changes to `uipath_llm_client` (core package) will be documented in this file.
44

5+
## [1.2.4] - 2026-02-26
6+
7+
### Refactor
8+
- Restructured project such that uipath_llm_client can be included in uipath as submodule.
9+
- imports are now from uipath.llm_client instead of uipath_llm_client
10+
511
## [1.2.3] - 2026-02-25
612

713
### Feature

README.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ export LLMGW_SEMANTIC_USER_ID="your-user-id"
123123
Configuration settings for UiPath AgentHub client requests. These settings control routing, authentication, and tracking for requests to AgentHub.
124124

125125
```python
126-
from uipath_llm_client.settings import AgentHubSettings
126+
from uipath.llm_client.settings import AgentHubSettings
127127

128128
settings = AgentHubSettings(
129129
environment="cloud", # UiPath environment
@@ -158,7 +158,7 @@ settings = AgentHubSettings(
158158
Configuration settings for LLM Gateway client requests. These settings control routing, authentication, and tracking for requests to LLM Gateway.
159159

160160
```python
161-
from uipath_llm_client.settings import LLMGatewaySettings
161+
from uipath.llm_client.settings import LLMGatewaySettings
162162

163163
settings = LLMGatewaySettings(
164164
base_url="https://your-llmgw-url.com",
@@ -240,7 +240,7 @@ Factory functions automatically detect the model vendor but require settings to
240240

241241
```python
242242
from uipath_langchain_client import get_chat_model, get_embedding_model
243-
from uipath_llm_client.settings import get_default_client_settings
243+
from uipath.llm_client.settings import get_default_client_settings
244244

245245
settings = get_default_client_settings()
246246

@@ -260,7 +260,7 @@ The normalized API provides a consistent interface across all LLM providers:
260260

261261
```python
262262
from uipath_langchain_client import get_chat_model
263-
from uipath_llm_client.settings import get_default_client_settings
263+
from uipath.llm_client.settings import get_default_client_settings
264264

265265
settings = get_default_client_settings()
266266

@@ -368,7 +368,7 @@ print(result["messages"][-1].content)
368368
The core `uipath_llm_client` package provides thin wrappers around native vendor SDKs. These are drop-in replacements that route requests through UiPath's infrastructure while preserving the original SDK's interface:
369369

370370
```python
371-
from uipath_llm_client.clients.openai import UiPathOpenAI, UiPathAzureOpenAI
371+
from uipath.llm_client.clients.openai import UiPathOpenAI, UiPathAzureOpenAI
372372

373373
# Drop-in replacement for openai.OpenAI — routes through UiPath
374374
client = UiPathOpenAI(model_name="gpt-4o-2024-11-20")
@@ -383,7 +383,7 @@ azure_client = UiPathAzureOpenAI(model_name="gpt-4o-2024-11-20")
383383
```
384384

385385
```python
386-
from uipath_llm_client.clients.anthropic import UiPathAnthropic
386+
from uipath.llm_client.clients.anthropic import UiPathAnthropic
387387

388388
# Drop-in replacement for anthropic.Anthropic
389389
client = UiPathAnthropic(model_name="anthropic.claude-sonnet-4-5-20250929-v1:0")
@@ -396,7 +396,7 @@ print(response.content[0].text)
396396
```
397397

398398
```python
399-
from uipath_llm_client.clients.google import UiPathGoogle
399+
from uipath.llm_client.clients.google import UiPathGoogle
400400

401401
# Drop-in replacement for google.genai.Client
402402
client = UiPathGoogle(model_name="gemini-2.5-flash")
@@ -424,8 +424,8 @@ All native SDK wrappers are available in sync and async variants:
424424
For completely custom HTTP requests, use the low-level HTTPX client directly:
425425

426426
```python
427-
from uipath_llm_client import UiPathHttpxClient
428-
from uipath_llm_client.settings import UiPathAPIConfig, get_default_client_settings
427+
from uipath.llm_client import UiPathHttpxClient
428+
from uipath.llm_client.settings import UiPathAPIConfig, get_default_client_settings
429429

430430
settings = get_default_client_settings()
431431

@@ -463,8 +463,8 @@ Pass custom settings when you need more control:
463463

464464
```python
465465
from uipath_langchain_client.clients.openai.chat_models import UiPathAzureChatOpenAI
466-
from uipath_llm_client.settings import AgentHubSettings
467-
from uipath_llm_client.utils.retry import RetryConfig
466+
from uipath.llm_client.settings import AgentHubSettings
467+
from uipath.llm_client.utils.retry import RetryConfig
468468

469469
# Custom settings for AgentHub
470470
settings = AgentHubSettings(environment="cloud") # or "staging", "alpha"
@@ -489,7 +489,7 @@ chat_model = UiPathAzureChatOpenAI(
489489

490490
```python
491491
from uipath_langchain_client.clients.openai.chat_models import UiPathAzureChatOpenAI
492-
from uipath_llm_client.settings import get_default_client_settings
492+
from uipath.llm_client.settings import get_default_client_settings
493493

494494
# Explicitly specify the backend
495495
agenthub_settings = get_default_client_settings(backend="agenthub")
@@ -511,7 +511,7 @@ You can instantiate `LLMGatewaySettings` directly for full control over configur
511511
from uipath_langchain_client.clients.openai.chat_models import UiPathAzureChatOpenAI
512512
from uipath_langchain_client.clients.google.chat_models import UiPathChatGoogleGenerativeAI
513513
from uipath_langchain_client.clients.openai.embeddings import UiPathAzureOpenAIEmbeddings
514-
from uipath_llm_client.settings import LLMGatewaySettings
514+
from uipath.llm_client.settings import LLMGatewaySettings
515515

516516
# Create LLMGatewaySettings with explicit configuration
517517
settings = LLMGatewaySettings(
@@ -553,7 +553,7 @@ vectors = embeddings.embed_documents(["Hello world"])
553553

554554
```python
555555
from uipath_langchain_client import get_chat_model, get_embedding_model
556-
from uipath_llm_client.settings import LLMGatewaySettings
556+
from uipath.llm_client.settings import LLMGatewaySettings
557557

558558
# Create LLMGatewaySettings
559559
settings = LLMGatewaySettings(
@@ -632,7 +632,7 @@ byo_embeddings = UiPathAzureOpenAIEmbeddings(
632632
The client provides a hierarchy of typed exceptions for handling API errors. All exceptions extend `UiPathAPIError` (which extends `httpx.HTTPStatusError`):
633633

634634
```python
635-
from uipath_llm_client import (
635+
from uipath.llm_client import (
636636
UiPathAPIError,
637637
UiPathAuthenticationError,
638638
UiPathRateLimitError,
@@ -675,7 +675,7 @@ except UiPathAPIError as e:
675675
The `UiPathAPIConfig` class controls how requests are routed through UiPath's infrastructure:
676676

677677
```python
678-
from uipath_llm_client.settings import UiPathAPIConfig
678+
from uipath.llm_client.settings import UiPathAPIConfig
679679

680680
config = UiPathAPIConfig(
681681
api_type="completions",
@@ -802,7 +802,7 @@ When adding new tests or modifying existing ones that require new API interactio
802802

803803
```
804804
uipath-llm-client/
805-
├── src/uipath_llm_client/ # Core package
805+
├── src/uipath/llm_client/ # Core package
806806
│ ├── httpx_client.py # UiPathHttpxClient / UiPathHttpxAsyncClient
807807
│ ├── clients/ # Native SDK wrappers
808808
│ │ ├── openai/ # UiPathOpenAI, UiPathAzureOpenAI, etc.

packages/uipath_langchain_client/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
All notable changes to `uipath_langchain_client` will be documented in this file.
44

5+
## [1.2.6] - 2026-02-26
6+
7+
### Refactor
8+
- Restructured project such that uipath_llm_client can be included in uipath as submodule.
9+
- imports are now from uipath.llm_client instead of uipath_llm_client
10+
511
## [1.2.5] - 2026-02-26
612

713
### Fix

packages/uipath_langchain_client/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,4 +327,4 @@ The `stream_type` parameter controls iteration: `"lines"` (default, best for SSE
327327
## See Also
328328

329329
- [Main README](../../README.md) - Overview and core client documentation
330-
- [UiPath LLM Client](../../src/uipath_llm_client/) - Low-level HTTP client
330+
- [UiPath LLM Client](../../src/uipath/llm_client//) - Low-level HTTP client

packages/uipath_langchain_client/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ readme = "README.md"
66
requires-python = ">=3.11"
77
dependencies = [
88
"langchain>=1.2.7",
9-
"uipath-llm-client>=1.2.3",
9+
"uipath-llm-client>=1.2.4",
1010
]
1111

1212
[project.optional-dependencies]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
__title__ = "UiPath LangChain Client"
22
__description__ = "A Python client for interacting with UiPath's LLM services via LangChain."
3-
__version__ = "1.2.5"
3+
__version__ = "1.2.6"

0 commit comments

Comments
 (0)