UNPKG

@emergentmethods/asknews-typescript-sdk

Version:
92 lines (81 loc) 2.62 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 CreateChatCompletionRequestMessage */ export interface CreateChatCompletionRequestMessage { /** * * @type {string} * @memberof CreateChatCompletionRequestMessage */ role: string; /** * * @type {string} * @memberof CreateChatCompletionRequestMessage */ content: string; /** * * @type {string} * @memberof CreateChatCompletionRequestMessage */ name?: string | null; /** * * @type {{ [key: string]: any; }} * @memberof CreateChatCompletionRequestMessage */ functionCall?: { [key: string]: any; } | null; } /** * Check if a given object implements the CreateChatCompletionRequestMessage interface. */ export function instanceOfCreateChatCompletionRequestMessage(value: object): value is CreateChatCompletionRequestMessage { if (!('role' in value) || value['role'] === undefined) return false; if (!('content' in value) || value['content'] === undefined) return false; return true; } export function CreateChatCompletionRequestMessageFromJSON(json: any): CreateChatCompletionRequestMessage { return CreateChatCompletionRequestMessageFromJSONTyped(json, false); } export function CreateChatCompletionRequestMessageFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateChatCompletionRequestMessage { 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 CreateChatCompletionRequestMessageToJSON(json: any): CreateChatCompletionRequestMessage { return CreateChatCompletionRequestMessageToJSONTyped(json, false); } export function CreateChatCompletionRequestMessageToJSONTyped(value?: CreateChatCompletionRequestMessage | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'role': value['role'], 'content': value['content'], 'name': value['name'], 'function_call': value['functionCall'], }; }