UNPKG

@pinecone-database/pinecone

Version:

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

71 lines 2.94 kB
"use strict"; /* tslint:disable */ /* eslint-disable */ /** * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * 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.CreateIndexForModelRequestEmbedToJSON = exports.CreateIndexForModelRequestEmbedFromJSONTyped = exports.CreateIndexForModelRequestEmbedFromJSON = exports.instanceOfCreateIndexForModelRequestEmbed = exports.CreateIndexForModelRequestEmbedMetricEnum = void 0; const runtime_1 = require("../runtime"); /** * @export */ exports.CreateIndexForModelRequestEmbedMetricEnum = { Cosine: 'cosine', Euclidean: 'euclidean', Dotproduct: 'dotproduct' }; /** * Check if a given object implements the CreateIndexForModelRequestEmbed interface. */ function instanceOfCreateIndexForModelRequestEmbed(value) { let isInstance = true; isInstance = isInstance && "model" in value; isInstance = isInstance && "fieldMap" in value; return isInstance; } exports.instanceOfCreateIndexForModelRequestEmbed = instanceOfCreateIndexForModelRequestEmbed; function CreateIndexForModelRequestEmbedFromJSON(json) { return CreateIndexForModelRequestEmbedFromJSONTyped(json, false); } exports.CreateIndexForModelRequestEmbedFromJSON = CreateIndexForModelRequestEmbedFromJSON; function CreateIndexForModelRequestEmbedFromJSONTyped(json, ignoreDiscriminator) { if ((json === undefined) || (json === null)) { return json; } return { 'model': json['model'], 'metric': !(0, runtime_1.exists)(json, 'metric') ? undefined : json['metric'], 'fieldMap': json['field_map'], 'dimension': !(0, runtime_1.exists)(json, 'dimension') ? undefined : json['dimension'], 'readParameters': !(0, runtime_1.exists)(json, 'read_parameters') ? undefined : json['read_parameters'], 'writeParameters': !(0, runtime_1.exists)(json, 'write_parameters') ? undefined : json['write_parameters'], }; } exports.CreateIndexForModelRequestEmbedFromJSONTyped = CreateIndexForModelRequestEmbedFromJSONTyped; function CreateIndexForModelRequestEmbedToJSON(value) { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'model': value.model, 'metric': value.metric, 'field_map': value.fieldMap, 'dimension': value.dimension, 'read_parameters': value.readParameters, 'write_parameters': value.writeParameters, }; } exports.CreateIndexForModelRequestEmbedToJSON = CreateIndexForModelRequestEmbedToJSON; //# sourceMappingURL=CreateIndexForModelRequestEmbed.js.map