curl --request POST \
--url https://app.langwatch.ai/api/evaluations/lingua/language_detection/evaluate \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--data '{
"data": {
"input": "<string>",
"output": "<string>"
}
}'
[
{
"status": "processed",
"score": 123,
"passed": true,
"label": "<string>",
"details": "<string>",
"cost": {
"currency": "<string>",
"amount": 123
},
"raw_response": {},
"error_type": "<string>",
"traceback": [
"<string>"
]
}
]
This evaluator detects the language of the input and output text to check for example if the generated answer is in the same language as the prompt, or if it’s in a specific expected language.
curl --request POST \
--url https://app.langwatch.ai/api/evaluations/lingua/language_detection/evaluate \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--data '{
"data": {
"input": "<string>",
"output": "<string>"
}
}'
[
{
"status": "processed",
"score": 123,
"passed": true,
"label": "<string>",
"details": "<string>",
"cost": {
"currency": "<string>",
"amount": 123
},
"raw_response": {},
"error_type": "<string>",
"traceback": [
"<string>"
]
}
]
Successful evaluation
The response is of type object[]
.
Was this page helpful?