import weflayr
client = weflayr.client() # reads WEFLAYR_API_KEY
client.get_evaluator(evaluator_id=14)
const weflayr = require('weflayr');
const client = weflayr.client(); // reads WEFLAYR_API_KEY
await weflayr.api.getEvaluator({
client,
throwOnError: true,
query: {
evaluatorId: 14,
},
});
curl "https://app.weflayr.com/api/evaluator/?evaluator_id=14" \
-H "Authorization: Bearer $WEFLAYR_API_KEY"
{
"evaluator_id": 1,
"name": "Overall quality",
"kind": "judge",
"instruction": "The answer is as good as the baseline's.",
"builtin": true,
"always_used": true,
"in_library": false,
"generated": false,
"blockers": []
}
{"error": "Invalid or missing API key. Send it as \"Authorization: Bearer <your key>\"."}
{"error": "No evaluator of this project has the id 14, or it was deleted. List the evaluators with get_evaluators."}
{"error": "Invalid request payload.", "detail": [{"field": "evaluator_id", "error": "Field required"}]}
Evaluators
Get evaluator
Get one evaluator.
GET
/
api
/
evaluator
/
import weflayr
client = weflayr.client() # reads WEFLAYR_API_KEY
client.get_evaluator(evaluator_id=14)
const weflayr = require('weflayr');
const client = weflayr.client(); // reads WEFLAYR_API_KEY
await weflayr.api.getEvaluator({
client,
throwOnError: true,
query: {
evaluatorId: 14,
},
});
curl "https://app.weflayr.com/api/evaluator/?evaluator_id=14" \
-H "Authorization: Bearer $WEFLAYR_API_KEY"
{
"evaluator_id": 1,
"name": "Overall quality",
"kind": "judge",
"instruction": "The answer is as good as the baseline's.",
"builtin": true,
"always_used": true,
"in_library": false,
"generated": false,
"blockers": []
}
{"error": "Invalid or missing API key. Send it as \"Authorization: Bearer <your key>\"."}
{"error": "No evaluator of this project has the id 14, or it was deleted. List the evaluators with get_evaluators."}
{"error": "Invalid request payload.", "detail": [{"field": "evaluator_id", "error": "Field required"}]}
Get one evaluator you can use in a benchmark: a built-in one Weflayr wrote, or one of your project.
The response also carries
Parameters
integer
required
The evaluator’s id.
blockers (what prevents the usual next step), in plain words. It is empty when the usual workflow applies.
import weflayr
client = weflayr.client() # reads WEFLAYR_API_KEY
client.get_evaluator(evaluator_id=14)
const weflayr = require('weflayr');
const client = weflayr.client(); // reads WEFLAYR_API_KEY
await weflayr.api.getEvaluator({
client,
throwOnError: true,
query: {
evaluatorId: 14,
},
});
curl "https://app.weflayr.com/api/evaluator/?evaluator_id=14" \
-H "Authorization: Bearer $WEFLAYR_API_KEY"
{
"evaluator_id": 1,
"name": "Overall quality",
"kind": "judge",
"instruction": "The answer is as good as the baseline's.",
"builtin": true,
"always_used": true,
"in_library": false,
"generated": false,
"blockers": []
}
{"error": "Invalid or missing API key. Send it as \"Authorization: Bearer <your key>\"."}
{"error": "No evaluator of this project has the id 14, or it was deleted. List the evaluators with get_evaluators."}
{"error": "Invalid request payload.", "detail": [{"field": "evaluator_id", "error": "Field required"}]}