-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce pagination for list sources.
- Loading branch information
1 parent
cd2755a
commit 132afbc
Showing
3 changed files
with
116 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
.../java/org/mule/extension/mulechain/vectors/internal/helper/parameter/QueryParameters.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package org.mule.extension.mulechain.vectors.internal.helper.parameter; | ||
|
||
import org.mule.runtime.api.meta.ExpressionSupport; | ||
import org.mule.runtime.extension.api.annotation.Expression; | ||
import org.mule.runtime.extension.api.annotation.param.Optional; | ||
import org.mule.runtime.extension.api.annotation.param.Parameter; | ||
import org.mule.runtime.extension.api.annotation.param.display.Summary; | ||
|
||
public class QueryParameters { | ||
|
||
@Parameter | ||
@Expression(ExpressionSupport.SUPPORTED) | ||
@Summary("The embedding page size used when querying the vector store. Defaults to 5000 embeddings.") | ||
@Optional(defaultValue = "5000") | ||
private Number embeddingPageSize; | ||
|
||
// @Parameter | ||
// @Expression(ExpressionSupport.SUPPORTED) | ||
// @Summary("The offset used when querying the vector store") | ||
// @Optional(defaultValue = "0") | ||
// private Number offset; | ||
|
||
// @Parameter | ||
// @Expression(ExpressionSupport.SUPPORTED) | ||
// @Summary("The limit applied used when querying the vector store") | ||
// @Optional | ||
// private Number limit; | ||
|
||
public int embeddingPageSize() {return embeddingPageSize != null ? embeddingPageSize.intValue() : 5000;} | ||
|
||
// public int offset() { | ||
// return offset.intValue(); | ||
// } | ||
|
||
// public int limit() { | ||
// return limit.intValue(); | ||
// } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters