You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(generation): add support for custom structured output schema (#634)
* feat(generation): add support for custom structured output schema
- Introduce `generation.output_schema` and `output.format` parameters to configure direct structured output based on a user-defined JSON schema.
- When `output_schema` is provided, the generator now bypasses the standard conversation format and uses constrained decoding to generate output that adheres directly to the specified schema.
- Implement a dynamic model creation utility (`make_dynamic_model`) to convert a raw JSON schema dictionary into a Pydantic-compatible class, enabling its use with constrained decoding.
- Update the `outlines` and `transformers` dependencies to their latest versions to support these new capabilities.
Signed-off-by: Luke Hinds <lukehinds@gmail.com>
* build(deps): bump docker/metadata-action from 5.10.0 to 6.0.0 (#615)
Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 5.10.0 to 6.0.0.
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Commits](docker/metadata-action@c299e40...030e881)
---
updated-dependencies:
- dependency-name: docker/metadata-action
dependency-version: 6.0.0
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps): bump docker/setup-buildx-action from 3.12.0 to 4.0.0 (#616)
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 3.12.0 to 4.0.0.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](docker/setup-buildx-action@8d2750c...4d04d5d)
---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
dependency-version: 4.0.0
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps): bump sigstore/cosign-installer from 4.0.0 to 4.1.1 (#627)
Bumps [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) from 4.0.0 to 4.1.1.
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](sigstore/cosign-installer@faadad0...cad07c2)
---
updated-dependencies:
- dependency-name: sigstore/cosign-installer
dependency-version: 4.1.1
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps): bump docker/build-push-action from 6.19.2 to 7.1.0 (#628)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.19.2 to 7.1.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](docker/build-push-action@10e90e3...bcafcac)
---
updated-dependencies:
- dependency-name: docker/build-push-action
dependency-version: 7.1.0
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps): bump actions/upload-artifact from 7.0.0 to 7.0.1 (#626)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 7.0.0 to 7.0.1.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](actions/upload-artifact@bbbca2d...043fb46)
---
updated-dependencies:
- dependency-name: actions/upload-artifact
dependency-version: 7.0.1
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps): bump outlines from 1.2.12 to 1.3.0 (#632)
Bumps [outlines](https://github.com/dottxt-ai/outlines) from 1.2.12 to 1.3.0.
- [Release notes](https://github.com/dottxt-ai/outlines/releases)
- [Commits](dottxt-ai/outlines@1.2.12...1.3.0)
---
updated-dependencies:
- dependency-name: outlines
dependency-version: 1.3.0
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps): bump transformers from 5.2.0 to 5.8.1 (#633)
Bumps [transformers](https://github.com/huggingface/transformers) from 5.2.0 to 5.8.1.
- [Release notes](https://github.com/huggingface/transformers/releases)
- [Commits](huggingface/transformers@v5.2.0...v5.8.1)
---
updated-dependencies:
- dependency-name: transformers
dependency-version: 5.8.1
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore(deps): update dependencies and bump project version
- Bump project version to 4.13.0
- Update several key dependencies to their latest versions, including:
- `outlines` from 1.2.12 to 1.3.0
- `transformers` from 5.2.0 to 5.8.1
- `hf-xet` from 1.2.0 to 1.5.0
- `huggingface-hub` from 1.3.1 to 1.15.0
- Replace `typer-slim` (0.21.1) with the full `typer` package (0.25.1), which introduces `annotated-doc` as a new dependency.
Signed-off-by: Luke Hinds <lukehinds@gmail.com>
* refactor(generator): optimize llm client import and return flow
- Move `make_dynamic_model` import to the top of `generator.py` to centralize imports and avoid redundant declarations within methods.
- Adjust the `_generate_with_retry` method to explicitly return the successful `result` only if no exception occurred during `llm_client.chat_completion`. This clarifies control flow by placing `return True, result` in an `else` block after the `try...except` block.
- Add `noqa: PLR0911` to suppress a Pylint warning regarding too many return statements in `_generate_with_retry`, as the method's multiple return paths are essential for its retry and error handling logic.
Signed-off-by: Luke Hinds <lukehinds@gmail.com>
---------
Signed-off-by: Luke Hinds <lukehinds@gmail.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
0 commit comments