JavaScript
import Runloop from '@runloop/api-client'; const client = new Runloop({ bearerToken: 'My Bearer Token', }); const scorer = await client.scenarios.scorers.create({ bash_script: 'bash_script', type: 'type' }); console.log(scorer.id);
{ "id": "<string>", "type": "<string>", "bash_script": "<string>" }
Create a custom scenario scorer.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
Name of the type of custom scorer.
Bash script for the custom scorer taking context as a json object $RL_SCORER_CONTEXT.
OK
A ScenarioScorerView represents a custom scoring function for a Scenario.
ID for the scenario scorer.
Name of the type of scenario scorer.
Bash script that takes in $RL_SCORER_CONTEXT as env variable and runs scoring.
Was this page helpful?