Skip to content

The platform for continuously improving AI agents.

7.3 KB
Raw Blame
/* 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 { EvaluationContextSuggestion } from './EvaluationContextSuggestion';
import {
    EvaluationContextSuggestionFromJSON,
    EvaluationContextSuggestionFromJSONTyped,
    EvaluationContextSuggestionToJSON,
    EvaluationContextSuggestionToJSONTyped,
} from './EvaluationContextSuggestion';

/**
 *
 * @export
 * @interface EvaluationContextCheck
 */
export interface EvaluationContextCheck {
    /**
     *
     * @type {string}
     * @memberof EvaluationContextCheck
     */
    role: string;
    /**
     *
     * @type {string}
     * @memberof EvaluationContextCheck
     */
    label: string;
    /**
     *
     * @type {string}
     * @memberof EvaluationContextCheck
     */
    model: string;
    /**
     *
     * @type {number}
     * @memberof EvaluationContextCheck
     */
    contextWindow: number | null;
    /**
     *
     * @type {number}
     * @memberof EvaluationContextCheck
     */
    maxOutputTokens: number | null;
    /**
     *
     * @type {number}
     * @memberof EvaluationContextCheck
     */
    estimatedInputTokens: number;
    /**
     *
     * @type {number}
     * @memberof EvaluationContextCheck
     */
    totalInputTokens?: number;
    /**
     *
     * @type {string}
     * @memberof EvaluationContextCheck
     */
    configuredModel?: string;
    /**
     *
     * @type {number}
     * @memberof EvaluationContextCheck
     */
    reservedOutputTokens: number;
    /**
     *
     * @type {number}
     * @memberof EvaluationContextCheck
     */
    requiredContext: number;
    /**
     *
     * @type {number}
     * @memberof EvaluationContextCheck
     */
    checkedRows: number;
    /**
     *
     * @type {number}
     * @memberof EvaluationContextCheck
     */
    affectedRows: number;
    /**
     *
     * @type {Array<number>}
     * @memberof EvaluationContextCheck
     */
    rowIndices: Array<number>;
    /**
     *
     * @type {boolean}
     * @memberof EvaluationContextCheck
     */
    estimated: boolean;
    /**
     *
     * @type {string}
     * @memberof EvaluationContextCheck
     */
    status: string;
    /**
     *
     * @type {string}
     * @memberof EvaluationContextCheck
     */
    message: string;
    /**
     *
     * @type {number}
     * @memberof EvaluationContextCheck
     */
    estimatedCredits?: number | null;
    /**
     *
     * @type {string}
     * @memberof EvaluationContextCheck
     */
    costBasis?: string;
    /**
     *
     * @type {Array<EvaluationContextSuggestion>}
     * @memberof EvaluationContextCheck
     */
    suggestions?: Array<EvaluationContextSuggestion>;
    /**
     *
     * @type {string}
     * @memberof EvaluationContextCheck
     */
    suggestionNote?: string;
}

/**
 * Check if a given object implements the EvaluationContextCheck interface.
 */
export function instanceOfEvaluationContextCheck(value: object): value is EvaluationContextCheck {
    if (!('role' in value) || value['role'] === undefined) return false;
    if (!('label' in value) || value['label'] === undefined) return false;
    if (!('model' in value) || value['model'] === undefined) return false;
    if (!('contextWindow' in value) || value['contextWindow'] === undefined) return false;
    if (!('maxOutputTokens' in value) || value['maxOutputTokens'] === undefined) return false;
    if (!('estimatedInputTokens' in value) || value['estimatedInputTokens'] === undefined) return false;
    if (!('reservedOutputTokens' in value) || value['reservedOutputTokens'] === undefined) return false;
    if (!('requiredContext' in value) || value['requiredContext'] === undefined) return false;
    if (!('checkedRows' in value) || value['checkedRows'] === undefined) return false;
    if (!('affectedRows' in value) || value['affectedRows'] === undefined) return false;
    if (!('rowIndices' in value) || value['rowIndices'] === undefined) return false;
    if (!('estimated' in value) || value['estimated'] === undefined) return false;
    if (!('status' in value) || value['status'] === undefined) return false;
    if (!('message' in value) || value['message'] === undefined) return false;
    return true;
}

export function EvaluationContextCheckFromJSON(json: any): EvaluationContextCheck {
    return EvaluationContextCheckFromJSONTyped(json, false);
}

export function EvaluationContextCheckFromJSONTyped(json: any, ignoreDiscriminator: boolean): EvaluationContextCheck {
    if (json == null) {
        return json;
    }
    return {

        'role': json['role'],
        'label': json['label'],
        'model': json['model'],
        'contextWindow': json['context_window'],
        'maxOutputTokens': json['max_output_tokens'],
        'estimatedInputTokens': json['estimated_input_tokens'],
        'totalInputTokens': json['total_input_tokens'] == null ? undefined : json['total_input_tokens'],
        'configuredModel': json['configured_model'] == null ? undefined : json['configured_model'],
        'reservedOutputTokens': json['reserved_output_tokens'],
        'requiredContext': json['required_context'],
        'checkedRows': json['checked_rows'],
        'affectedRows': json['affected_rows'],
        'rowIndices': json['row_indices'],
        'estimated': json['estimated'],
        'status': json['status'],
        'message': json['message'],
        'estimatedCredits': json['estimated_credits'] == null ? undefined : json['estimated_credits'],
        'costBasis': json['cost_basis'] == null ? undefined : json['cost_basis'],
        'suggestions': json['suggestions'] == null ? undefined : ((json['suggestions'] as Array<any>).map(EvaluationContextSuggestionFromJSON)),
        'suggestionNote': json['suggestion_note'] == null ? undefined : json['suggestion_note'],
    };
}

export function EvaluationContextCheckToJSON(json: any): EvaluationContextCheck {
    return EvaluationContextCheckToJSONTyped(json, false);
}

export function EvaluationContextCheckToJSONTyped(value?: EvaluationContextCheck | null, ignoreDiscriminator: boolean = false): any {
    if (value == null) {
        return value;
    }

    return {

        'role': value['role'],
        'label': value['label'],
        'model': value['model'],
        'context_window': value['contextWindow'],
        'max_output_tokens': value['maxOutputTokens'],
        'estimated_input_tokens': value['estimatedInputTokens'],
        'total_input_tokens': value['totalInputTokens'],
        'configured_model': value['configuredModel'],
        'reserved_output_tokens': value['reservedOutputTokens'],
        'required_context': value['requiredContext'],
        'checked_rows': value['checkedRows'],
        'affected_rows': value['affectedRows'],
        'row_indices': value['rowIndices'],
        'estimated': value['estimated'],
        'status': value['status'],
        'message': value['message'],
        'estimated_credits': value['estimatedCredits'],
        'cost_basis': value['costBasis'],
        'suggestions': value['suggestions'] == null ? undefined : ((value['suggestions'] as Array<any>).map(EvaluationContextSuggestionToJSON)),
        'suggestion_note': value['suggestionNote'],
    };
}