The platform for continuously improving AI agents.
/* tslint:disable */
/* eslint-disable */
/**
* Overbae API
* Backend API for the Overclaw / Overmind platform.
*
* The version of the OpenAPI document: 2.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from '../runtime';
import type { NativeSamplePrediction } from './NativeSamplePrediction';
import {
NativeSamplePredictionFromJSON,
NativeSamplePredictionFromJSONTyped,
NativeSamplePredictionToJSON,
NativeSamplePredictionToJSONTyped,
} from './NativeSamplePrediction';
/**
*
* @export
* @interface NativeSample
*/
export interface NativeSample {
/**
*
* @type {string}
* @memberof NativeSample
*/
key: string;
/**
*
* @type {number}
* @memberof NativeSample
*/
index: number;
/**
*
* @type {string}
* @memberof NativeSample
*/
benchmark: string;
/**
*
* @type {any}
* @memberof NativeSample
*/
input: any | null;
/**
*
* @type {any}
* @memberof NativeSample
*/
reference: any | null;
/**
*
* @type {string}
* @memberof NativeSample
*/
error: string;
/**
*
* @type {{ [key: string]: NativeSamplePrediction; }}
* @memberof NativeSample
*/
predictions: { [key: string]: NativeSamplePrediction; };
}
/**
* Check if a given object implements the NativeSample interface.
*/
export function instanceOfNativeSample(value: object): value is NativeSample {
if (!('key' in value) || value['key'] === undefined) return false;
if (!('index' in value) || value['index'] === undefined) return false;
if (!('benchmark' in value) || value['benchmark'] === undefined) return false;
if (!('input' in value) || value['input'] === undefined) return false;
if (!('reference' in value) || value['reference'] === undefined) return false;
if (!('error' in value) || value['error'] === undefined) return false;
if (!('predictions' in value) || value['predictions'] === undefined) return false;
return true;
}
export function NativeSampleFromJSON(json: any): NativeSample {
return NativeSampleFromJSONTyped(json, false);
}
export function NativeSampleFromJSONTyped(json: any, ignoreDiscriminator: boolean): NativeSample {
if (json == null) {
return json;
}
return {
'key': json['key'],
'index': json['index'],
'benchmark': json['benchmark'],
'input': json['input'],
'reference': json['reference'],
'error': json['error'],
'predictions': (mapValues(json['predictions'], NativeSamplePredictionFromJSON)),
};
}
export function NativeSampleToJSON(json: any): NativeSample {
return NativeSampleToJSONTyped(json, false);
}
export function NativeSampleToJSONTyped(value?: NativeSample | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'key': value['key'],
'index': value['index'],
'benchmark': value['benchmark'],
'input': value['input'],
'reference': value['reference'],
'error': value['error'],
'predictions': (mapValues(value['predictions'], NativeSamplePredictionToJSON)),
};
}