UNPKG

@pinecone-database/pinecone

Version:

This is the official Node.js SDK for [Pinecone](https://www.pinecone.io), written in TypeScript.

59 lines 2.21 kB
"use strict"; /* 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.ContextModelToJSON = exports.ContextModelFromJSONTyped = exports.ContextModelFromJSON = exports.instanceOfContextModel = void 0; const runtime_1 = require("../runtime"); const SnippetModel_1 = require("./SnippetModel"); const UsageModel_1 = require("./UsageModel"); /** * Check if a given object implements the ContextModel interface. */ function instanceOfContextModel(value) { let isInstance = true; isInstance = isInstance && "snippets" in value; isInstance = isInstance && "usage" in value; return isInstance; } exports.instanceOfContextModel = instanceOfContextModel; function ContextModelFromJSON(json) { return ContextModelFromJSONTyped(json, false); } exports.ContextModelFromJSON = ContextModelFromJSON; function ContextModelFromJSONTyped(json, ignoreDiscriminator) { if ((json === undefined) || (json === null)) { return json; } return { 'id': !(0, runtime_1.exists)(json, 'id') ? undefined : json['id'], 'snippets': (json['snippets'].map(SnippetModel_1.SnippetModelFromJSON)), 'usage': (0, UsageModel_1.UsageModelFromJSON)(json['usage']), }; } exports.ContextModelFromJSONTyped = ContextModelFromJSONTyped; function ContextModelToJSON(value) { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'id': value.id, 'snippets': (value.snippets.map(SnippetModel_1.SnippetModelToJSON)), 'usage': (0, UsageModel_1.UsageModelToJSON)(value.usage), }; } exports.ContextModelToJSON = ContextModelToJSON; //# sourceMappingURL=ContextModel.js.map