HuggingFace Embedding
Embed data using HuggingFace's Inference API.
Configure via UI
- Select
HuggingFace Embedding
from theEmbedding Model
dropdown. - Enter your HuggingFace API key.
- Enter your HuggingFace model name or URL, e.g.
BAAI/bge-small-en-v1.5
.
Configure via API / Client
- Python Client
- TypeScript Client
pipeline = {
'name': 'test-pipeline',
'transform_config': {...},
'embedding_config': {
'type': 'HUGGINGFACE_API_EMBEDDING',
'component': {
'token': 'hf_...',
'model_name': 'BAAI/bge-small-en-v1.5',
},
},
'data_sink_id': data_sink.id
}
pipeline = client.pipelines.upsert_pipeline(request=pipeline)
const pipeline = {
'name': 'test-pipeline',
'transform_config': {...},
'embedding_config': {
'type': 'HUGGINGFACE_API_EMBEDDING',
'component': {
'token': 'hf_...',
'model_name': 'BAAI/bge-small-en-v1.5',
},
},
'dataSinkId': data_sink.id
}
await client.pipelines.upsertPipeline({
projectId: projectId,
body: pipeline
})