Skip to main content

fabricatio-tei

MIT Python Versions PyPI Version PyPI Downloads PyPI Downloads Bindings: PyO3 Build Tool: uv + maturin

Integration with HuggingFace Text Embeddings Inference (TEI) for Fabricatio's provider routing system. Register a TEI server as a provider and use it for embedding generation and document reranking through Fabricatio's standard model interfaces.

Requires Python 3.12+.

Installation

pip install fabricatio[tei]
# or
uv pip install fabricatio[tei]

Configuration

The schema currently defines no options and is reserved for future use. Set them under the [ext.tei] table in fabricatio.toml, equivalently under [tool.fabricatio.ext.tei] in pyproject.toml, or via FABRICATIO_EXT__TEI__<FIELD_UPPER> environment variables.

# fabricatio.toml
[ext.tei]

Access at runtime: from fabricatio_tei.config import tei_config.

Key Components

Provider Registration (add_tei)

Rust-backed function exposed as fabricatio_tei.rust.add_tei. Registers a TEI server as both an embedding and reranking provider in Fabricatio's global router.

from fabricatio_tei.rust import add_tei

add_tei("my-tei", "http://localhost:8080")

After registration, the TEI server is available to any agent or workflow that uses UseEmbedding or UseReranker capabilities from fabricatio-core. Models created through the router will issue requests to the TEI server's /embed and /rerank endpoints.

Tei Capability Mixin

Abstract base class inheriting UseLLM from fabricatio-core. Provides a tei() method placeholder for building agents that consume TEI services. Extend this class alongside test roles or other capability mixins.

from fabricatio_tei.capabilities.tei import Tei
from fabricatio_mock.models.mock_role import LLMTestRole

class TeiRole(LLMTestRole, Tei):
    """Test role combining LLM testing with TEI capabilities."""

Supported Endpoints

Route Endpoint Use Case
/embed POST with {"inputs": "text"} Generate embeddings for text inputs
/rerank POST with {"query": "...", "texts": [...]} Rerank documents by relevance to a query

The TEI provider implements both EmbeddingModel and RerankerModel from the thryd crate, making it compatible with any Fabricatio workflow that consumes these traits.

Package Structure

fabricatio-tei/
├── python/fabricatio_tei/
│   ├── capabilities/      - Tei abstract base class
│   ├── actions/           - Action definitions
│   ├── models/            - Model definitions
│   ├── workflows/         - Workflow definitions
│   ├── config.py          - TeiConfig dataclass
│   └── __init__.py
├── src/                   - Rust implementation
│   ├── lib.rs             - PyO3 module entry point
│   └── tei.rs             - TEI provider, models, and routes
├── Cargo.toml
└── pyproject.toml

Dependencies

  • fabricatio-core — router, embedding/reranking interfaces, and configuration system
  • thryd (Rust) — provider and model abstractions
  • fabricatio-router (Rust) — global provider registry

License

This project is licensed under the MIT License.

Metadata

