Skip to content

The platform for continuously improving AI agents.

3.5 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';
/**
 *
 * @export
 * @interface ServingContextPlan
 */
export interface ServingContextPlan {
    /**
     *
     * @type {number}
     * @memberof ServingContextPlan
     */
    inputTokens: number;
    /**
     *
     * @type {number}
     * @memberof ServingContextPlan
     */
    outputTokens: number;
    /**
     *
     * @type {number}
     * @memberof ServingContextPlan
     */
    rows: number;
    /**
     *
     * @type {number}
     * @memberof ServingContextPlan
     */
    requiredContext: number;
    /**
     *
     * @type {number}
     * @memberof ServingContextPlan
     */
    maxModelLen: number;
    /**
     *
     * @type {number}
     * @memberof ServingContextPlan
     */
    modelContextLimit: number;
    /**
     *
     * @type {boolean}
     * @memberof ServingContextPlan
     */
    estimated: boolean;
    /**
     *
     * @type {Array<string>}
     * @memberof ServingContextPlan
     */
    warnings?: Array<string>;
}

/**
 * Check if a given object implements the ServingContextPlan interface.
 */
export function instanceOfServingContextPlan(value: object): value is ServingContextPlan {
    if (!('inputTokens' in value) || value['inputTokens'] === undefined) return false;
    if (!('outputTokens' in value) || value['outputTokens'] === undefined) return false;
    if (!('rows' in value) || value['rows'] === undefined) return false;
    if (!('requiredContext' in value) || value['requiredContext'] === undefined) return false;
    if (!('maxModelLen' in value) || value['maxModelLen'] === undefined) return false;
    if (!('modelContextLimit' in value) || value['modelContextLimit'] === undefined) return false;
    if (!('estimated' in value) || value['estimated'] === undefined) return false;
    return true;
}

export function ServingContextPlanFromJSON(json: any): ServingContextPlan {
    return ServingContextPlanFromJSONTyped(json, false);
}

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

        'inputTokens': json['input_tokens'],
        'outputTokens': json['output_tokens'],
        'rows': json['rows'],
        'requiredContext': json['required_context'],
        'maxModelLen': json['max_model_len'],
        'modelContextLimit': json['model_context_limit'],
        'estimated': json['estimated'],
        'warnings': json['warnings'] == null ? undefined : json['warnings'],
    };
}

export function ServingContextPlanToJSON(json: any): ServingContextPlan {
    return ServingContextPlanToJSONTyped(json, false);
}

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

    return {

        'input_tokens': value['inputTokens'],
        'output_tokens': value['outputTokens'],
        'rows': value['rows'],
        'required_context': value['requiredContext'],
        'max_model_len': value['maxModelLen'],
        'model_context_limit': value['modelContextLimit'],
        'estimated': value['estimated'],
        'warnings': value['warnings'],
    };
}