mirror of
https://github.com/lancedb/lancedb.git
synced 2025-12-25 22:29:58 +00:00
`indexStats` still referenced UUID even though in https://github.com/lancedb/lancedb/pull/1702 we changed it to take name instead.
2.3 KiB
2.3 KiB
vectordb / Exports / OpenAIEmbeddingFunction
Class: OpenAIEmbeddingFunction
An embedding function that automatically creates vector representation for a given column.
Implements
EmbeddingFunction<string>
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new OpenAIEmbeddingFunction(sourceColumn, openAIKey, modelName?)
Parameters
| Name | Type | Default value |
|---|---|---|
sourceColumn |
string |
undefined |
openAIKey |
string |
undefined |
modelName |
string |
'text-embedding-ada-002' |
Defined in
Properties
_modelName
• Private Readonly _modelName: string
Defined in
_openai
• Private Readonly _openai: OpenAI
Defined in
sourceColumn
• sourceColumn: string
The name of the column that will be used as input for the Embedding Function.
Implementation of
EmbeddingFunction.sourceColumn
Defined in
Methods
embed
▸ embed(data): Promise<number[][]>
Creates a vector representation for the given values.
Parameters
| Name | Type |
|---|---|
data |
string[] |
Returns
Promise<number[][]>