embedding.defineSpacecommandsince 0.1
Declares an embedding space: where the vectors of one model live.
Request
umwelt call story.umw embedding.defineSpace '{
"projectId": "ball",
"space": { "id": "demo", "dimensions": 3, "model": "example-3d" }
}'Request
const result = await client.embeddingDefineSpace({
projectId: 'ball',
space: { id: 'demo', dimensions: 3, model: 'example-3d' },
});Request
var result = engine.EmbeddingDefineSpace(new DefineEmbeddingSpaceInput
{
ProjectId = "ball",
Space = new EmbeddingSpace { Id = "demo", Dimensions = 3, Model = "example-3d" },
});Response
{
"id": "demo",
"dimensions": 3,
"model": "example-3d"
}Payload
| Field | Type | Description |
|---|---|---|
projectIdrequired | string | The project to write to. |
spacerequired | EmbeddingSpace | The space: id, dimensions (1 to 4096) and model, which documents the model and is never read. |
Result
| Field | Type | Description |
|---|---|---|
idalways | string | The space’s id. |
dimensionsalways | integer | The length of every vector in it, from 1 to 4096. |
modelalways | string | The model that makes its vectors. The engine never reads it. |
Rules
One space per model. Vectors are comparable only within a model. Changing models means a new space, filled at any pace, then dropping the old one.
Defining it again is a no-op. The same definition returns it; a different one is a CONFLICT.
Errors
VALIDATION_FAILEDThe payload is malformed, the id begins with umwelt:, or the dimensions are outside 1 to 4096.CONFLICTThe space exists with another definition.NOT_FOUNDThe project does not exist.HANDSHAKE_REQUIREDOver the protocol, hello was not sent first.Every code is listed in Errors.
See also
Was this page helpful?