OpenAI Embedding
Embed data using OpenAI's API.
Configure via UI
- Select
OpenAI Embedding
from theEmbedding Model
dropdown. - Enter your OpenAI API key.
- Select your preferred model:
text-embedding-3-small
(Default)text-similarity-3-large
text-embedding-ada-002
Configure via API / Client
- Python Client
- TypeScript Client
pipeline = {
'name': 'test-pipeline',
'transform_config': {...},
'embedding_config': {
'type': 'OPENAI_EMBEDDING',
'component': {
'api_key': '<YOUR_API_KEY_HERE>', # editable
'model_name': 'text-embedding-3-small' # editable
},
},
'data_sink_id': data_sink.id
}
pipeline = client.pipelines.upsert_pipeline(request=pipeline)
const pipeline = {
'name': 'test-pipeline',
'transform_config': {...},
'embedding_config': {
'type': 'OPENAI_EMBEDDING',
'component': {
'api_key': '<YOUR_API_KEY_HERE>', # editable
'model_name': 'text-embedding-3-small' # editable
},
},
'dataSinkId': data_sink.id
}
await client.pipelines.upsertPipeline({
projectId: projectId,
body: pipeline
})