UNPKG

@emergentmethods/asknews-typescript-sdk

Version:
52 lines (51 loc) 1.69 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. */ /** * Check if a given object implements the CreateChatCompletionRequestMessage1 interface. */ export function instanceOfCreateChatCompletionRequestMessage1(value) { if (!('role' in value) || value['role'] === undefined) return false; if (!('content' in value) || value['content'] === undefined) return false; return true; } export function CreateChatCompletionRequestMessage1FromJSON(json) { return CreateChatCompletionRequestMessage1FromJSONTyped(json, false); } export function CreateChatCompletionRequestMessage1FromJSONTyped(json, ignoreDiscriminator) { 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 CreateChatCompletionRequestMessage1ToJSON(json) { return CreateChatCompletionRequestMessage1ToJSONTyped(json, false); } export function CreateChatCompletionRequestMessage1ToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'role': value['role'], 'content': value['content'], 'name': value['name'], 'function_call': value['functionCall'], }; }