跳到主要内容

Class: ChromaVectorStore

Implements

Constructors

new ChromaVectorStore()

new ChromaVectorStore(init): ChromaVectorStore

Parameters

init

init.chromaClientParams?: ChromaClientParams

init.collectionName: string

init.textKey?: string

Returns

ChromaVectorStore

Source

packages/core/src/storage/vectorStore/ChromaVectorStore.ts:39

Properties

chromaClient

private chromaClient: ChromaClient

Source

packages/core/src/storage/vectorStore/ChromaVectorStore.ts:35


collection

private collection: null | Collection = null

Source

packages/core/src/storage/vectorStore/ChromaVectorStore.ts:36


collectionName

private collectionName: string

Source

packages/core/src/storage/vectorStore/ChromaVectorStore.ts:37


flatMetadata

flatMetadata: boolean = true

Source

packages/core/src/storage/vectorStore/ChromaVectorStore.ts:33


storesText

storesText: boolean = true

Implementation of

VectorStore . storesText

Source

packages/core/src/storage/vectorStore/ChromaVectorStore.ts:32


textKey

textKey: string

Source

packages/core/src/storage/vectorStore/ChromaVectorStore.ts:34

Methods

add()

add(nodes): Promise<string[]>

Parameters

nodes: BaseNode <Metadata>[]

Returns

Promise<string[]>

Implementation of

VectorStore . add

Source

packages/core/src/storage/vectorStore/ChromaVectorStore.ts:75


client()

client(): ChromaClient

Returns

ChromaClient

Implementation of

VectorStore . client

Source

packages/core/src/storage/vectorStore/ChromaVectorStore.ts:49


delete()

delete(refDocId, deleteOptions?): Promise<void>

Parameters

refDocId: string

deleteOptions?: ChromaDeleteOptions

Returns

Promise<void>

Implementation of

VectorStore . delete

Source

packages/core/src/storage/vectorStore/ChromaVectorStore.ts:86


getCollection()

getCollection(): Promise<Collection>

Returns

Promise<Collection>

Source

packages/core/src/storage/vectorStore/ChromaVectorStore.ts:53


getDataToInsert()

private getDataToInsert(nodes): AddParams

Parameters

nodes: BaseNode <Metadata>[]

Returns

AddParams

Source

packages/core/src/storage/vectorStore/ChromaVectorStore.ts:63


query()

query(query, options?): Promise <VectorStoreQueryResult>

Parameters

query: VectorStoreQuery

options?: ChromaQueryOptions

Returns

Promise <VectorStoreQueryResult>

Implementation of

VectorStore . query

Source

packages/core/src/storage/vectorStore/ChromaVectorStore.ts:98