@pinecone-database/pinecone
Version:
This is the official Node.js SDK for [Pinecone](https://www.pinecone.io), written in TypeScript.
65 lines • 2.34 kB
JavaScript
/* tslint:disable */
/* eslint-disable */
/**
* Pinecone Assistant Data Plane API
* Pinecone Assistant Engine is a context engine to store and retrieve relevant knowledge from millions of documents at scale. This API supports interactions with assistants.
*
* The version of the OpenAPI document: 2025-04
* Contact: support@pinecone.io
*
* 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.ChoiceModelToJSON = exports.ChoiceModelFromJSONTyped = exports.ChoiceModelFromJSON = exports.instanceOfChoiceModel = exports.ChoiceModelFinishReasonEnum = void 0;
const runtime_1 = require("../runtime");
const MessageModel_1 = require("./MessageModel");
/**
* @export
*/
exports.ChoiceModelFinishReasonEnum = {
Stop: 'stop',
Length: 'length',
ContentFilter: 'content_filter',
FunctionCall: 'function_call'
};
/**
* Check if a given object implements the ChoiceModel interface.
*/
function instanceOfChoiceModel(value) {
let isInstance = true;
return isInstance;
}
exports.instanceOfChoiceModel = instanceOfChoiceModel;
function ChoiceModelFromJSON(json) {
return ChoiceModelFromJSONTyped(json, false);
}
exports.ChoiceModelFromJSON = ChoiceModelFromJSON;
function ChoiceModelFromJSONTyped(json, ignoreDiscriminator) {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'finishReason': !(0, runtime_1.exists)(json, 'finish_reason') ? undefined : json['finish_reason'],
'index': !(0, runtime_1.exists)(json, 'index') ? undefined : json['index'],
'message': !(0, runtime_1.exists)(json, 'message') ? undefined : (0, MessageModel_1.MessageModelFromJSON)(json['message']),
};
}
exports.ChoiceModelFromJSONTyped = ChoiceModelFromJSONTyped;
function ChoiceModelToJSON(value) {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'finish_reason': value.finishReason,
'index': value.index,
'message': (0, MessageModel_1.MessageModelToJSON)(value.message),
};
}
exports.ChoiceModelToJSON = ChoiceModelToJSON;
//# sourceMappingURL=ChoiceModel.js.map
;