Release files for fabricatio-tei 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for fabricatio-tei 0.1.2
File Actions
fabricatio_tei-0.1.2-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details for fabricatio_tei-0.1.2-cp314-cp314-win_amd64.whl
fabricatio_tei-0.1.2-cp314-cp314-manylinux_2_38_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.38+ x86-64 Details for fabricatio_tei-0.1.2-cp314-cp314-manylinux_2_38_x86_64.whl
fabricatio_tei-0.1.2-cp314-cp314-manylinux_2_38_aarch64.whl CPython 3.14 CPython 3.14 Linux glibc 2.38+ ARM64 Details for fabricatio_tei-0.1.2-cp314-cp314-manylinux_2_38_aarch64.whl
fabricatio_tei-0.1.2-cp314-cp314-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 macOS 11.0+ ARM64 Details for fabricatio_tei-0.1.2-cp314-cp314-macosx_11_0_arm64.whl
fabricatio_tei-0.1.2-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details for fabricatio_tei-0.1.2-cp313-cp313-win_amd64.whl
fabricatio_tei-0.1.2-cp313-cp313-manylinux_2_38_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.38+ x86-64 Details for fabricatio_tei-0.1.2-cp313-cp313-manylinux_2_38_x86_64.whl
fabricatio_tei-0.1.2-cp313-cp313-manylinux_2_38_aarch64.whl CPython 3.13 CPython 3.13 Linux glibc 2.38+ ARM64 Details for fabricatio_tei-0.1.2-cp313-cp313-manylinux_2_38_aarch64.whl
fabricatio_tei-0.1.2-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details for fabricatio_tei-0.1.2-cp313-cp313-macosx_11_0_arm64.whl
fabricatio_tei-0.1.2-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details for fabricatio_tei-0.1.2-cp312-cp312-win_amd64.whl
fabricatio_tei-0.1.2-cp312-cp312-manylinux_2_38_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.38+ x86-64 Details for fabricatio_tei-0.1.2-cp312-cp312-manylinux_2_38_x86_64.whl
fabricatio_tei-0.1.2-cp312-cp312-manylinux_2_38_aarch64.whl CPython 3.12 CPython 3.12 Linux glibc 2.38+ ARM64 Details for fabricatio_tei-0.1.2-cp312-cp312-manylinux_2_38_aarch64.whl
fabricatio_tei-0.1.2-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details for fabricatio_tei-0.1.2-cp312-cp312-macosx_11_0_arm64.whl

Total release size: 138.2 MB

Release files / fabricatio_tei-0.1.2-cp314-cp314-win_amd64.whl

Download URL fabricatio_tei-0.1.2-cp314-cp314-win_amd64.whl
Size 11.5 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
b9afe0e61ae11b543e38a7c32732be82b102b295661d09f4668305f4f61fcfa1
BLAKE2b-256 checksum
How to use checksums
467123dd98ede6959c44457ae2a2c0878de9376ae688b8fa1da5f7aee5b9fe93
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / fabricatio_tei-0.1.2-cp314-cp314-manylinux_2_38_x86_64.whl

Download URL fabricatio_tei-0.1.2-cp314-cp314-manylinux_2_38_x86_64.whl
Size 12.4 MB
Tags CPython 3.14 Linux glibc 2.38+ x86-64
SHA-256 checksum
How to use checksums
0362404d18f8b2eb3614323d65471d4ad0dfbf08a89ad82f4f192a850f46c910
BLAKE2b-256 checksum
How to use checksums
62bb09246edaf51e5dbe41760220a083681a4b2ae32b4b0465bbbe1aafa31e44
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / fabricatio_tei-0.1.2-cp314-cp314-manylinux_2_38_aarch64.whl

Download URL fabricatio_tei-0.1.2-cp314-cp314-manylinux_2_38_aarch64.whl
Size 11.1 MB
Tags CPython 3.14 Linux glibc 2.38+ ARM64
SHA-256 checksum
How to use checksums
62d6eb7a15b47e80ce361c6ff0b09d48d8dd40b925226dc47446cfc82ab8c872
BLAKE2b-256 checksum
How to use checksums
1b7210df595fc01ce26512e45d519332be9b6d4c27433def61e5da57cae46b45
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / fabricatio_tei-0.1.2-cp314-cp314-macosx_11_0_arm64.whl

Download URL fabricatio_tei-0.1.2-cp314-cp314-macosx_11_0_arm64.whl
Size 11.1 MB
Tags CPython 3.14 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
45f51c05e79e522af0f7217ef9c2d67fbe15ddcc4c904447efa5f39d8320f16e
BLAKE2b-256 checksum
How to use checksums
4d565cad9d455930971b32194352500c2572d0de40b0457c95edf78d75b956a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / fabricatio_tei-0.1.2-cp313-cp313-win_amd64.whl

Download URL fabricatio_tei-0.1.2-cp313-cp313-win_amd64.whl
Size 11.5 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
d026b87d1c7ac9c39f0e50603262428b138f79089884fa4a4dcf7a8a151b6c43
BLAKE2b-256 checksum
How to use checksums
8b6569ef2bb5af2318c1d71965e3808b6d346568640c36b29dabb85276f813d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / fabricatio_tei-0.1.2-cp313-cp313-manylinux_2_38_x86_64.whl

