Skip to content

The platform for continuously improving AI agents.

3.1 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';
/**
 * ``recently_active`` is the authoritative live signal; the raw worker counts
 * are flaky (web_server workers bypass the input queue) and only supplement it.
 * @export
 * @interface InferenceLiveStats
 */
export interface InferenceLiveStats {
    /**
     *
     * @type {number}
     * @memberof InferenceLiveStats
     */
    backlog: number | null;
    /**
     *
     * @type {number}
     * @memberof InferenceLiveStats
     */
    numRunningInputs: number | null;
    /**
     *
     * @type {number}
     * @memberof InferenceLiveStats
     */
    numTotalRunners: number | null;
    /**
     *
     * @type {boolean}
     * @memberof InferenceLiveStats
     */
    recentlyActive: boolean;
    /**
     *
     * @type {boolean}
     * @memberof InferenceLiveStats
     */
    warming: boolean;
    /**
     *
     * @type {boolean}
     * @memberof InferenceLiveStats
     */
    available: boolean;
}

/**
 * Check if a given object implements the InferenceLiveStats interface.
 */
export function instanceOfInferenceLiveStats(value: object): value is InferenceLiveStats {
    if (!('backlog' in value) || value['backlog'] === undefined) return false;
    if (!('numRunningInputs' in value) || value['numRunningInputs'] === undefined) return false;
    if (!('numTotalRunners' in value) || value['numTotalRunners'] === undefined) return false;
    if (!('recentlyActive' in value) || value['recentlyActive'] === undefined) return false;
    if (!('warming' in value) || value['warming'] === undefined) return false;
    if (!('available' in value) || value['available'] === undefined) return false;
    return true;
}

export function InferenceLiveStatsFromJSON(json: any): InferenceLiveStats {
    return InferenceLiveStatsFromJSONTyped(json, false);
}

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

        'backlog': json['backlog'],
        'numRunningInputs': json['num_running_inputs'],
        'numTotalRunners': json['num_total_runners'],
        'recentlyActive': json['recently_active'],
        'warming': json['warming'],
        'available': json['available'],
    };
}

export function InferenceLiveStatsToJSON(json: any): InferenceLiveStats {
    return InferenceLiveStatsToJSONTyped(json, false);
}

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

    return {

        'backlog': value['backlog'],
        'num_running_inputs': value['numRunningInputs'],
        'num_total_runners': value['numTotalRunners'],
        'recently_active': value['recentlyActive'],
        'warming': value['warming'],
        'available': value['available'],
    };
}