pixano.app.routers.embeddings
create_embedding(dataset_id, table, id, embedding, settings)
async
Update an embedding in a table of a dataset.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dataset_id
|
str
|
Dataset ID containing the table. |
required |
table
|
str
|
Table name. |
required |
id
|
str
|
ID of the embedding. |
required |
embedding
|
EmbeddingModel
|
Embedding to update. |
required |
settings
|
Annotated[Settings, Depends(get_settings)]
|
App settings. |
required |
Returns:
Type | Description |
---|---|
EmbeddingModel
|
The embedding updated. |
Source code in pixano/app/routers/embeddings.py
create_embeddings(dataset_id, table, embeddings, settings)
async
Add embeddings in a table of a dataset.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dataset_id
|
str
|
Dataset ID containing the table. |
required |
table
|
str
|
Table name. |
required |
embeddings
|
list[EmbeddingModel]
|
Embeddings to add. |
required |
settings
|
Annotated[Settings, Depends(get_settings)]
|
App settings. |
required |
Returns:
Type | Description |
---|---|
list[EmbeddingModel]
|
List of embeddings added. |
Source code in pixano/app/routers/embeddings.py
delete_embedding(dataset_id, table, id, settings)
async
Delete an embedding from a table of a dataset.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dataset_id
|
str
|
Dataset ID containing the table. |
required |
table
|
str
|
Table name. |
required |
id
|
str
|
ID of the embedding to delete. |
required |
settings
|
Annotated[Settings, Depends(get_settings)]
|
App settings. |
required |
Source code in pixano/app/routers/embeddings.py
delete_embeddings(dataset_id, table, ids, settings)
async
Delete embeddings from a table of a dataset.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dataset_id
|
str
|
Dataset ID containing the table. |
required |
table
|
str
|
Table name. |
required |
ids
|
Annotated[list[str], Query()]
|
IDs of the embeddings to delete. |
required |
settings
|
Annotated[Settings, Depends(get_settings)]
|
App settings. |
required |
Source code in pixano/app/routers/embeddings.py
get_embedding(dataset_id, table, id, settings)
async
Get an embedding from a table of a dataset.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dataset_id
|
str
|
Dataset ID containing the table. |
required |
table
|
str
|
Table name. |
required |
id
|
str
|
ID of the embedding. |
required |
settings
|
Annotated[Settings, Depends(get_settings)]
|
App settings. |
required |
Returns:
Type | Description |
---|---|
EmbeddingModel
|
The embedding. |
Source code in pixano/app/routers/embeddings.py
get_embeddings(dataset_id, table, settings, ids=Query(None), limit=None, skip=0, where=None, item_ids=Query(None))
async
Get embeddings from a table of a dataset.
They can be filtered by IDs, item IDs, a where clause or paginated.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dataset_id
|
str
|
Dataset ID containing the table. |
required |
table
|
str
|
Table name. |
required |
settings
|
Annotated[Settings, Depends(get_settings)]
|
App settings. |
required |
ids
|
list[str] | None
|
IDs of the embeddings. |
Query(None)
|
limit
|
int | None
|
Limit number of embeddings. |
None
|
skip
|
int
|
Skip number of embeddings. |
0
|
where
|
str | None
|
Where clause. |
None
|
item_ids
|
list[str] | None
|
Item IDs. |
Query(None)
|
Returns:
Type | Description |
---|---|
list[EmbeddingModel]
|
List of embeddings. |
Source code in pixano/app/routers/embeddings.py
update_embedding(dataset_id, table, id, embedding, settings)
async
Update an embedding in a table of a dataset.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dataset_id
|
str
|
Dataset ID containing the table. |
required |
table
|
str
|
Table name. |
required |
id
|
str
|
ID of the embedding. |
required |
embedding
|
EmbeddingModel
|
Embedding to update. |
required |
settings
|
Annotated[Settings, Depends(get_settings)]
|
App settings. |
required |
Returns:
Type | Description |
---|---|
EmbeddingModel
|
The embedding updated. |
Source code in pixano/app/routers/embeddings.py
update_embeddings(dataset_id, table, embeddings, settings)
async
Update embeddings in a table of a dataset.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dataset_id
|
str
|
Dataset ID containing the table. |
required |
table
|
str
|
Table name. |
required |
embeddings
|
list[EmbeddingModel]
|
Embeddings to update. |
required |
settings
|
Annotated[Settings, Depends(get_settings)]
|
App settings. |
required |
Returns:
Type | Description |
---|---|
list[EmbeddingModel]
|
List of embeddings updated. |