All Products
Search
Document Center

OpenSearch:EmbeddingDoc

Last Updated:Mar 01, 2025

Performs text vectorization.

Request syntax

POST /v3/openapi/apps/{app_group_identity}/actions/knowledge-embedding

Note: app_group_identity specifies the name of the OpenSearch instance.

Request parameters

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"
}
Note

The vector after the text vectorization is of 1,536 dimensions.