wenjin272 commented on code in PR #1144:
URL: https://github.com/apache/flink-agents/pull/1144#discussion_r4056514666
##########
python/flink_agents/api/vector_stores/vector_store.py:
##########
@@ -69,7 +69,9 @@ class VectorStoreQuery(BaseModel):
query_text: str = Field(
description="Text query to be converted to embedding for semantic
search."
)
- limit: int = Field(default=10, description="Maximum number of results to
return.")
+ limit: int = Field(
+ default=10, ge=0, description="Maximum number of results to return."
Review Comment:
Should `0` really be accepted here? The production query path cannot honor
it consistently: Elasticsearch, OpenSearch, and S3 Vectors coerce `0` to `1`,
while Chroma rejects `n_results=0`. Please either require `limit > 0` in both
Java and Python, or handle `0` at the common query entry point by returning an
empty result, with a production-path regression test.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]