Nhảy tới nội dung

Class: LlamaCloudRetriever

Retrievers retrieve the nodes that most closely match our query in similarity.

Implements

Constructors

constructor

new LlamaCloudRetriever(params): LlamaCloudRetriever

Parameters

NameType
params{ name: string ; projectName?: string ; serviceContext?: ServiceContext } & ClientParams & Omit<RetrievalParams, "query" | "searchFilters" | "pipelineId" | "className"> & { similarityTopK?: number }

Returns

LlamaCloudRetriever

Defined in

packages/core/src/cloud/LlamaCloudRetriever.ts:39

Properties

client

Optional client: PlatformApiClient

Defined in

packages/core/src/cloud/LlamaCloudRetriever.ts:20


clientParams

clientParams: ClientParams

Defined in

packages/core/src/cloud/LlamaCloudRetriever.ts:21


pipelineName

pipelineName: string

Defined in

packages/core/src/cloud/LlamaCloudRetriever.ts:24


projectName

projectName: string = DEFAULT_PROJECT_NAME

Defined in

packages/core/src/cloud/LlamaCloudRetriever.ts:23


retrieveParams

retrieveParams: RetrieveParams

Defined in

packages/core/src/cloud/LlamaCloudRetriever.ts:22


serviceContext

serviceContext: ServiceContext

Defined in

packages/core/src/cloud/LlamaCloudRetriever.ts:25

Methods

getClient

getClient(): Promise<PlatformApiClient>

Returns

Promise<PlatformApiClient>

Defined in

packages/core/src/cloud/LlamaCloudRetriever.ts:51


getServiceContext

getServiceContext(): ServiceContext

Returns

ServiceContext

Implementation of

BaseRetriever.getServiceContext

Defined in

packages/core/src/cloud/LlamaCloudRetriever.ts:97


resultNodesToNodeWithScore

resultNodesToNodeWithScore(nodes): NodeWithScore<Metadata>[]

Parameters

NameType
nodesTextNodeWithScore[]

Returns

NodeWithScore<Metadata>[]

Defined in

packages/core/src/cloud/LlamaCloudRetriever.ts:27


retrieve

retrieve(query, parentEvent?, preFilters?): Promise<NodeWithScore<Metadata>[]>

Parameters

NameType
querystring
parentEvent?Event
preFilters?unknown

Returns

Promise<NodeWithScore<Metadata>[]>

Implementation of

BaseRetriever.retrieve

Defined in

packages/core/src/cloud/LlamaCloudRetriever.ts:58