Skip to content

Commit 14dec42

Browse files
committed
UiPath LLM Client and Langchain Client 1.0.0 release
0 parents  commit 14dec42

1,298 files changed

Lines changed: 16913 additions & 0 deletions

File tree

Some content is hidden

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

.env.example

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# =============================================================================
2+
# UiPath LLM Client Configuration
3+
# =============================================================================
4+
# Copy this file to .env and fill in your values.
5+
# The client supports two backends: AgentHub (default) and LLMGateway.
6+
7+
# -----------------------------------------------------------------------------
8+
# Backend Selection
9+
# -----------------------------------------------------------------------------
10+
# Choose which backend to use: "agenthub" (default) or "llmgateway"
11+
UIPATH_LLM_BACKEND="agenthub"
12+
13+
# =============================================================================
14+
# AGENTHUB BACKEND SETTINGS
15+
# =============================================================================
16+
# AgentHub uses the UiPath CLI for authentication by default.
17+
# Run `uv run uipath auth login` to authenticate interactively.
18+
# Alternatively, set the environment variables below.
19+
20+
# Environment selection: "cloud", "staging", or "alpha" (default: None)
21+
UIPATH_ENVIRONMENT=""
22+
23+
# Core settings (populated automatically by CLI auth, or set manually)
24+
UIPATH_URL=""
25+
UIPATH_ORGANIZATION_ID=""
26+
UIPATH_TENANT_ID=""
27+
28+
# Access token (short-lived, populated by CLI auth)
29+
# If not using CLI auth, provide this directly or use S2S credentials below
30+
UIPATH_ACCESS_TOKEN=""
31+
32+
# S2S Authentication for AgentHub (alternative to CLI/access token)
33+
UIPATH_CLIENT_ID=""
34+
UIPATH_CLIENT_SECRET=""
35+
UIPATH_CLIENT_SCOPE="" # Optional: custom OAuth scope
36+
37+
# =============================================================================
38+
# LLMGATEWAY BACKEND SETTINGS
39+
# =============================================================================
40+
# To use LLMGateway, set UIPATH_LLM_BACKEND="llmgateway" above.
41+
42+
# Required settings
43+
LLMGW_URL=""
44+
LLMGW_SEMANTIC_ORG_ID=""
45+
LLMGW_SEMANTIC_TENANT_ID=""
46+
LLMGW_REQUESTING_PRODUCT=""
47+
LLMGW_REQUESTING_FEATURE=""
48+
49+
# Authentication (choose one method)
50+
# Option 1: Access token (short-lived)
51+
LLMGW_ACCESS_TOKEN=""
52+
53+
# Option 2: S2S Authentication (recommended for production)
54+
LLMGW_CLIENT_ID=""
55+
LLMGW_CLIENT_SECRET=""
56+
57+
# Optional tracking and tracing
58+
LLMGW_SEMANTIC_USER_ID=""
59+
LLMGW_ACTION_ID=""
60+
LLMGW_ADDITIONAL_HEADERS=""

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
tests/cassettes/** filter=lfs diff=lfs merge=lfs -text

.github/workflows/cd-langchain.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Publish uipath-langchain-client to PyPI
2+
3+
on:
4+
push:
5+
tags:
6+
# Publish on any tag starting with `langchain-v`, e.g., langchain-v1.0.0
7+
- langchain-v*
8+
workflow_dispatch:
9+
10+
jobs:
11+
build:
12+
name: Build package
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v6
16+
17+
- name: Setup uv
18+
uses: astral-sh/setup-uv@v7
19+
with:
20+
version: "0.9.27"
21+
enable-cache: true
22+
23+
- name: "Set up Python"
24+
uses: actions/setup-python@v6
25+
with:
26+
python-version-file: ".python-version"
27+
28+
- name: "Install dependencies"
29+
run: uv sync --dev --all-extras --locked
30+
31+
- name: Build package
32+
run: uv build --package uipath-langchain-client
33+
34+
- name: Smoke test (wheel)
35+
run: uv run --isolated --no-project --with dist/*.whl tests/langchain/langchain_smoke_test.py
36+
37+
- name: Smoke test (source distribution)
38+
run: uv run --isolated --no-project --with dist/*.tar.gz tests/langchain/langchain_smoke_test.py
39+
40+
- name: Publish package
41+
run: uv publish
42+

.github/workflows/cd.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Publish uipath-llm-client to PyPI
2+
3+
on:
4+
push:
5+
tags:
6+
# Publish on any tag starting with a `v`, e.g., v1.0.0
7+
- v*
8+
workflow_dispatch:
9+
10+
jobs:
11+
build:
12+
name: Build package
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v6
16+
17+
- name: Setup uv
18+
uses: astral-sh/setup-uv@v7
19+
with:
20+
version: "0.9.27"
21+
enable-cache: true
22+
23+
- name: "Set up Python"
24+
uses: actions/setup-python@v6
25+
with:
26+
python-version-file: ".python-version"
27+
28+
- name: "Install dependencies"
29+
run: uv sync --dev --all-extras --locked
30+
31+
- name: Build package
32+
run: uv build --package uipath-llm-client
33+
34+
- name: Smoke test (wheel)
35+
run: uv run --isolated --no-project --with dist/*.whl tests/core/core_smoke_test.py
36+
37+
- name: Smoke test (source distribution)
38+
run: uv run --isolated --no-project --with dist/*.tar.gz tests/core/core_smoke_test.py
39+
40+
- name: Publish package
41+
run: uv publish
42+
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: Validate Version and Changelog
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
validate-version:
10+
name: Validate version updates
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v6
14+
with:
15+
fetch-depth: 0
16+
17+
- name: Get changed files
18+
id: changes
19+
run: |
20+
git diff origin/main...HEAD --name-only > changes.txt
21+
echo "Changed files:"
22+
cat changes.txt
23+
24+
- name: Validate version updates for changed packages
25+
run: |
26+
VALIDATION_FAILED=0
27+
28+
# Core package: src/uipath_llm_client/ -> src/uipath_llm_client/__version__.py
29+
core_changes=$(grep -E '^src/uipath_llm_client/' changes.txt | grep -v '__version__.py' || true)
30+
core_version=$(grep -E '^src/uipath_llm_client/__version__.py' changes.txt || true)
31+
if [ -n "$core_changes" ] && [ -z "$core_version" ]; then
32+
echo "::error::Core package (src/uipath_llm_client/) changes detected but no version update in src/uipath_llm_client/__version__.py"
33+
VALIDATION_FAILED=1
34+
fi
35+
36+
# Langchain package: packages/uipath_langchain_client/ -> packages/uipath_langchain_client/src/uipath_langchain_client/__version__.py
37+
langchain_changes=$(grep -E '^packages/uipath_langchain_client/' changes.txt | grep -v '__version__.py' || true)
38+
langchain_version=$(grep -E '^packages/uipath_langchain_client/src/uipath_langchain_client/__version__.py' changes.txt || true)
39+
if [ -n "$langchain_changes" ] && [ -z "$langchain_version" ]; then
40+
echo "::error::Langchain package (packages/uipath_langchain_client/) changes detected but no version update in packages/uipath_langchain_client/src/uipath_langchain_client/__version__.py"
41+
VALIDATION_FAILED=1
42+
fi
43+
44+
# LlamaIndex package: packages/uipath_llamaindex_client/ -> packages/uipath_llamaindex_client/src/uipath_llamaindex_client/__version__.py
45+
llamaindex_changes=$(grep -E '^packages/uipath_llamaindex_client/' changes.txt | grep -v '__version__.py' || true)
46+
llamaindex_version=$(grep -E '^packages/uipath_llamaindex_client/src/uipath_llamaindex_client/__version__.py' changes.txt || true)
47+
if [ -n "$llamaindex_changes" ] && [ -z "$llamaindex_version" ]; then
48+
echo "::error::LlamaIndex package (packages/uipath_llamaindex_client/) changes detected but no version update in packages/uipath_llamaindex_client/src/uipath_llamaindex_client/__version__.py"
49+
VALIDATION_FAILED=1
50+
fi
51+
52+
if [ $VALIDATION_FAILED -eq 1 ]; then
53+
exit 1
54+
fi
55+
echo "✓ All package versions are consistent with changes."
56+
57+
- name: Validate changelog updates for version changes
58+
run: |
59+
VALIDATION_FAILED=0
60+
61+
# Core package: src/uipath_llm_client/__version__.py -> CHANGELOG.md (root)
62+
core_version=$(grep -E '^src/uipath_llm_client/__version__.py' changes.txt || true)
63+
core_changelog=$(grep -E '^CHANGELOG.md' changes.txt || true)
64+
if [ -n "$core_version" ] && [ -z "$core_changelog" ]; then
65+
echo "::error::Core package version changed but no changelog update in CHANGELOG.md"
66+
VALIDATION_FAILED=1
67+
fi
68+
69+
# Langchain package: packages/uipath_langchain_client/src/uipath_langchain_client/__version__.py -> packages/uipath_langchain_client/CHANGELOG.md
70+
langchain_version=$(grep -E '^packages/uipath_langchain_client/src/uipath_langchain_client/__version__.py' changes.txt || true)
71+
langchain_changelog=$(grep -E '^packages/uipath_langchain_client/CHANGELOG.md' changes.txt || true)
72+
if [ -n "$langchain_version" ] && [ -z "$langchain_changelog" ]; then
73+
echo "::error::Langchain package version changed but no changelog update in packages/uipath_langchain_client/CHANGELOG.md"
74+
VALIDATION_FAILED=1
75+
fi
76+
77+
# LlamaIndex package: packages/uipath_llamaindex_client/src/uipath_llamaindex_client/__version__.py -> packages/uipath_llamaindex_client/CHANGELOG.md
78+
llamaindex_version=$(grep -E '^packages/uipath_llamaindex_client/src/uipath_llamaindex_client/__version__.py' changes.txt || true)
79+
llamaindex_changelog=$(grep -E '^packages/uipath_llamaindex_client/CHANGELOG.md' changes.txt || true)
80+
if [ -n "$llamaindex_version" ] && [ -z "$llamaindex_changelog" ]; then
81+
echo "::error::LlamaIndex package version changed but no changelog update in packages/uipath_llamaindex_client/CHANGELOG.md"
82+
VALIDATION_FAILED=1
83+
fi
84+
85+
if [ $VALIDATION_FAILED -eq 1 ]; then
86+
exit 1
87+
fi
88+
echo "✓ All changelogs are consistent with version changes."

.github/workflows/ci_run_tests.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Run Tests
2+
3+
on:
4+
workflow_run:
5+
workflows: ["Type Check & Lint"]
6+
types:
7+
- completed
8+
9+
jobs:
10+
test:
11+
name: Test
12+
runs-on: ubuntu-latest
13+
# Only run if the type check workflow succeeded
14+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
15+
steps:
16+
- uses: actions/checkout@v6
17+
18+
- name: Install uv
19+
uses: astral-sh/setup-uv@v7
20+
with:
21+
version: "0.9.27"
22+
enable-cache: true
23+
24+
- name: Set up Python
25+
uses: actions/setup-python@v6
26+
with:
27+
python-version-file: ".python-version"
28+
29+
- name: Install dependencies
30+
run: uv sync --dev --all-extras
31+
32+
- name: Run tests
33+
run: uv run pytest tests
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Type Check & Lint
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
lint-and-typecheck:
10+
name: Lint & Type Check
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v6
14+
15+
- name: Install uv
16+
uses: astral-sh/setup-uv@v7
17+
with:
18+
version: "0.9.27"
19+
enable-cache: true
20+
21+
- name: Set up Python
22+
uses: actions/setup-python@v6
23+
with:
24+
python-version-file: ".python-version"
25+
26+
- name: Install dependencies
27+
run: uv sync --dev --all-extras
28+
29+
- name: Ruff check
30+
run: |
31+
uv run ruff check || exit 1
32+
uv run ruff format --check || exit 1
33+
34+
- name: Pyright
35+
run: uv run pyright .

0 commit comments

Comments
 (0)