UNPKG

@pinecone-database/pinecone

Version:

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

79 lines 3.78 kB
"use strict"; /* tslint:disable */ /* eslint-disable */ /** * Pinecone Inference 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.ModelInfoToJSON = exports.ModelInfoFromJSONTyped = exports.ModelInfoFromJSON = exports.instanceOfModelInfo = void 0; const runtime_1 = require("../runtime"); const ModelInfoMetric_1 = require("./ModelInfoMetric"); const ModelInfoSupportedParameter_1 = require("./ModelInfoSupportedParameter"); /** * Check if a given object implements the ModelInfo interface. */ function instanceOfModelInfo(value) { let isInstance = true; isInstance = isInstance && "model" in value; isInstance = isInstance && "shortDescription" in value; isInstance = isInstance && "type" in value; isInstance = isInstance && "supportedParameters" in value; return isInstance; } exports.instanceOfModelInfo = instanceOfModelInfo; function ModelInfoFromJSON(json) { return ModelInfoFromJSONTyped(json, false); } exports.ModelInfoFromJSON = ModelInfoFromJSON; function ModelInfoFromJSONTyped(json, ignoreDiscriminator) { if ((json === undefined) || (json === null)) { return json; } return { 'model': json['model'], 'shortDescription': json['short_description'], 'type': json['type'], 'vectorType': !(0, runtime_1.exists)(json, 'vector_type') ? undefined : json['vector_type'], 'defaultDimension': !(0, runtime_1.exists)(json, 'default_dimension') ? undefined : json['default_dimension'], 'modality': !(0, runtime_1.exists)(json, 'modality') ? undefined : json['modality'], 'maxSequenceLength': !(0, runtime_1.exists)(json, 'max_sequence_length') ? undefined : json['max_sequence_length'], 'maxBatchSize': !(0, runtime_1.exists)(json, 'max_batch_size') ? undefined : json['max_batch_size'], 'providerName': !(0, runtime_1.exists)(json, 'provider_name') ? undefined : json['provider_name'], 'supportedDimensions': !(0, runtime_1.exists)(json, 'supported_dimensions') ? undefined : json['supported_dimensions'], 'supportedMetrics': !(0, runtime_1.exists)(json, 'supported_metrics') ? undefined : (json['supported_metrics'].map(ModelInfoMetric_1.ModelInfoMetricFromJSON)), 'supportedParameters': (json['supported_parameters'].map(ModelInfoSupportedParameter_1.ModelInfoSupportedParameterFromJSON)), }; } exports.ModelInfoFromJSONTyped = ModelInfoFromJSONTyped; function ModelInfoToJSON(value) { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'model': value.model, 'short_description': value.shortDescription, 'type': value.type, 'vector_type': value.vectorType, 'default_dimension': value.defaultDimension, 'modality': value.modality, 'max_sequence_length': value.maxSequenceLength, 'max_batch_size': value.maxBatchSize, 'provider_name': value.providerName, 'supported_dimensions': value.supportedDimensions, 'supported_metrics': value.supportedMetrics === undefined ? undefined : (value.supportedMetrics.map(ModelInfoMetric_1.ModelInfoMetricToJSON)), 'supported_parameters': (value.supportedParameters.map(ModelInfoSupportedParameter_1.ModelInfoSupportedParameterToJSON)), }; } exports.ModelInfoToJSON = ModelInfoToJSON; //# sourceMappingURL=ModelInfo.js.map