File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -558,14 +558,17 @@ export class RAG<
558
558
ctx : RunQueryCtx ,
559
559
args : {
560
560
namespaceId ?: NamespaceId ;
561
- paginationOpts : PaginationOptions ;
562
561
order ?: "desc" | "asc" ;
563
562
status ?: Status ;
564
- }
563
+ } & ( { paginationOpts : PaginationOptions } | { limit : number } )
565
564
) : Promise < PaginationResult < Entry < FitlerSchemas , EntryMetadata > > > {
565
+ const paginationOpts =
566
+ "paginationOpts" in args
567
+ ? args . paginationOpts
568
+ : { cursor : null , numItems : args . limit } ;
566
569
const results = await ctx . runQuery ( this . component . entries . list , {
567
570
namespaceId : args . namespaceId ,
568
- paginationOpts : args . paginationOpts ,
571
+ paginationOpts,
569
572
order : args . order ?? "asc" ,
570
573
status : args . status ?? "ready" ,
571
574
} ) ;
You can’t perform that action at this time.
0 commit comments