Converts text into vector embeddings.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
gpdb:TextEmbedding |
none |
*DBInstance
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| DBInstanceId |
string |
Yes |
The cluster ID. |
gp-xxxxxxxxx |
| RegionId |
string |
Yes |
The region ID of the cluster. |
cn-hangzhou |
| Model |
string |
No |
The text embedding model. Valid values:
|
text-embedding-v3 |
| Input |
array |
Yes |
The text strings to embed. Up to 100 items. |
|
|
string |
No |
The text to embed. Maximum length: 2,048 tokens. |
ADBPGYesWhat? |
|
| Dimension |
integer |
No |
The number of output dimensions. Defaults to the maximum dimension count supported by the model. Note
|
1024 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
ABB39CC3-4488-4857-905D-2E4A051D0521 |
| Message |
string |
The response message. |
Successful |
| Status |
string |
The status of the operation. Valid values:
|
success |
| TextTokens |
integer |
The total number of tokens consumed. |
1000 |
| Results |
object |
||
| Results |
array<object> |
The embedding results. |
|
|
array<object> |
The embedding result. |
||
| Embedding |
object |
||
| Embedding |
array |
The embedding values. |
|
|
number |
The embedding value. |
0.1234 |
|
| Index |
integer |
The zero-based index of the corresponding entry in the Input parameter. |
0 |
Examples
Success response
JSON format
{
"RequestId": "ABB39CC3-4488-4857-905D-2E4A051D0521",
"Message": "Successful",
"Status": "success",
"TextTokens": 1000,
"Results": {
"Results": [
{
"Embedding": {
"Embedding": [
0.1234
]
},
"Index": 0
}
]
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.