MCPcopy Create free account
hub / github.com/astercloud/aster / WithTopK

Function WithTopK

pkg/memory/logic/types.go:144–148  ·  view source on GitHub ↗

WithTopK 限制返回数量

(k int)

Source from the content-addressed store, hash-verified

142
143// WithTopK 限制返回数量
144func WithTopK(k int) Filter {
145 return func(opts *FilterOptions) {
146 opts.MaxResults = k
147 }
148}
149
150// WithOrderBy 指定排序方式
151func WithOrderBy(orderBy OrderBy) Filter {

Callers 9

listMethod · 0.92
searchMethod · 0.92
WrapModelCallMethod · 0.92
basicUsageExampleFunction · 0.92
GetTopKMethod · 0.85
TestInMemoryStore_ListFunction · 0.85
TestRetrieveMemoriesFunction · 0.85
GetTopKMethod · 0.85
GetTopKMethod · 0.85

Calls

no outgoing calls

Tested by 2

TestInMemoryStore_ListFunction · 0.68
TestRetrieveMemoriesFunction · 0.68