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 { Participant } from './Participant';
import {
ParticipantFromJSON,
ParticipantFromJSONTyped,
ParticipantToJSON,
ParticipantToJSONTyped,
} from './Participant';
import type { AssistantInput } from './AssistantInput';
import {
AssistantInputFromJSON,
AssistantInputFromJSONTyped,
AssistantInputToJSON,
AssistantInputToJSONTyped,
} from './AssistantInput';
import type { AssistantThreadStateEnum } from './AssistantThreadStateEnum';
import {
AssistantThreadStateEnumFromJSON,
AssistantThreadStateEnumFromJSONTyped,
AssistantThreadStateEnumToJSON,
AssistantThreadStateEnumToJSONTyped,
} from './AssistantThreadStateEnum';
/**
*
* @export
* @interface AssistantThread
*/
export interface AssistantThread {
/**
*
* @type {string}
* @memberof AssistantThread
*/
readonly id: string;
/**
*
* @type {string}
* @memberof AssistantThread
*/
readonly project: string;
/**
*
* @type {string}
* @memberof AssistantThread
*/
readonly dataset: string | null;
/**
*
* @type {AssistantThreadStateEnum}
* @memberof AssistantThread
*/
readonly state: AssistantThreadStateEnum;
/**
*
* @type {boolean}
* @memberof AssistantThread
*/
readonly stopRequested: boolean;
/**
*
* @type {Array<AssistantInput>}
* @memberof AssistantThread
*/
readonly queue: Array<AssistantInput>;
/**
*
* @type {Array<Participant>}
* @memberof AssistantThread
*/
readonly participants: Array<Participant>;
/**
* The reply written so far, for a page that opens in the middle of it.
* @type {string}
* @memberof AssistantThread
*/
readonly draft: string;
}
/**
* Check if a given object implements the AssistantThread interface.
*/
export function instanceOfAssistantThread(value: object): value is AssistantThread {
if (!('id' in value) || value['id'] === undefined) return false;
if (!('project' in value) || value['project'] === undefined) return false;
if (!('dataset' in value) || value['dataset'] === undefined) return false;
if (!('state' in value) || value['state'] === undefined) return false;
if (!('stopRequested' in value) || value['stopRequested'] === undefined) return false;
if (!('queue' in value) || value['queue'] === undefined) return false;
if (!('participants' in value) || value['participants'] === undefined) return false;
if (!('draft' in value) || value['draft'] === undefined) return false;
return true;
}
export function AssistantThreadFromJSON(json: any): AssistantThread {
return AssistantThreadFromJSONTyped(json, false);
}
export function AssistantThreadFromJSONTyped(json: any, ignoreDiscriminator: boolean): AssistantThread {
if (json == null) {
return json;
}
return {
'id': json['id'],
'project': json['project'],
'dataset': json['dataset'],
'state': AssistantThreadStateEnumFromJSON(json['state']),
'stopRequested': json['stop_requested'],
'queue': ((json['queue'] as Array<any>).map(AssistantInputFromJSON)),
'participants': ((json['participants'] as Array<any>).map(ParticipantFromJSON)),
'draft': json['draft'],
};
}
export function AssistantThreadToJSON(json: any): AssistantThread {
return AssistantThreadToJSONTyped(json, false);
}
export function AssistantThreadToJSONTyped(value?: Omit<AssistantThread, 'id'|'project'|'dataset'|'state'|'stop_requested'|'queue'|'participants'|'draft'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
};
}