Install and import from @langchain/qdrant instead.

Interface for the arguments that can be passed to the QdrantVectorStore constructor. It includes options for specifying a QdrantClient instance, the URL and API key for a Qdrant database, and the name and configuration for a collection.

interface QdrantLibArgs {
    apiKey?: string;
    client?: QdrantClient;
    collectionConfig?: {
        hnsw_config?: null | Record<string, unknown> | {
            ef_construct?: null | number;
            full_scan_threshold?: null | number;
            m?: null | number;
            max_indexing_threads?: null | number;
            on_disk?: null | boolean;
            payload_m?: null | number;
        };
        init_from?: null | Record<string, unknown> | {
            collection: string;
        };
        on_disk_payload?: null | boolean;
        optimizers_config?: null | Record<string, unknown> | {
            default_segment_number?: null | number;
            deleted_threshold?: null | number;
            flush_interval_sec?: null | number;
            indexing_threshold?: null | number;
            max_optimization_threads?: null | number;
            max_segment_size?: null | number;
            memmap_threshold?: null | number;
            vacuum_min_vector_number?: null | number;
        };
        quantization_config?:
            | null
            | Record<string, unknown>
            | {
                scalar: {
                    always_ram?: null | boolean;
                    quantile?: null | number;
                    type: "int8";
                };
            }
            | {
                product: {
                    always_ram?: null | boolean;
                    compression:
                        | "x4"
                        | "x8"
                        | "x16"
                        | "x32"
                        | "x64";
                };
            }
            | {
                binary: {
                    always_ram?: null | boolean;
                };
            };
        replication_factor?: null | number;
        shard_number?: null | number;
        sharding_method?:
            | null
            | Record<string, unknown>
            | "auto"
            | "custom";
        sparse_vectors?: null | {
            [key: string]: components["schemas"]["SparseVectorParams"] | undefined;
        };
        vectors?: {
            datatype?:
                | null
                | Record<string, unknown>
                | "float32"
                | "uint8";
            distance:
                | "Cosine"
                | "Euclid"
                | "Dot"
                | "Manhattan";
            hnsw_config?: null | Record<string, unknown> | {
                ef_construct?: null | number;
                full_scan_threshold?: null | number;
                m?: null | number;
                max_indexing_threads?: null | number;
                on_disk?: null | boolean;
                payload_m?: null | number;
            };
            on_disk?: null | boolean;
            quantization_config?:
                | null
                | Record<string, unknown>
                | {
                    scalar: {
                        always_ram?: null | boolean;
                        quantile?: null | number;
                        type: "int8";
                    };
                }
                | {
                    product: {
                        always_ram?: null | boolean;
                        compression:
                            | "x4"
                            | "x8"
                            | "x16"
                            | "x32"
                            | "x64";
                    };
                }
                | {
                    binary: {
                        always_ram?: null | boolean;
                    };
                };
            size: number;
        } | {
            [key: string]: components["schemas"]["VectorParams"] | undefined;
        };
        wal_config?: null | Record<string, unknown> | {
            wal_capacity_mb?: null | number;
            wal_segments_ahead?: null | number;
        };
        write_consistency_factor?: null | number;
    };
    collectionName?: string;
    contentPayloadKey?: string;
    customPayload?: Record<string, any>[];
    metadataPayloadKey?: string;
    url?: string;
}

Properties

apiKey?: string
client?: QdrantClient
collectionConfig?: {
    hnsw_config?: null | Record<string, unknown> | {
        ef_construct?: null | number;
        full_scan_threshold?: null | number;
        m?: null | number;
        max_indexing_threads?: null | number;
        on_disk?: null | boolean;
        payload_m?: null | number;
    };
    init_from?: null | Record<string, unknown> | {
        collection: string;
    };
    on_disk_payload?: null | boolean;
    optimizers_config?: null | Record<string, unknown> | {
        default_segment_number?: null | number;
        deleted_threshold?: null | number;
        flush_interval_sec?: null | number;
        indexing_threshold?: null | number;
        max_optimization_threads?: null | number;
        max_segment_size?: null | number;
        memmap_threshold?: null | number;
        vacuum_min_vector_number?: null | number;
    };
    quantization_config?:
        | null
        | Record<string, unknown>
        | {
            scalar: {
                always_ram?: null | boolean;
                quantile?: null | number;
                type: "int8";
            };
        }
        | {
            product: {
                always_ram?: null | boolean;
                compression:
                    | "x4"
                    | "x8"
                    | "x16"
                    | "x32"
                    | "x64";
            };
        }
        | {
            binary: {
                always_ram?: null | boolean;
            };
        };
    replication_factor?: null | number;
    shard_number?: null | number;
    sharding_method?:
        | null
        | Record<string, unknown>
        | "auto"
        | "custom";
    sparse_vectors?: null | {
        [key: string]: components["schemas"]["SparseVectorParams"] | undefined;
    };
    vectors?: {
        datatype?:
            | null
            | Record<string, unknown>
            | "float32"
            | "uint8";
        distance:
            | "Cosine"
            | "Euclid"
            | "Dot"
            | "Manhattan";
        hnsw_config?: null | Record<string, unknown> | {
            ef_construct?: null | number;
            full_scan_threshold?: null | number;
            m?: null | number;
            max_indexing_threads?: null | number;
            on_disk?: null | boolean;
            payload_m?: null | number;
        };
        on_disk?: null | boolean;
        quantization_config?:
            | null
            | Record<string, unknown>
            | {
                scalar: {
                    always_ram?: null | boolean;
                    quantile?: null | number;
                    type: "int8";
                };
            }
            | {
                product: {
                    always_ram?: null | boolean;
                    compression:
                        | "x4"
                        | "x8"
                        | "x16"
                        | "x32"
                        | "x64";
                };
            }
            | {
                binary: {
                    always_ram?: null | boolean;
                };
            };
        size: number;
    } | {
        [key: string]: components["schemas"]["VectorParams"] | undefined;
    };
    wal_config?: null | Record<string, unknown> | {
        wal_capacity_mb?: null | number;
        wal_segments_ahead?: null | number;
    };
    write_consistency_factor?: null | number;
}

