Skip to main content

Class: LlamaCloudIndex

Constructors

new LlamaCloudIndex()

new LlamaCloudIndex(params): LlamaCloudIndex

Parameters

params: CloudConstructorParams

Returns

LlamaCloudIndex

Defined in

packages/llamaindex/src/cloud/LlamaCloudIndex.ts:33

Properties

params

params: CloudConstructorParams

Defined in

packages/llamaindex/src/cloud/LlamaCloudIndex.ts:31

Methods

addDocuments()

addDocuments(documents, verbose?): Promise<void>

Parameters

documents: Document<Metadata>[]

verbose?: boolean

Returns

Promise<void>

Defined in

packages/llamaindex/src/cloud/LlamaCloudIndex.ts:193


asQueryEngine()

asQueryEngine(params?): BaseQueryEngine

Parameters

params?: object & Omit<RetrievalParams, "query" | "search_filters" | "dense_similarity_top_k"> & object

Returns

BaseQueryEngine

Defined in

packages/llamaindex/src/cloud/LlamaCloudIndex.ts:257


asRetriever()

asRetriever(params): BaseRetriever

Parameters

params: CloudRetrieveParams = {}

Returns

BaseRetriever

Defined in

packages/llamaindex/src/cloud/LlamaCloudIndex.ts:253


delete()

delete(document): Promise<void>

Parameters

document: Document<Metadata>

Returns

Promise<void>

Defined in

packages/llamaindex/src/cloud/LlamaCloudIndex.ts:296


ensureIndex()

ensureIndex(config?): Promise<void>

Parameters

config?

config.embedding?: null | AzureOpenAIEmbeddingConfig | CohereEmbeddingConfig | GeminiEmbeddingConfig | HuggingFaceInferenceAPIEmbeddingConfig | OpenAIEmbeddingConfig | VertexAIEmbeddingConfig | BedrockEmbeddingConfig

config.transform?: null | AutoTransformConfig | AdvancedModeTransformConfig

config.verbose?: boolean

Returns

Promise<void>

Defined in

packages/llamaindex/src/cloud/LlamaCloudIndex.ts:332


getPipelineId()

getPipelineId(name?, projectName?, organizationId?): Promise<string>

Parameters

name?: string

projectName?: string

organizationId?: string

Returns

Promise<string>

Defined in

packages/llamaindex/src/cloud/LlamaCloudIndex.ts:146


getProjectId()

getProjectId(projectName?, organizationId?): Promise<string>

Parameters

projectName?: string

organizationId?: string

Returns

Promise<string>

Defined in

packages/llamaindex/src/cloud/LlamaCloudIndex.ts:158


insert()

insert(document): Promise<void>

Parameters

document: Document<Metadata>

Returns

Promise<void>

Defined in

packages/llamaindex/src/cloud/LlamaCloudIndex.ts:275


refreshDoc()

refreshDoc(document): Promise<void>

Parameters

document: Document<Metadata>

Returns

Promise<void>

Defined in

packages/llamaindex/src/cloud/LlamaCloudIndex.ts:311


fromDocuments()

static fromDocuments(params, config?): Promise<LlamaCloudIndex>

Adds documents to the given index parameters. If the index does not exist, it will be created.

Parameters

params: object & object & ClientParams

An object containing the following properties:

  • documents: An array of Document objects to be added to the index.
  • verbose: Optional boolean to enable verbose logging.
  • Additional properties from CloudConstructorParams.

config?

config.embedding?: undefined | null | AzureOpenAIEmbeddingConfig | CohereEmbeddingConfig | GeminiEmbeddingConfig | HuggingFaceInferenceAPIEmbeddingConfig | OpenAIEmbeddingConfig | VertexAIEmbeddingConfig | BedrockEmbeddingConfig

config.transform?: undefined | null | AutoTransformConfig | AdvancedModeTransformConfig

Returns

Promise<LlamaCloudIndex>

A Promise that resolves to a new LlamaCloudIndex instance.

Defined in

packages/llamaindex/src/cloud/LlamaCloudIndex.ts:177