NewEmbedding on a model bound to an embedding-capable provider. Import github.com/hastekit/agent-sdk-go/pkg/gateway/llm/embeddings.
Given client and ctx:
Input.OfString. Set only one input-union branch. Use each response entry’s Index to associate vectors with inputs.
Dimensions and encoding
Dimensions requests a dimension count where the model supports it. EncodingFormat can request floating-point values or base64 where supported. Inspect Embedding.OfFloat or Embedding.OfBase64 accordingly; do not treat an empty float slice as proof of an empty embedding.
Store model identity, dimensions, and preprocessing choices with an index. Query vectors must be compatible with the document vectors. Changing models or dimensions generally requires rebuilding the affected index rather than mixing vectors.