Welcome to darca-embeddings’s documentation!
Project Overview
darca-embeddings
Modular, backend-agnostic interface for generating text embeddings. Provides a consistent Pythonic API for embedding text using various underlying providers.
Key Features
Unified Embedding Interface: Use one client class for multiple backends.
Default OpenAI Support: Integrates seamlessly with OpenAI’s Embedding API.
Extensible Design: Easy to add new backends (e.g., Hugging Face).
Quick Start
Install (using Make + Poetry):
make install
Set your environment variables (for example,
OPENAI_API_KEY
for OpenAI).Use the embedding client:
from darca_embeddings import EmbeddingClient client = EmbeddingClient() embedding = client.get_embedding("Hello World!") print(embedding)
Documentation
We use Sphinx for building documentation. See docs/source/ for the reST files. You can build the docs locally by:
make docs
Contributing
Contributions are welcome! See the CONTRIBUTING.rst for more details.
License
This project is licensed under the MIT License. See the LICENSE file for more details.
Getting Started
Community & Contribution
Contributing to darca-embeddings
Thank you for your interest in improving darca-embeddings!
Code of Conduct
Please note that we follow a standard open-source code of conduct. Be kind and constructive in all your interactions.
Getting Started
Create a feature branch from the main branch:
git checkout main git pull git checkout -b feature/my-new-feature
Make changes in your feature branch.
Test your changes locally by running partial or full checks: - `make format`: Auto-formats code via isort and black. - `make precommit`: Runs pre-commit hooks (lint checks, etc.). - `make test`: Runs the test suite (includes coverage). - `make docs`: Builds the Sphinx documentation. - `make check`: Runs install, format, pre-commit, test, and docs in one go.
You can use individual commands to speed up development when fixing smaller things.
Commit your changes. - Ensure all checks pass with make check before pushing.
Open a Pull Request for review. - Use the provided feature or issue templates if applicable. - | Provide a clear description of the changes, referencing any issues or discussions that they address.
Tips & Tricks
If you need new dependencies, add them with:
make add-deps group=dev deps="some-package"
This will keep your Poetry project organized.
If you want a production dependency, use:
make add-prod-deps deps="some-package"
Contact
If you have any questions or want to discuss a feature, open an issue in the repository or reach out directly to Roel Kist. We appreciate your support and contributions!