Description: Performs text vectorization.
Request syntax
POST /v3/openapi/apps/{app_group_identity}/actions/knowledge-embedding
Request parameters
Parameter | Type | Description | Position | Remarks |
app_id | String | The ID of the OpenSearch application. | Path | This parameter is required. |
content | EmbeddingDoc | The content. | Body | |
query | EmbeddingDoc | The search query. | Body |
EmbeddingDoc | |||
Parameter | Type | Description | Remarks |
content | String | The data content to be processed. | This parameter is required. |
query | Boolean | Specifies whether the text to be vectorized is a search query. Default value: false. | |
model | String | The vectorization model to be used. |
Sample request
{
"content":"Test text",
"query":false
}
Response parameters
Parameter | Type | Description |
contentVector | String | The vector after the vectorization. |
Sample response
{
"request_id":"111111111111",
"status":"OK";
"errors":[],
"result":"-0.010441,-0.002826,-0.022911,0.000847,0.025610,0.019213,-0.019912,0.008210,0.011974,-0.010120,-0.003866,-0.008091,-0.006889,-0.034774,...-0.012572,0.009668,0.010963,-0.005273,-0.005072,-0.002190,-0.001554,-0.000058"
}