Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change OpenAI Emedding vector type from List<Double> to float[] #252

Merged
merged 3 commits into from
Dec 27, 2024

Conversation

newtork
Copy link
Contributor

@newtork newtork commented Dec 27, 2024

Context

AI/ai-sdk-java-backlog#137

  • Change public API

    • I considered keeping legacy method, but decided against that, due to @Beta annotation and the classes will be subject to change anyway, see AI/ai-sdk-java-backlog#129
  • Single precision chosen to match Spring AI update. Also aligned with CAP.

  • Double precision is rarely used for embedding vectors in AI due to its high computational cost and minimal benefit in most machine learning tasks. It’s primarily reserved for scientific computing or specialized tasks requiring extreme precision.

Definition of Done

  • Functionality scope stated & covered
  • Tests cover the scope above
  • Error handling created / updated & covered by the tests above
  • Aligned changes with the JavaScript SDK
  • Documentation updated
  • Release notes updated

@newtork newtork added the please-review Request to review a pull-request label Dec 27, 2024
@newtork newtork enabled auto-merge (squash) December 27, 2024 09:01
Copy link
Member

@rpanackal rpanackal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@newtork newtork merged commit 8803094 into main Dec 27, 2024
5 checks passed
@newtork newtork deleted the change-emedding-vector-type branch December 27, 2024 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
please-review Request to review a pull-request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants