协同分词(Co.Tokenize)
开发环境
开发环境
POST
https://api.cohere.ai/v1/tokenize
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.cohere.ai/v1/tokenize?members&reference&Type&_postman_listIndexKey=key&_postman_listAllowsMultipleValues' \
--data-raw '{
"text": "tokenize me! :D",
"model": "command"
}'
响应示例响应示例
{
"tokens": [
34160,
974,
514,
34,
1420,
69
],
"token_strings": [
"token",
"ize'",
" me",
"!",
" :",
"D"
],
"meta": {
"api_version": {
"version": "1"
}
}
}
请求参数
Body 参数application/json
返回响应
修改于 2023-10-31 08:34:55