From f54d5cf72bd84ceaf6466d2fae3c69678afa1bcb Mon Sep 17 00:00:00 2001 From: jsonbailey Date: Tue, 10 Mar 2026 15:46:43 -0500 Subject: [PATCH 1/4] chore: Migrate from Poetry to uv workspace --- .gitignore | 5 +- CONTRIBUTING.md | 32 +++++++- Makefile | 6 +- .../ai-providers/server-ai-langchain/Makefile | 12 +-- .../server-ai-langchain/pyproject.toml | 52 ++++++------ .../ai-providers/server-ai-openai/Makefile | 13 ++- .../server-ai-openai/pyproject.toml | 51 ++++++------ packages/sdk/server-ai/Makefile | 16 ++-- packages/sdk/server-ai/pyproject.toml | 80 ++++++++++--------- pyproject.toml | 35 ++++---- 10 files changed, 166 insertions(+), 136 deletions(-) diff --git a/.gitignore b/.gitignore index 7b091b3..867bb36 100644 --- a/.gitignore +++ b/.gitignore @@ -72,5 +72,6 @@ test-packaging-venv .vscode/ .python-version -# Poetry -poetry.lock +# uv — lock file is not committed for libraries (only for applications) +uv.lock +.venv/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3d6d69e..a0ae783 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -14,13 +14,29 @@ We encourage pull requests and other contributions from the community. Before su ### Setup -This project is built using [poetry](https://python-poetry.org/). To learn more about the basics of working with this tool, read [Poetry's basic usage guide](https://python-poetry.org/docs/basic-usage/). +This project is built using [uv](https://docs.astral.sh/uv/). The repo is structured as a uv workspace — a single shared virtual environment at the repo root contains all packages and their dependencies, and cross-package dependencies (e.g. the provider packages depending on `launchdarkly-server-sdk-ai`) are automatically resolved from the local workspace members. -To begin development, ensure your dependencies are installed and (optionally) activate the virtualenv. +To install uv, see the [uv installation guide](https://docs.astral.sh/uv/getting-started/installation/). +To install all packages and dev dependencies into the shared workspace environment: + +```shell +make install +# or directly: +uv sync --all-groups ``` -poetry install -eval $(poetry env activate) + +To activate the shared virtual environment: + +```shell +source .venv/bin/activate +``` + +Alternatively, prefix any command with `uv run` to use the workspace environment without activating it: + +```shell +uv run pytest +uv run mypy src/ldai ``` ### Testing @@ -31,6 +47,14 @@ To run all unit tests: make test ``` +To run tests for a specific package: + +```shell +make test-server-ai +make test-openai +make test-langchain +``` + It is preferable to run tests against all supported minor versions of Python (as described in `README.md` under Requirements), or at least the lowest and highest versions, prior to submitting a pull request. However, LaunchDarkly's CI tests will run automatically against all supported versions. ### Building documentation diff --git a/Makefile b/Makefile index 34ddfeb..0d3e79f 100644 --- a/Makefile +++ b/Makefile @@ -23,10 +23,8 @@ help: #! Show this help message # .PHONY: install -install: #! Install all packages - $(MAKE) install-server-ai - $(MAKE) install-langchain - $(MAKE) install-openai +install: #! Install all packages and dev dependencies into the shared workspace environment + uv sync --all-groups .PHONY: install-server-ai install-server-ai: #! Install server-ai package diff --git a/packages/ai-providers/server-ai-langchain/Makefile b/packages/ai-providers/server-ai-langchain/Makefile index ca02807..efc820f 100644 --- a/packages/ai-providers/server-ai-langchain/Makefile +++ b/packages/ai-providers/server-ai-langchain/Makefile @@ -9,21 +9,21 @@ help: #! Show this help message .PHONY: install install: #! Install package dependencies - poetry install + uv sync --group dev .PHONY: test test: #! Run unit tests test: install - poetry run pytest $(PYTEST_FLAGS) + uv run pytest $(PYTEST_FLAGS) .PHONY: lint lint: #! Run type analysis and linting checks lint: install - poetry run mypy src/ldai_langchain - poetry run isort --check --atomic src/ldai_langchain - poetry run pycodestyle src/ldai_langchain + uv run mypy src/ldai_langchain + uv run isort --check --atomic src/ldai_langchain + uv run pycodestyle src/ldai_langchain .PHONY: build build: #! Build distribution files build: install - poetry build + uv build diff --git a/packages/ai-providers/server-ai-langchain/pyproject.toml b/packages/ai-providers/server-ai-langchain/pyproject.toml index 8c6bc0e..d07b53b 100644 --- a/packages/ai-providers/server-ai-langchain/pyproject.toml +++ b/packages/ai-providers/server-ai-langchain/pyproject.toml @@ -1,12 +1,11 @@ -[tool.poetry] +[project] name = "launchdarkly-server-sdk-ai-langchain" version = "0.3.1" description = "LaunchDarkly AI SDK LangChain Provider" -authors = ["LaunchDarkly "] -license = "Apache-2.0" +authors = [{name = "LaunchDarkly", email = "dev@launchdarkly.com"}] +license = {text = "Apache-2.0"} readme = "README.md" -homepage = "https://docs.launchdarkly.com/sdk/ai/python" -repository = "https://github.com/launchdarkly/python-server-sdk-ai" +requires-python = ">=3.9,<4" classifiers = [ "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", @@ -20,21 +19,32 @@ classifiers = [ "Topic :: Software Development", "Topic :: Software Development :: Libraries", ] -packages = [{ include = "ldai_langchain", from = "src" }] +dependencies = [ + "launchdarkly-server-sdk-ai>=0.16.0", + "langchain-core>=0.2.0", + "langchain>=0.2.0", +] + +[project.urls] +Homepage = "https://docs.launchdarkly.com/sdk/ai/python" +Repository = "https://github.com/launchdarkly/python-server-sdk-ai" + +[dependency-groups] +dev = [ + "pytest>=2.8", + "pytest-cov>=2.4.0", + "pytest-asyncio>=0.21.0", + "mypy==1.18.2", + "pycodestyle>=2.11.0", + "isort>=5.12.0", +] -[tool.poetry.dependencies] -python = ">=3.9,<4" -launchdarkly-server-sdk-ai = ">=0.16.0" -langchain-core = ">=0.2.0" -langchain = ">=0.2.0" +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" -[tool.poetry.group.dev.dependencies] -pytest = ">=2.8" -pytest-cov = ">=2.4.0" -pytest-asyncio = ">=0.21.0" -mypy = "==1.18.2" -pycodestyle = ">=2.11.0" -isort = ">=5.12.0" +[tool.hatch.build.targets.wheel] +packages = ["src/ldai_langchain"] [tool.mypy] python_version = "3.9" @@ -47,13 +57,7 @@ profile = "black" known_third_party = ["langchain", "langchain_core", "ldai"] sections = ["FUTURE", "STDLIB", "THIRDPARTY", "FIRSTPARTY", "LOCALFOLDER"] - [tool.pytest.ini_options] addopts = ["-ra"] testpaths = ["tests"] asyncio_mode = "auto" - - -[build-system] -requires = ["poetry-core"] -build-backend = "poetry.core.masonry.api" diff --git a/packages/ai-providers/server-ai-openai/Makefile b/packages/ai-providers/server-ai-openai/Makefile index b14dfd9..5dbc500 100644 --- a/packages/ai-providers/server-ai-openai/Makefile +++ b/packages/ai-providers/server-ai-openai/Makefile @@ -9,22 +9,21 @@ help: #! Show this help message .PHONY: install install: #! Install package dependencies - poetry install + uv sync --group dev .PHONY: test test: #! Run unit tests test: install - poetry run pytest $(PYTEST_FLAGS) + uv run pytest $(PYTEST_FLAGS) .PHONY: lint lint: #! Run type analysis and linting checks lint: install - poetry run mypy src/ldai_openai - poetry run isort --check --atomic src/ldai_openai - poetry run pycodestyle src/ldai_openai + uv run mypy src/ldai_openai + uv run isort --check --atomic src/ldai_openai + uv run pycodestyle src/ldai_openai .PHONY: build build: #! Build distribution files build: install - poetry build - + uv build diff --git a/packages/ai-providers/server-ai-openai/pyproject.toml b/packages/ai-providers/server-ai-openai/pyproject.toml index 6307fa5..c32d5f3 100644 --- a/packages/ai-providers/server-ai-openai/pyproject.toml +++ b/packages/ai-providers/server-ai-openai/pyproject.toml @@ -1,12 +1,11 @@ -[tool.poetry] +[project] name = "launchdarkly-server-sdk-ai-openai" version = "0.2.0" description = "LaunchDarkly AI SDK OpenAI Provider" -authors = ["LaunchDarkly "] -license = "Apache-2.0" +authors = [{name = "LaunchDarkly", email = "dev@launchdarkly.com"}] +license = {text = "Apache-2.0"} readme = "README.md" -homepage = "https://docs.launchdarkly.com/sdk/ai/python" -repository = "https://github.com/launchdarkly/python-server-sdk-ai" +requires-python = ">=3.9,<4" classifiers = [ "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", @@ -20,20 +19,31 @@ classifiers = [ "Topic :: Software Development", "Topic :: Software Development :: Libraries", ] -packages = [{ include = "ldai_openai", from = "src" }] +dependencies = [ + "launchdarkly-server-sdk-ai>=0.16.0", + "openai>=1.0.0", +] -[tool.poetry.dependencies] -python = ">=3.9,<4" -launchdarkly-server-sdk-ai = ">=0.16.0" -openai = ">=1.0.0" +[project.urls] +Homepage = "https://docs.launchdarkly.com/sdk/ai/python" +Repository = "https://github.com/launchdarkly/python-server-sdk-ai" + +[dependency-groups] +dev = [ + "pytest>=2.8", + "pytest-cov>=2.4.0", + "pytest-asyncio>=0.21.0,<1.0.0", + "mypy==1.18.2", + "pycodestyle>=2.11.0", + "isort>=5.12.0", +] -[tool.poetry.group.dev.dependencies] -pytest = ">=2.8" -pytest-cov = ">=2.4.0" -pytest-asyncio = ">=0.21.0,<1.0.0" -mypy = "==1.18.2" -pycodestyle = ">=2.11.0" -isort = ">=5.12.0" +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[tool.hatch.build.targets.wheel] +packages = ["src/ldai_openai"] [tool.mypy] python_version = "3.9" @@ -46,14 +56,7 @@ profile = "black" known_third_party = ["openai", "ldai"] sections = ["FUTURE", "STDLIB", "THIRDPARTY", "FIRSTPARTY", "LOCALFOLDER"] - [tool.pytest.ini_options] addopts = ["-ra"] testpaths = ["tests"] asyncio_mode = "auto" - - -[build-system] -requires = ["poetry-core"] -build-backend = "poetry.core.masonry.api" - diff --git a/packages/sdk/server-ai/Makefile b/packages/sdk/server-ai/Makefile index 95f037c..281210e 100644 --- a/packages/sdk/server-ai/Makefile +++ b/packages/sdk/server-ai/Makefile @@ -15,26 +15,26 @@ help: #! Show this help message .PHONY: install install: #! Install package dependencies - poetry install + uv sync --group dev .PHONY: test test: #! Run unit tests test: install - poetry run pytest $(PYTEST_FLAGS) + uv run pytest $(PYTEST_FLAGS) .PHONY: lint lint: #! Run type analysis and linting checks lint: install - poetry run mypy src/ldai - poetry run isort --check --atomic src/ldai - poetry run pycodestyle src/ldai + uv run mypy src/ldai + uv run isort --check --atomic src/ldai + uv run pycodestyle src/ldai .PHONY: build build: #! Build distribution files build: install - poetry build + uv build .PHONY: docs docs: #! Generate sphinx-based documentation - poetry install --with docs - poetry run $(SPHINXBUILD) -M html "$(DOCS_DIR)" "$(DOCS_BUILD_DIR)" $(SPHINXOPTS) + uv sync --group docs + uv run $(SPHINXBUILD) -M html "$(DOCS_DIR)" "$(DOCS_BUILD_DIR)" $(SPHINXOPTS) diff --git a/packages/sdk/server-ai/pyproject.toml b/packages/sdk/server-ai/pyproject.toml index 18f3f7f..106532e 100644 --- a/packages/sdk/server-ai/pyproject.toml +++ b/packages/sdk/server-ai/pyproject.toml @@ -1,13 +1,11 @@ -[tool.poetry] +[project] name = "launchdarkly-server-sdk-ai" -version = "0.16.0" +version = "0.16.0" # x-release-please-version description = "LaunchDarkly SDK for AI" -authors = ["LaunchDarkly "] -license = "Apache-2.0" +authors = [{name = "LaunchDarkly", email = "dev@launchdarkly.com"}] +license = {text = "Apache-2.0"} readme = "README.md" -homepage = "https://docs.launchdarkly.com/sdk/ai/python" -repository = "https://github.com/launchdarkly/python-server-sdk-ai" -documentation = "https://launchdarkly-python-sdk-ai.readthedocs.io/en/latest/" +requires-python = ">=3.9,<4" classifiers = [ "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", @@ -21,37 +19,44 @@ classifiers = [ "Topic :: Software Development", "Topic :: Software Development :: Libraries", ] -packages = [{ include = "ldai", from = "src" }] - -[tool.poetry.dependencies] -python = ">=3.9,<4" -launchdarkly-server-sdk = ">=9.4.0" -chevron = "=0.14.0" - +dependencies = [ + "launchdarkly-server-sdk>=9.4.0", + "chevron==0.14.0", +] -[tool.poetry.group.dev.dependencies] -pytest = ">=2.8" -pytest-cov = ">=2.4.0" -pytest-mypy = "==1.0.1" -pytest-asyncio = ">=0.21.0" -mypy = "==1.18.2" -pycodestyle = "^2.12.1" -isort = ">=5.13.2,<7.0.0" +[project.urls] +Homepage = "https://docs.launchdarkly.com/sdk/ai/python" +Repository = "https://github.com/launchdarkly/python-server-sdk-ai" +Documentation = "https://launchdarkly-python-sdk-ai.readthedocs.io/en/latest/" +[dependency-groups] +dev = [ + "pytest>=2.8", + "pytest-cov>=2.4.0", + "pytest-mypy==1.0.1", + "pytest-asyncio>=0.21.0", + "mypy==1.18.2", + "pycodestyle>=2.12.1,<3.0.0", + "isort>=5.13.2,<7.0.0", +] +docs = [ + "sphinx>=6,<8", + "sphinx-rtd-theme>=1.3,<4.0", + "certifi>=2018.4.16", + "expiringdict>=1.1.4", + "pyrfc3339>=1.0", + "jsonpickle>1.4.1", + "semver>=2.7.9", + "urllib3>=1.26.0", + "jinja2==3.1.6", +] -[tool.poetry.group.docs] -optional = true +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" -[tool.poetry.group.docs.dependencies] -sphinx = ">=6,<8" -sphinx-rtd-theme = ">=1.3,<4.0" -certifi = ">=2018.4.16" -expiringdict = ">=1.1.4" -pyrfc3339 = ">=1.0" -jsonpickle = ">1.4.1" -semver = ">=2.7.9" -urllib3 = ">=1.26.0" -jinja2 = "3.1.6" +[tool.hatch.build.targets.wheel] +packages = ["src/ldai"] [tool.mypy] python_version = "3.9" @@ -59,12 +64,9 @@ ignore_missing_imports = true install_types = true non_interactive = true - [tool.pytest.ini_options] addopts = ["-ra"] testpaths = ["tests"] - -[build-system] -requires = ["poetry-core"] -build-backend = "poetry.core.masonry.api" +[tool.isort] +profile = "black" diff --git a/pyproject.toml b/pyproject.toml index a38cffc..2f7ace5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,23 +1,22 @@ # Root pyproject.toml for the LaunchDarkly Python AI SDK monorepo # -# This monorepo contains: -# - packages/sdk/server-ai: The main LaunchDarkly Server-Side AI SDK -# - packages/ai-providers/server-ai-langchain: LangChain integration (placeholder) +# This is a uv workspace root. Running `uv sync` here installs all packages +# and their dependencies into a single shared virtual environment at the +# repo root. # -# For development, use the package-specific pyproject.toml files in: -# - packages/sdk/server-ai/pyproject.toml -# - packages/ai-providers/server-ai-langchain/pyproject.toml +# Workspace members: +# - packages/sdk/server-ai (launchdarkly-server-sdk-ai) +# - packages/ai-providers/server-ai-openai (launchdarkly-server-sdk-ai-openai) +# - packages/ai-providers/server-ai-langchain (launchdarkly-server-sdk-ai-langchain) -[tool.poetry] -name = "launchdarkly-python-sdk-ai-monorepo" -version = "0.0.0" -description = "LaunchDarkly Python AI SDK Monorepo" -authors = ["LaunchDarkly "] -license = "Apache-2.0" +[tool.uv.workspace] +members = [ + "packages/sdk/server-ai", + "packages/ai-providers/server-ai-openai", + "packages/ai-providers/server-ai-langchain", +] -[tool.poetry.dependencies] -python = ">=3.9,<4" - -[build-system] -requires = ["poetry-core"] -build-backend = "poetry.core.masonry.api" +# Resolve launchdarkly-server-sdk-ai from the local workspace member rather +# than PyPI. This applies to all workspace members automatically. +[tool.uv.sources] +launchdarkly-server-sdk-ai = {workspace = true} From 3ab2baf2c9120acc4ed023f1b8eba477c2060e89 Mon Sep 17 00:00:00 2001 From: jsonbailey Date: Tue, 10 Mar 2026 15:57:05 -0500 Subject: [PATCH 2/4] chore: Update GitHub Actions workflows to use uv --- .github/actions/ci/action.yml | 10 +++----- .github/workflows/ci.yml | 47 +++++------------------------------ 2 files changed, 9 insertions(+), 48 deletions(-) diff --git a/.github/actions/ci/action.yml b/.github/actions/ci/action.yml index e744ef6..fd0f0bd 100644 --- a/.github/actions/ci/action.yml +++ b/.github/actions/ci/action.yml @@ -12,18 +12,14 @@ inputs: runs: using: composite steps: - - name: Set up Python ${{ inputs.python_version }} - uses: actions/setup-python@v5 + - name: Set up uv + uses: astral-sh/setup-uv@v5 with: python-version: ${{ inputs.python_version }} - - name: Install poetry - uses: abatilo/actions-poetry@7b6d33e44b4f08d7021a1dee3c044e9c253d6439 - - name: Install Dependencies shell: bash - working-directory: ${{ inputs.workspace_path }} - run: poetry install + run: uv sync --all-groups - name: Lint shell: bash diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9ee818d..fdaefaf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,18 +44,11 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + - name: Set up uv + uses: astral-sh/setup-uv@v5 with: python-version: ${{ matrix.python-version }} - - name: Install poetry - uses: abatilo/actions-poetry@7b6d33e44b4f08d7021a1dee3c044e9c253d6439 - - - name: Install requirements - working-directory: packages/sdk/server-ai - run: poetry install - - name: Run tests run: make -C packages/sdk/server-ai test @@ -90,25 +83,11 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + - name: Set up uv + uses: astral-sh/setup-uv@v5 with: python-version: ${{ matrix.python-version }} - - name: Install poetry - uses: abatilo/actions-poetry@7b6d33e44b4f08d7021a1dee3c044e9c253d6439 - - - name: Configure poetry for local virtualenvs - run: poetry config virtualenvs.in-project true - - - name: Install server-ai dependency first - working-directory: packages/sdk/server-ai - run: poetry install - - - name: Install requirements - working-directory: packages/ai-providers/server-ai-langchain - run: poetry install - - name: Run tests run: make -C packages/ai-providers/server-ai-langchain test @@ -143,24 +122,10 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + - name: Set up uv + uses: astral-sh/setup-uv@v5 with: python-version: ${{ matrix.python-version }} - - name: Install poetry - uses: abatilo/actions-poetry@7b6d33e44b4f08d7021a1dee3c044e9c253d6439 - - - name: Configure poetry for local virtualenvs - run: poetry config virtualenvs.in-project true - - - name: Install server-ai dependency first - working-directory: packages/sdk/server-ai - run: poetry install - - - name: Install requirements - working-directory: packages/ai-providers/server-ai-openai - run: poetry install - - name: Run tests run: make -C packages/ai-providers/server-ai-openai test From 1ea080ae4403dc6a01eb9c14ffea6320708535b8 Mon Sep 17 00:00:00 2001 From: jsonbailey Date: Tue, 10 Mar 2026 16:08:24 -0500 Subject: [PATCH 3/4] fix: Specify out-dir in mono repo --- packages/ai-providers/server-ai-langchain/Makefile | 2 +- packages/ai-providers/server-ai-openai/Makefile | 2 +- packages/sdk/server-ai/Makefile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/ai-providers/server-ai-langchain/Makefile b/packages/ai-providers/server-ai-langchain/Makefile index efc820f..3bb77b1 100644 --- a/packages/ai-providers/server-ai-langchain/Makefile +++ b/packages/ai-providers/server-ai-langchain/Makefile @@ -26,4 +26,4 @@ lint: install .PHONY: build build: #! Build distribution files build: install - uv build + uv build --out-dir dist diff --git a/packages/ai-providers/server-ai-openai/Makefile b/packages/ai-providers/server-ai-openai/Makefile index 5dbc500..7f1c57d 100644 --- a/packages/ai-providers/server-ai-openai/Makefile +++ b/packages/ai-providers/server-ai-openai/Makefile @@ -26,4 +26,4 @@ lint: install .PHONY: build build: #! Build distribution files build: install - uv build + uv build --out-dir dist diff --git a/packages/sdk/server-ai/Makefile b/packages/sdk/server-ai/Makefile index 281210e..492b42b 100644 --- a/packages/sdk/server-ai/Makefile +++ b/packages/sdk/server-ai/Makefile @@ -32,7 +32,7 @@ lint: install .PHONY: build build: #! Build distribution files build: install - uv build + uv build --out-dir dist .PHONY: docs docs: #! Generate sphinx-based documentation From 397d2d4eba0f02e90be94da3566dd8678b943b2b Mon Sep 17 00:00:00 2001 From: jsonbailey Date: Tue, 10 Mar 2026 16:56:07 -0500 Subject: [PATCH 4/4] address code review feedback --- .github/actions/ci/action.yml | 2 +- .github/workflows/ci.yml | 6 ++--- .github/workflows/release-please.yml | 28 --------------------- packages/sdk/server-ai/src/ldai/__init__.py | 24 ++++++++++++++---- packages/sdk/server-ai/src/ldai/client.py | 22 +++++++++++----- 5 files changed, 39 insertions(+), 43 deletions(-) diff --git a/.github/actions/ci/action.yml b/.github/actions/ci/action.yml index fd0f0bd..10f9392 100644 --- a/.github/actions/ci/action.yml +++ b/.github/actions/ci/action.yml @@ -13,7 +13,7 @@ runs: using: composite steps: - name: Set up uv - uses: astral-sh/setup-uv@v5 + uses: astral-sh/setup-uv@6ee6290f1cbc4156c0bdd66691b2c144ef8df19a # v7.4 with: python-version: ${{ inputs.python_version }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fdaefaf..232dda5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,7 +45,7 @@ jobs: - uses: actions/checkout@v4 - name: Set up uv - uses: astral-sh/setup-uv@v5 + uses: astral-sh/setup-uv@6ee6290f1cbc4156c0bdd66691b2c144ef8df19a # v7.4 with: python-version: ${{ matrix.python-version }} @@ -84,7 +84,7 @@ jobs: - uses: actions/checkout@v4 - name: Set up uv - uses: astral-sh/setup-uv@v5 + uses: astral-sh/setup-uv@6ee6290f1cbc4156c0bdd66691b2c144ef8df19a # v7.4 with: python-version: ${{ matrix.python-version }} @@ -123,7 +123,7 @@ jobs: - uses: actions/checkout@v4 - name: Set up uv - uses: astral-sh/setup-uv@v5 + uses: astral-sh/setup-uv@6ee6290f1cbc4156c0bdd66691b2c144ef8df19a # v7.4 with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index eb6d555..87f56eb 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -63,13 +63,6 @@ jobs: with: fetch-depth: 0 - - uses: actions/setup-python@v5 - with: - python-version: '3.11' - - - name: Install poetry - uses: abatilo/actions-poetry@7b6d33e44b4f08d7021a1dee3c044e9c253d6439 - - uses: ./.github/actions/ci with: workspace_path: packages/sdk/server-ai @@ -104,13 +97,6 @@ jobs: with: fetch-depth: 0 - - uses: actions/setup-python@v5 - with: - python-version: '3.11' - - - name: Install poetry - uses: abatilo/actions-poetry@7b6d33e44b4f08d7021a1dee3c044e9c253d6439 - - uses: ./.github/actions/ci with: workspace_path: packages/ai-providers/server-ai-langchain @@ -141,13 +127,6 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: '3.11' - - - name: Install poetry - uses: abatilo/actions-poetry@7b6d33e44b4f08d7021a1dee3c044e9c253d6439 - - uses: ./.github/actions/ci with: workspace_path: ${{ inputs.workspace_path }} @@ -210,13 +189,6 @@ jobs: with: fetch-depth: 0 - - uses: actions/setup-python@v5 - with: - python-version: '3.11' - - - name: Install poetry - uses: abatilo/actions-poetry@7b6d33e44b4f08d7021a1dee3c044e9c253d6439 - - uses: ./.github/actions/ci with: workspace_path: packages/ai-providers/server-ai-openai diff --git a/packages/sdk/server-ai/src/ldai/__init__.py b/packages/sdk/server-ai/src/ldai/__init__.py index 2868b57..da2340c 100644 --- a/packages/sdk/server-ai/src/ldai/__init__.py +++ b/packages/sdk/server-ai/src/ldai/__init__.py @@ -7,11 +7,25 @@ from ldai.client import LDAIClient from ldai.judge import Judge from ldai.models import ( # Deprecated aliases for backward compatibility - AIAgentConfig, AIAgentConfigDefault, AIAgentConfigRequest, - AIAgentGraphConfig, AIAgents, AICompletionConfig, - AICompletionConfigDefault, AIConfig, AIJudgeConfig, AIJudgeConfigDefault, - Edge, JudgeConfiguration, LDAIAgent, LDAIAgentConfig, LDAIAgentDefaults, - LDMessage, ModelConfig, ProviderConfig) + AIAgentConfig, + AIAgentConfigDefault, + AIAgentConfigRequest, + AIAgentGraphConfig, + AIAgents, + AICompletionConfig, + AICompletionConfigDefault, + AIConfig, + AIJudgeConfig, + AIJudgeConfigDefault, + Edge, + JudgeConfiguration, + LDAIAgent, + LDAIAgentConfig, + LDAIAgentDefaults, + LDMessage, + ModelConfig, + ProviderConfig, +) from ldai.providers.types import EvalScore, JudgeResponse from ldai.tracker import AIGraphTracker diff --git a/packages/sdk/server-ai/src/ldai/client.py b/packages/sdk/server-ai/src/ldai/client.py index 8289d06..ae79bd9 100644 --- a/packages/sdk/server-ai/src/ldai/client.py +++ b/packages/sdk/server-ai/src/ldai/client.py @@ -8,12 +8,22 @@ from ldai.agent_graph import AgentGraphDefinition from ldai.chat import Chat from ldai.judge import Judge -from ldai.models import (AIAgentConfig, AIAgentConfigDefault, - AIAgentConfigRequest, AIAgentGraphConfig, AIAgents, - AICompletionConfig, AICompletionConfigDefault, - AIJudgeConfig, AIJudgeConfigDefault, Edge, - JudgeConfiguration, LDMessage, ModelConfig, - ProviderConfig) +from ldai.models import ( + AIAgentConfig, + AIAgentConfigDefault, + AIAgentConfigRequest, + AIAgentGraphConfig, + AIAgents, + AICompletionConfig, + AICompletionConfigDefault, + AIJudgeConfig, + AIJudgeConfigDefault, + Edge, + JudgeConfiguration, + LDMessage, + ModelConfig, + ProviderConfig, +) from ldai.providers.ai_provider_factory import AIProviderFactory from ldai.sdk_info import AI_SDK_LANGUAGE, AI_SDK_NAME, AI_SDK_VERSION from ldai.tracker import AIGraphTracker, LDAIConfigTracker