@pinecone-database/pinecone
Version:
This is the official Node.js SDK for [Pinecone](https://www.pinecone.io), written in TypeScript.
107 lines (106 loc) • 3.63 kB
TypeScript
/**
* 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.
*/
import type { DeletionProtection } from './DeletionProtection';
import type { IndexModelSpec } from './IndexModelSpec';
import type { IndexModelStatus } from './IndexModelStatus';
import type { ModelIndexEmbed } from './ModelIndexEmbed';
/**
* The IndexModel describes the configuration and status of a Pinecone index.
* @export
* @interface IndexModel
*/
export interface IndexModel {
/**
* The name of the index. Resource name must be 1-45 characters long, start and end with an alphanumeric character, and consist only of lower case alphanumeric characters or '-'.
* @type {string}
* @memberof IndexModel
*/
name: string;
/**
* The dimensions of the vectors to be inserted in the index.
* @type {number}
* @memberof IndexModel
*/
dimension?: number;
/**
* The distance metric to be used for similarity search. You can use 'euclidean', 'cosine', or 'dotproduct'. If the 'vector_type' is 'sparse', the metric must be 'dotproduct'. If the `vector_type` is `dense`, the metric defaults to 'cosine'.
* @type {string}
* @memberof IndexModel
*/
metric: IndexModelMetricEnum;
/**
* The URL address where the index is hosted.
* @type {string}
* @memberof IndexModel
*/
host: string;
/**
* The private endpoint URL of an index.
* @type {string}
* @memberof IndexModel
*/
privateHost?: string;
/**
*
* @type {DeletionProtection}
* @memberof IndexModel
*/
deletionProtection?: DeletionProtection;
/**
* Custom user tags added to an index. Keys must be 80 characters or less. Values must be 120 characters or less. Keys must be alphanumeric, '_', or '-'. Values must be alphanumeric, ';', '@', '_', '-', '.', '+', or ' '. To unset a key, set the value to be an empty string.
* @type {{ [key: string]: string; }}
* @memberof IndexModel
*/
tags?: {
[key: string]: string;
};
/**
*
* @type {ModelIndexEmbed}
* @memberof IndexModel
*/
embed?: ModelIndexEmbed;
/**
*
* @type {IndexModelSpec}
* @memberof IndexModel
*/
spec: IndexModelSpec;
/**
*
* @type {IndexModelStatus}
* @memberof IndexModel
*/
status: IndexModelStatus;
/**
* The index vector type. You can use 'dense' or 'sparse'. If 'dense', the vector dimension must be specified. If 'sparse', the vector dimension should not be specified.
* @type {string}
* @memberof IndexModel
*/
vectorType: string;
}
/**
* @export
*/
export declare const IndexModelMetricEnum: {
readonly Cosine: "cosine";
readonly Euclidean: "euclidean";
readonly Dotproduct: "dotproduct";
};
export type IndexModelMetricEnum = typeof IndexModelMetricEnum[keyof typeof IndexModelMetricEnum];
/**
* Check if a given object implements the IndexModel interface.
*/
export declare function instanceOfIndexModel(value: object): boolean;
export declare function IndexModelFromJSON(json: any): IndexModel;
export declare function IndexModelFromJSONTyped(json: any, ignoreDiscriminator: boolean): IndexModel;
export declare function IndexModelToJSON(value?: IndexModel | null): any;