Feat: Add metadata filtering function for /api/v1/retrieval (#9877)

-Added the metadata_dedition parameter in the document retrieval
interface to filter document metadata -Updated the API documentation and
added explanations for the metadata_dedition parameter

### What problem does this PR solve?

Make /api/v1/retrieval api also can use metadata filter

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
天海蒼灆
2025-09-05 11:12:15 +08:00
committed by GitHub
parent 8e30a75e5c
commit 677c99b090
4 changed files with 22 additions and 12 deletions

View File

@ -1808,7 +1808,8 @@ Retrieves chunks from specified datasets.
- `"rerank_id"`: `string`
- `"keyword"`: `boolean`
- `"highlight"`: `boolean`
- `"cross_languages"`: `list[string]`
- `"cross_languages"`: `list[string]`
- `"metadata_condition"`: `object`
##### Request example
@ -1855,7 +1856,8 @@ curl --request POST \
- `false`: Disable highlighting of matched terms (default).
- `"cross_languages"`: (*Body parameter*) `list[string]`
The languages that should be translated into, in order to achieve keywords retrievals in different languages.
- `"metadata_condition"`: (*Body parameter*), `object`
The metadata condition for filtering chunks.
#### Response
Success: