UNPKG

@emergentmethods/asknews-typescript-sdk

Version:
51 lines (50 loc) 1.95 kB
/* tslint:disable */ /* eslint-disable */ /** * AskNews API * AskNews API [![status](https://status.asknews.app/api/badge/2/status?style=for-the-badge)](https://status.asknews.app/status/prod) * * The version of the OpenAPI document: 0.24.22 * 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 { CreateChatCompletionRequestMessage1FromJSON, CreateChatCompletionRequestMessage1ToJSON, } from './CreateChatCompletionRequestMessage1'; /** * Check if a given object implements the CreateChatCompletionResponseChoice1 interface. */ export function instanceOfCreateChatCompletionResponseChoice1(value) { if (!('index' in value) || value['index'] === undefined) return false; if (!('message' in value) || value['message'] === undefined) return false; return true; } export function CreateChatCompletionResponseChoice1FromJSON(json) { return CreateChatCompletionResponseChoice1FromJSONTyped(json, false); } export function CreateChatCompletionResponseChoice1FromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'index': json['index'], 'message': CreateChatCompletionRequestMessage1FromJSON(json['message']), 'finishReason': json['finish_reason'] == null ? undefined : json['finish_reason'], }; } export function CreateChatCompletionResponseChoice1ToJSON(json) { return CreateChatCompletionResponseChoice1ToJSONTyped(json, false); } export function CreateChatCompletionResponseChoice1ToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'index': value['index'], 'message': CreateChatCompletionRequestMessage1ToJSON(value['message']), 'finish_reason': value['finishReason'], }; }