Skip to content

Conversation

sgeorgevv
Copy link

Add support for output dimension control in embedding models

This PR adds the ability to specify a reduced output dimension for embedding models. Key changes:

  • Add optional outputDimension field to EmbeddingModel
  • Add SetOutputDimension method for configuration
  • Update request handling to include dimension when specified
  • Propagate dimension parameter through batch operations

Supports the functionality described in the API docs: "Optional reduced dimension for the output embedding. If set, excessive values in the output embedding are truncated from the end. Supported by newer models since 2024."

Copy link

google-cla bot commented Mar 25, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@Annhiluc Annhiluc added status:triaged Issue/PR triaged to the corresponding sub-team p3 type:feature request New feature request or enhancement labels Mar 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

p3 status:triaged Issue/PR triaged to the corresponding sub-team type:feature request New feature request or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants