Class: LlamaCloudRetriever
Retrievers retrieve the nodes that most closely match our query in similarity.
Implements
Constructors
constructor
• new LlamaCloudRetriever(params
): LlamaCloudRetriever
Parameters
Name | Type |
---|---|
params | { name : string ; projectName? : string ; serviceContext? : ServiceContext } & ClientParams & Omit <RetrievalParams , "query" | "searchFilters" | "pipelineId" | "className" > & { similarityTopK? : number } |
Returns
Defined in
packages/core/src/cloud/LlamaCloudRetriever.ts:37
Properties
client
• Optional
client: PlatformApiClient
Defined in
packages/core/src/cloud/LlamaCloudRetriever.ts:18
clientParams
• clientParams: ClientParams
Defined in
packages/core/src/cloud/LlamaCloudRetriever.ts:19
pipelineName
• pipelineName: string
Defined in
packages/core/src/cloud/LlamaCloudRetriever.ts:22
projectName
• projectName: string
= DEFAULT_PROJECT_NAME
Defined in
packages/core/src/cloud/LlamaCloudRetriever.ts:21
retrieveParams
• retrieveParams: CloudRetrieveParams
Defined in
packages/core/src/cloud/LlamaCloudRetriever.ts:20
serviceContext
• serviceContext: ServiceContext
Defined in
packages/core/src/cloud/LlamaCloudRetriever.ts:23
Methods
getClient
▸ getClient(): Promise
<PlatformApiClient
>
Returns
Promise
<PlatformApiClient
>
Defined in
packages/core/src/cloud/LlamaCloudRetriever.ts:50
getServiceContext
▸ getServiceContext(): ServiceContext
Returns
Implementation of
BaseRetriever.getServiceContext
Defined in
packages/core/src/cloud/LlamaCloudRetriever.ts:96
resultNodesToNodeWithScore
▸ resultNodesToNodeWithScore(nodes
): NodeWithScore
<Metadata
>[]
Parameters
Name | Type |
---|---|
nodes | TextNodeWithScore [] |
Returns
Defined in
packages/core/src/cloud/LlamaCloudRetriever.ts:25
retrieve
▸ retrieve(«destructured»
): Promise
<NodeWithScore
<Metadata
>[]>
Parameters
Name | Type |
---|---|
«destructured» | RetrieveParams |
Returns
Promise
<NodeWithScore
<Metadata
>[]>