Documentation
Framework
Version
Class References
Function References
Interface References
Type Alias References
Variable References

embedding

Function: embedding()

ts
function embedding<TAdapter>(options): Promise<EmbeddingResult>;
function embedding<TAdapter>(options): Promise<EmbeddingResult>;

Defined in: core/embedding.ts:16

Standalone embedding function with type inference from adapter

Type Parameters

TAdapter

TAdapter extends AIAdapter<any, any, any, any, any, Record<string, readonly Modality[]>, DefaultMessageMetadataByModality>

Parameters

options

Omit<EmbeddingOptions, "model"> & object

Returns

Promise<EmbeddingResult>