Like i asked.Can we request more than 1 element. Like microsoft translator api.
Microsoft Translator api request :The array can have at most 25 elements.
[
{
“Text”: “I would really like to drive your car around the block a few times.”
},
{
“Text”:“Tried something new.”
}
]
Yes. Just pass an array of strings instead of a string to the q
parameter:
curl -X POST https://<server>/translate -H 'Content-Type: application/json' -d '{"q": ["hello","world"],"source": "auto","target": "es","format": "text"}'
1 Like
Is there any limit for that ?
Unless you set a --batch-limit
parameter, no, but you will be limited by your hardware.
2 Likes