/* tslint:disable */ /* eslint-disable */ /** * Fabric API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 1.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 { AssistantMessagePart } from './AssistantMessagePart'; import { AssistantMessagePartFromJSON, AssistantMessagePartFromJSONTyped, AssistantMessagePartToJSON, AssistantMessagePartToJSONTyped, } from './AssistantMessagePart'; /** * * @export * @interface AssistantMessageBase */ export interface AssistantMessageBase { /** * * @type {string} * @memberof AssistantMessageBase */ 'role': AssistantMessageBaseRoleEnum; /** * * @type {Array} * @memberof AssistantMessageBase */ 'parts'?: Array | null; /** * * @type {string} * @memberof AssistantMessageBase */ 'content'?: string | null; } /** * @export */ export const AssistantMessageBaseRoleEnum = { User: 'user', Assistant: 'assistant' } as const; export type AssistantMessageBaseRoleEnum = typeof AssistantMessageBaseRoleEnum[keyof typeof AssistantMessageBaseRoleEnum]; /** * Check if a given object implements the AssistantMessageBase interface. */ export function instanceOfAssistantMessageBase(value: object): value is AssistantMessageBase { if (!('role' in value) || value['role'] === undefined) return false; return true; } export function AssistantMessageBaseFromJSON(json: any): AssistantMessageBase { return AssistantMessageBaseFromJSONTyped(json, false); } export function AssistantMessageBaseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AssistantMessageBase { if (json == null) { return json; } const result = { } as AssistantMessageBase; if (json['role'] !== undefined) { result['role'] = json['role']; } if (json['parts'] !== undefined) { if (json['parts'] === null) { result['parts'] = null; } else { result['parts'] = (json['parts'] as Array).map(AssistantMessagePartFromJSON); } } if (json['content'] !== undefined) { if (json['content'] === null) { result['content'] = null; } else { result['content'] = json['content']; } } return result; } export function AssistantMessageBaseToJSON(json: any): AssistantMessageBase { return AssistantMessageBaseToJSONTyped(json, false); } export function AssistantMessageBaseToJSONTyped(value?: AssistantMessageBase | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'role': value['role'], 'parts': value['parts'] == null ? undefined : ((value['parts'] as Array).map(AssistantMessagePartToJSON)), 'content': value['content'], }; }