Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ENH] Add optional kwargs when initialising SentenceTransformerEmbedd…
…ingFunction class (#1891) ## Description of changes *Summarize the changes made by this PR.* - Improvements & Bug fixes - Add optional kwargs for `SetenceTransformer` when initialising `SentenceTransformerEmbeddingFunction` class (Issue [#1857](#1857)) ## Test plan *How are these changes tested?* - [x] Tests pass locally with `pytest` for python - installing chroma as an editable package locally and testing with the code ```python import chromadb from chromadb.utils import embedding_functions sentence_transformer_ef = embedding_functions.SentenceTransformerEmbeddingFunction(prompts={"query": "query: ", "passage": "passage: "}) print(sentence_transformer_ef.models['all-MiniLM-L6-v2'].prompts) ``` returned ```bash {'query': 'query: ', 'passage': 'passage: '} ``` ## Documentation Changes *Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the [docs repository](https://github.com/chroma-core/docs)?* I have added the documentation for `SentenceTransformerEmbeddingFunction` initialisation. Co-authored-by: sumaiyah <o##wJdTOvNkIC!1R@bQO>
- Loading branch information