UNPKG

@emergentmethods/asknews-typescript-sdk

Version:
92 lines (81 loc) 2.53 kB
/* tslint:disable */ /* eslint-disable */ /** * AskNews API * AskNews API * * The version of the OpenAPI document: 0.19.10 * Contact: contact@emergentmethods.ai * * 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 CreateDeepNewsRequestMessage1 */ export interface CreateDeepNewsRequestMessage1 { /** * * @type {string} * @memberof CreateDeepNewsRequestMessage1 */ role: string; /** * * @type {string} * @memberof CreateDeepNewsRequestMessage1 */ content: string; /** * * @type {string} * @memberof CreateDeepNewsRequestMessage1 */ name?: string | null; /** * * @type {{ [key: string]: any; }} * @memberof CreateDeepNewsRequestMessage1 */ functionCall?: { [key: string]: any; } | null; } /** * Check if a given object implements the CreateDeepNewsRequestMessage1 interface. */ export function instanceOfCreateDeepNewsRequestMessage1(value: object): value is CreateDeepNewsRequestMessage1 { if (!('role' in value) || value['role'] === undefined) return false; if (!('content' in value) || value['content'] === undefined) return false; return true; } export function CreateDeepNewsRequestMessage1FromJSON(json: any): CreateDeepNewsRequestMessage1 { return CreateDeepNewsRequestMessage1FromJSONTyped(json, false); } export function CreateDeepNewsRequestMessage1FromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateDeepNewsRequestMessage1 { if (json == null) { return json; } return { 'role': json['role'], 'content': json['content'], 'name': json['name'] == null ? undefined : json['name'], 'functionCall': json['function_call'] == null ? undefined : json['function_call'], }; } export function CreateDeepNewsRequestMessage1ToJSON(json: any): CreateDeepNewsRequestMessage1 { return CreateDeepNewsRequestMessage1ToJSONTyped(json, false); } export function CreateDeepNewsRequestMessage1ToJSONTyped(value?: CreateDeepNewsRequestMessage1 | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'role': value['role'], 'content': value['content'], 'name': value['name'], 'function_call': value['functionCall'], }; }