UNPKG

@pinecone-database/pinecone

Version:

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

81 lines (80 loc) 3.16 kB
/** * 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 { IndexSpec } from './IndexSpec'; /** * The configuration needed to create a Pinecone index. * @export * @interface CreateIndexRequest */ export interface CreateIndexRequest { /** * 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 CreateIndexRequest */ name: string; /** * The dimensions of the vectors to be inserted in the index. * @type {number} * @memberof CreateIndexRequest */ 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 CreateIndexRequest */ metric?: CreateIndexRequestMetricEnum; /** * * @type {DeletionProtection} * @memberof CreateIndexRequest */ 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 CreateIndexRequest */ tags?: { [key: string]: string; }; /** * * @type {IndexSpec} * @memberof CreateIndexRequest */ spec: IndexSpec | null; /** * 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 CreateIndexRequest */ vectorType?: string; } /** * @export */ export declare const CreateIndexRequestMetricEnum: { readonly Cosine: "cosine"; readonly Euclidean: "euclidean"; readonly Dotproduct: "dotproduct"; }; export type CreateIndexRequestMetricEnum = typeof CreateIndexRequestMetricEnum[keyof typeof CreateIndexRequestMetricEnum]; /** * Check if a given object implements the CreateIndexRequest interface. */ export declare function instanceOfCreateIndexRequest(value: object): boolean; export declare function CreateIndexRequestFromJSON(json: any): CreateIndexRequest; export declare function CreateIndexRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateIndexRequest; export declare function CreateIndexRequestToJSON(value?: CreateIndexRequest | null): any;