Skip to content

Use RawRepresentationFactory in Azure.AI.Inference embedding generators #6436

@jozkee

Description

@jozkee
          > would it be appropriate to go with RawRepresentationFactory here or does the EncodingFormat concern is enough reason to revert?

We could write the code to successfully handle EmbeddingEncodingFormat.Float (and .Base64 is already handled), which should be trivially handled via deserialization. We would want to throw if it's set to other values, as they don't make sense with an Embedding<float> output. We can subsequently add overloads of AsIEmbeddingGenerator that produce other embedding types (e.g. BinaryEmbedding) if that's deemed valuable, but by far the most common use today is with float.

Originally posted by @stephentoub in #6433 (comment)

Metadata

Metadata

Assignees

Labels

area-aiMicrosoft.Extensions.AI libraries

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions