import Runloop from '@runloop/api-client';
const client = new Runloop({
bearerToken: 'My Bearer Token',
});
const scenarioDefinitionListView = await client.benchmarks.definitions('id');
console.log(scenarioDefinitionListView.has_more);
{
"scenarios": [
{
"id": "<string>",
"name": "<string>",
"environment": {
"blueprint_id": "<string>",
"snapshot_id": "<string>",
"prebuilt_id": "<string>",
"launch_parameters": {
"launch_commands": [
"<string>"
],
"resource_size_request": "X_SMALL",
"keep_alive_time_seconds": 123,
"available_ports": [
123
],
"after_idle": {
"idle_time_seconds": 123,
"on_idle": "shutdown"
},
"custom_cpu_cores": 123,
"custom_gb_memory": 123,
"custom_disk_size": 123,
"architecture": "x86_64",
"user_parameters": {
"username": "<string>",
"uid": 123
}
},
"working_directory": "<string>"
},
"input_context": {
"problem_statement": "<string>",
"additional_context": {}
},
"scoring_contract": {
"scoring_function_parameters": [
{
"name": "<string>",
"scorer": {
"lang": "<string>",
"search_directory": "<string>",
"pattern": "<string>",
"type": "ast_grep_scorer"
},
"weight": 123
}
]
},
"metadata": {},
"reference_output": "<string>",
"required_environment_variables": [
"<string>"
],
"is_public": true
}
],
"has_more": true,
"total_count": 123,
"remaining_count": 123
}
Get scenario definitions for a previously created Benchmark.
import Runloop from '@runloop/api-client';
const client = new Runloop({
bearerToken: 'My Bearer Token',
});
const scenarioDefinitionListView = await client.benchmarks.definitions('id');
console.log(scenarioDefinitionListView.has_more);
{
"scenarios": [
{
"id": "<string>",
"name": "<string>",
"environment": {
"blueprint_id": "<string>",
"snapshot_id": "<string>",
"prebuilt_id": "<string>",
"launch_parameters": {
"launch_commands": [
"<string>"
],
"resource_size_request": "X_SMALL",
"keep_alive_time_seconds": 123,
"available_ports": [
123
],
"after_idle": {
"idle_time_seconds": 123,
"on_idle": "shutdown"
},
"custom_cpu_cores": 123,
"custom_gb_memory": 123,
"custom_disk_size": 123,
"architecture": "x86_64",
"user_parameters": {
"username": "<string>",
"uid": 123
}
},
"working_directory": "<string>"
},
"input_context": {
"problem_statement": "<string>",
"additional_context": {}
},
"scoring_contract": {
"scoring_function_parameters": [
{
"name": "<string>",
"scorer": {
"lang": "<string>",
"search_directory": "<string>",
"pattern": "<string>",
"type": "ast_grep_scorer"
},
"weight": 123
}
]
},
"metadata": {},
"reference_output": "<string>",
"required_environment_variables": [
"<string>"
],
"is_public": true
}
],
"has_more": true,
"total_count": 123,
"remaining_count": 123
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
The Benchmark ID.
The limit of items to return. Default is 20.
Load the next page of data starting after the item with the given ID.
OK
The response is of type object
.
Was this page helpful?