Download URL fabricatio_tei-0.1.2-cp313-cp313-manylinux_2_38_x86_64.whl
Size 12.4 MB
Tags CPython 3.13 Linux glibc 2.38+ x86-64
SHA-256 checksum
How to use checksums
766028a97dff9f3bc1df44822d70ec9127b7a4690f097327fa5e956c563d8a65
BLAKE2b-256 checksum
How to use checksums
8e797998cd88256285875dc4c77bb1a01f9226caadc567d989d38a0544367c31
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / fabricatio_tei-0.1.2-cp313-cp313-manylinux_2_38_aarch64.whl

Download URL fabricatio_tei-0.1.2-cp313-cp313-manylinux_2_38_aarch64.whl
Size 11.1 MB
Tags CPython 3.13 Linux glibc 2.38+ ARM64
SHA-256 checksum
How to use checksums
5c27fe3300791b1e9483e9ef8632c9739cc609ffef108f8c32eeb9f73d688d84
BLAKE2b-256 checksum
How to use checksums
50c00b7608a2e982f4d0fdd25b084ff5ce8e29b9af9fa14cf4b3a04b6ec30e2e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / fabricatio_tei-0.1.2-cp313-cp313-macosx_11_0_arm64.whl

Download URL fabricatio_tei-0.1.2-cp313-cp313-macosx_11_0_arm64.whl
Size 11.1 MB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
2c7e77dec0c8f7bc989e3c4d1dadcea7dcb34316b1dd6c0da58cf487a65501f5
BLAKE2b-256 checksum
How to use checksums
7ecd6a1246e8c9681b945e34688831ca7e1d20b44674c60e9d8bed9c0f0eafa4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / fabricatio_tei-0.1.2-cp312-cp312-win_amd64.whl

Download URL fabricatio_tei-0.1.2-cp312-cp312-win_amd64.whl
Size 11.5 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
f93b3e4768fa3fa490ff2142d461f2df1e00ece6d8f7685fec6d4b3c20f5cfad
BLAKE2b-256 checksum
How to use checksums
597b2c02673f3058b2651e5bbf7ddf5dc73c584dda3e52ff0bf369ed3824d567
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / fabricatio_tei-0.1.2-cp312-cp312-manylinux_2_38_x86_64.whl

Download URL fabricatio_tei-0.1.2-cp312-cp312-manylinux_2_38_x86_64.whl
Size 12.4 MB
Tags CPython 3.12 Linux glibc 2.38+ x86-64
SHA-256 checksum
How to use checksums
53b1f84d18622c15aee2a7ecc135f34c412cd3db3407a7d9c90e02085b59095c
BLAKE2b-256 checksum
How to use checksums
a6d2d32dcd4785075cd07c95545349eb02863706eaae6a459b3c906045be4a28
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / fabricatio_tei-0.1.2-cp312-cp312-manylinux_2_38_aarch64.whl

Download URL fabricatio_tei-0.1.2-cp312-cp312-manylinux_2_38_aarch64.whl
Size 11.1 MB
Tags CPython 3.12 Linux glibc 2.38+ ARM64
SHA-256 checksum
How to use checksums
8f79a1f52a7553a3101a9991a3e61d0cea3bb0af881c9952a2ff55c5ae7347b0
BLAKE2b-256 checksum
How to use checksums
3cfdc57ac5cbde6b2bb5f9ee7dc6b29568d87cbd582085416a6d6c43f000326d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / fabricatio_tei-0.1.2-cp312-cp312-macosx_11_0_arm64.whl

Download URL fabricatio_tei-0.1.2-cp312-cp312-macosx_11_0_arm64.whl
Size 11.1 MB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
30b3f90e498399e092e73f7388f8db258bacee1014f00548cfc43f33ee6cb0b5
BLAKE2b-256 checksum
How to use checksums
552065277981d7e31c94c029bcd7ba54eda138104cdb7f7a56905977aa744062
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for fabricatio-tei 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page