Closed Raghavgarg12 closed 3 days ago
@Raghavgarg12, thanks for raising this. We have a fairly long-standing PR that addresses this - https://github.com/chroma-core/chroma/pull/1977. Let me know if this addresses your issue.
openai_ef = embedding_functions.OpenAIEmbeddingFunction( api_key=OPENAI_API_KEY, model_name="text-embedding-3-small", dimensions=512 )
openai_ef = embedding_functions.OpenAIEmbeddingFunction(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: OpenAIEmbeddingFunction.init() got an unexpected keyword argument 'dimensions'
@Raghavgarg12, that is expected as the PR is not yet merged :). Let me rebase it and you can check it out and test it.
Right. Thankyou.
Let me re-open and we'll close once we get the PR merged.
@Raghavgarg12, rebased. You can test it by installing Chroma from the PR branch:
IMPORTANT: if you are using persistent client version < 0.5.5 running the below will migrate your existing database so you'll have to use 0.5.5 going forward. I'd suggest running your tests on a fresh new DB to verify the PR.
pip install git+https://github.com/chroma-core/chroma.git@trayan-04-05-feat_adding_dimensions_to_openai_ef
Describe the problem
It would be helpful if we get add functionality for dimension size parameter in embedding_functions.OpenAIEmbeddingFunction() as introduced by OPENAI for new embedding models
Describe the proposed solution
Just add the parameter to be sent during request to openai's server
Alternatives considered
No response
Importance
would make my life easier
Additional Information
No response