@pinecone-database/pinecone
Version:
This is the official Node.js SDK for [Pinecone](https://www.pinecone.io), written in TypeScript.
72 lines • 2.75 kB
JavaScript
/* 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.ModelIndexEmbedToJSON = exports.ModelIndexEmbedFromJSONTyped = exports.ModelIndexEmbedFromJSON = exports.instanceOfModelIndexEmbed = exports.ModelIndexEmbedMetricEnum = void 0;
const runtime_1 = require("../runtime");
/**
* @export
*/
exports.ModelIndexEmbedMetricEnum = {
Cosine: 'cosine',
Euclidean: 'euclidean',
Dotproduct: 'dotproduct'
};
/**
* Check if a given object implements the ModelIndexEmbed interface.
*/
function instanceOfModelIndexEmbed(value) {
let isInstance = true;
isInstance = isInstance && "model" in value;
return isInstance;
}
exports.instanceOfModelIndexEmbed = instanceOfModelIndexEmbed;
function ModelIndexEmbedFromJSON(json) {
return ModelIndexEmbedFromJSONTyped(json, false);
}
exports.ModelIndexEmbedFromJSON = ModelIndexEmbedFromJSON;
function ModelIndexEmbedFromJSONTyped(json, ignoreDiscriminator) {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'model': json['model'],
'metric': !(0, runtime_1.exists)(json, 'metric') ? undefined : json['metric'],
'dimension': !(0, runtime_1.exists)(json, 'dimension') ? undefined : json['dimension'],
'vectorType': !(0, runtime_1.exists)(json, 'vector_type') ? undefined : json['vector_type'],
'fieldMap': !(0, runtime_1.exists)(json, 'field_map') ? undefined : json['field_map'],
'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.ModelIndexEmbedFromJSONTyped = ModelIndexEmbedFromJSONTyped;
function ModelIndexEmbedToJSON(value) {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'model': value.model,
'metric': value.metric,
'dimension': value.dimension,
'vector_type': value.vectorType,
'field_map': value.fieldMap,
'read_parameters': value.readParameters,
'write_parameters': value.writeParameters,
};
}
exports.ModelIndexEmbedToJSON = ModelIndexEmbedToJSON;
//# sourceMappingURL=ModelIndexEmbed.js.map
;