UNPKG

@emergentmethods/asknews-typescript-sdk

Version:
60 lines (59 loc) 2.52 kB
"use strict"; /* tslint:disable */ /* eslint-disable */ /** * AskNews API * AskNews API * * The version of the OpenAPI document: 0.21.1 * 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. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.CreateChatCompletionRequestMessage1ToJSONTyped = exports.CreateChatCompletionRequestMessage1ToJSON = exports.CreateChatCompletionRequestMessage1FromJSONTyped = exports.CreateChatCompletionRequestMessage1FromJSON = exports.instanceOfCreateChatCompletionRequestMessage1 = void 0; /** * Check if a given object implements the CreateChatCompletionRequestMessage1 interface. */ function instanceOfCreateChatCompletionRequestMessage1(value) { if (!('role' in value) || value['role'] === undefined) return false; if (!('content' in value) || value['content'] === undefined) return false; return true; } exports.instanceOfCreateChatCompletionRequestMessage1 = instanceOfCreateChatCompletionRequestMessage1; function CreateChatCompletionRequestMessage1FromJSON(json) { return CreateChatCompletionRequestMessage1FromJSONTyped(json, false); } exports.CreateChatCompletionRequestMessage1FromJSON = CreateChatCompletionRequestMessage1FromJSON; 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'], }; } exports.CreateChatCompletionRequestMessage1FromJSONTyped = CreateChatCompletionRequestMessage1FromJSONTyped; function CreateChatCompletionRequestMessage1ToJSON(json) { return CreateChatCompletionRequestMessage1ToJSONTyped(json, false); } exports.CreateChatCompletionRequestMessage1ToJSON = CreateChatCompletionRequestMessage1ToJSON; function CreateChatCompletionRequestMessage1ToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'role': value['role'], 'content': value['content'], 'name': value['name'], 'function_call': value['functionCall'], }; } exports.CreateChatCompletionRequestMessage1ToJSONTyped = CreateChatCompletionRequestMessage1ToJSONTyped;