Type declaration

  • Optionalhnsw_config?: null | Record<string, unknown> | {
        ef_construct?: null | number;
        full_scan_threshold?: null | number;
        m?: null | number;
        max_indexing_threads?: null | number;
        on_disk?: null | boolean;
        payload_m?: null | number;
    }

    Custom params for HNSW index. If none - values from service configuration file are used.

  • Optionalinit_from?: null | Record<string, unknown> | {
        collection: string;
    }

    Specify other collection to copy data from.

    null
    
  • Optionalon_disk_payload?: null | boolean

    If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.

    null
    
  • Optionaloptimizers_config?: null | Record<string, unknown> | {
        default_segment_number?: null | number;
        deleted_threshold?: null | number;
        flush_interval_sec?: null | number;
        indexing_threshold?: null | number;
        max_optimization_threads?: null | number;
        max_segment_size?: null | number;
        memmap_threshold?: null | number;
        vacuum_min_vector_number?: null | number;
    }

    Custom params for Optimizers. If none - values from service configuration file are used.

  • Optionalquantization_config?:
        | null
        | Record<string, unknown>
        | {
            scalar: {
                always_ram?: null | boolean;
                quantile?: null | number;
                type: "int8";
            };
        }
        | {
            product: {
                always_ram?: null | boolean;
                compression:
                    | "x4"
                    | "x8"
                    | "x16"
                    | "x32"
                    | "x64";
            };
        }
        | {
            binary: {
                always_ram?: null | boolean;
            };
        }

    Quantization parameters. If none - quantization is disabled.

    null
    
  • Optionalreplication_factor?: null | number

    Format: uint32

    Number of shards replicas. Default is 1 Minimum is 1

    null
    
  • Optionalshard_number?: null | number

    Format: uint32

    For auto sharding: Number of shards in collection. - Default is 1 for standalone, otherwise equal to the number of nodes - Minimum is 1 For custom sharding: Number of shards in collection per shard group. - Default is 1, meaning that each shard key will be mapped to a single shard - Minimum is 1

    null
    
  • Optionalsharding_method?:
        | null
        | Record<string, unknown>
        | "auto"
        | "custom"

    Sharding method Default is Auto - points are distributed across all available shards Custom - points are distributed across shards according to shard key

    null
    
  • Optionalsparse_vectors?: null | {
        [key: string]: components["schemas"]["SparseVectorParams"] | undefined;
    }

    Sparse vector data config.

  • Optionalvectors?: {
        datatype?:
            | null
            | Record<string, unknown>
            | "float32"
            | "uint8";
        distance:
            | "Cosine"
            | "Euclid"
            | "Dot"
            | "Manhattan";
        hnsw_config?: null | Record<string, unknown> | {
            ef_construct?: null | number;
            full_scan_threshold?: null | number;
            m?: null | number;
            max_indexing_threads?: null | number;
            on_disk?: null | boolean;
            payload_m?: null | number;
        };
        on_disk?: null | boolean;
        quantization_config?:
            | null
            | Record<string, unknown>
            | {
                scalar: {
                    always_ram?: null | boolean;
                    quantile?: null | number;
                    type: "int8";
                };
            }
            | {
                product: {
                    always_ram?: null | boolean;
                    compression:
                        | "x4"
                        | "x8"
                        | "x16"
                        | "x32"
                        | "x64";
                };
            }
            | {
                binary: {
                    always_ram?: null | boolean;
                };
            };
        size: number;
    } | {
        [key: string]: components["schemas"]["VectorParams"] | undefined;
    }
  • Optionalwal_config?: null | Record<string, unknown> | {
        wal_capacity_mb?: null | number;
        wal_segments_ahead?: null | number;
    }

    Custom params for WAL. If none - values from service configuration file are used.

  • Optionalwrite_consistency_factor?: null | number

    Format: uint32

    Defines how many replicas should apply the operation for us to consider it successful. Increasing this number will make the collection more resilient to inconsistencies, but will also make it fail if not enough replicas are available. Does not have any performance impact.

    null
    
collectionName?: string
contentPayloadKey?: string
customPayload?: Record<string, any>[]
metadataPayloadKey?: string
url?: string