@pinecone-database/pinecone
Version:
This is the official Node.js SDK for [Pinecone](https://www.pinecone.io), written in TypeScript.
66 lines • 2.2 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.SnippetModelToJSON = exports.SnippetModelFromJSONTyped = exports.SnippetModelFromJSON = exports.instanceOfSnippetModel = exports.SnippetModelTypeEnum = void 0;
const runtime_1 = require("../runtime");
/**
* @export
*/
exports.SnippetModelTypeEnum = {
Text: 'text'
};
/**
* Check if a given object implements the SnippetModel interface.
*/
function instanceOfSnippetModel(value) {
let isInstance = true;
isInstance = isInstance && "content" in value;
isInstance = isInstance && "score" in value;
isInstance = isInstance && "reference" in value;
return isInstance;
}
exports.instanceOfSnippetModel = instanceOfSnippetModel;
function SnippetModelFromJSON(json) {
return SnippetModelFromJSONTyped(json, false);
}
exports.SnippetModelFromJSON = SnippetModelFromJSON;
function SnippetModelFromJSONTyped(json, ignoreDiscriminator) {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'type': !(0, runtime_1.exists)(json, 'type') ? undefined : json['type'],
'content': json['content'],
'score': json['score'],
'reference': json['reference'],
};
}
exports.SnippetModelFromJSONTyped = SnippetModelFromJSONTyped;
function SnippetModelToJSON(value) {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'type': value.type,
'content': value.content,
'score': value.score,
'reference': value.reference,
};
}
exports.SnippetModelToJSON = SnippetModelToJSON;
//# sourceMappingURL=SnippetModel.js.map
;