| 1 | [vectordb](../README.md) / [Exports](../modules.md) / EmbeddingFunction |
| 2 | |
| 3 | # Interface: EmbeddingFunction\<T\> |
| 4 | |
| 5 | An embedding function that automatically creates vector representation for a given column. |
| 6 | |
| 7 | ## Type parameters |
| 8 | |
| 9 | | Name | |
| 10 | | :------ | |
| 11 | | `T` | |
| 12 | |
| 13 | ## Implemented by |
| 14 | |
| 15 | - [`OpenAIEmbeddingFunction`](../classes/OpenAIEmbeddingFunction.md) |
| 16 | |
| 17 | ## Table of contents |
| 18 | |
| 19 | ### Properties |
| 20 | |
| 21 | - [embed](EmbeddingFunction.md#embed) |
| 22 | - [sourceColumn](EmbeddingFunction.md#sourcecolumn) |
| 23 | |
| 24 | ## Properties |
| 25 | |
| 26 | ### embed |
| 27 | |
| 28 | • **embed**: (`data`: `T`[]) => `Promise`\<`number`[][]\> |
| 29 | |
| 30 | #### Type declaration |
| 31 | |
| 32 | ▸ (`data`): `Promise`\<`number`[][]\> |
| 33 | |
| 34 | Creates a vector representation for the given values. |
| 35 | |
| 36 | ##### Parameters |
| 37 | |
| 38 | | Name | Type | |
| 39 | | :------ | :------ | |
| 40 | | `data` | `T`[] | |
| 41 | |
| 42 | ##### Returns |
| 43 | |
| 44 | `Promise`\<`number`[][]\> |
| 45 | |
| 46 | #### Defined in |
| 47 | |
| 48 | [embedding/embedding_function.ts:27](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/embedding/embedding_function.ts#L27) |
| 49 | |
| 50 | ___ |
| 51 | |
| 52 | ### sourceColumn |
| 53 | |
| 54 | • **sourceColumn**: `string` |
| 55 | |
| 56 | The name of the column that will be used as input for the Embedding Function. |
| 57 | |
| 58 | #### Defined in |
| 59 | |
| 60 | [embedding/embedding_function.ts:22](https://github.com/lancedb/lancedb/blob/c89d5e6/node/src/embedding/embedding_function.ts#L22) |