Open
Description
Is there an existing issue for the same feature request?
- I have checked the existing issues.
Is your feature request related to a problem?
Describe the feature you'd like
sometimes I need retrieval chunks for GPTs schema usage. But default api for retrieval returns all the chunks found. please and top_n for this api.
top_n = req.get("top_n")
if top_n and isinstance(top_n, int) and top_n > 0:
ranks["chunks"] = ranks["chunks"][:top_n]
thanks!
Describe implementation you've considered
top_n = req.get("top_n")
if top_n and isinstance(top_n, int) and top_n > 0:
ranks["chunks"] = ranks["chunks"][:top_n]
in api/apps/sdk/doc.py
Documentation, adoption, use case
Additional information
No response
Metadata
Metadata
Assignees
Labels
No labels