Fix: support cross language for API. (#8946)

### What problem does this PR solve?

Close #8943

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Kevin Hu
2025-07-21 17:25:28 +08:00
committed by GitHub
parent 7eb5ea3814
commit 0b487dee43
7 changed files with 17 additions and 4 deletions

View File

@ -1725,6 +1725,7 @@ Retrieves chunks from specified datasets.
- `"rerank_id"`: `string`
- `"keyword"`: `boolean`
- `"highlight"`: `boolean`
- `"cross_languages"`: `list[string]`
##### Request example
@ -1769,6 +1770,8 @@ curl --request POST \
Specifies whether to enable highlighting of matched terms in the results:
- `true`: Enable highlighting of matched terms.
- `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.
#### Response

View File

@ -953,6 +953,10 @@ Specifies whether to enable highlighting of matched terms in the results:
- `True`: Enable highlighting of matched terms.
- `False`: Disable highlighting of matched terms (default).
##### cross_languages: `list[string]`
The languages that should be translated into, in order to achieve keywords retrievals in different languages.
#### Returns
- Success: A list of `Chunk` objects representing the document chunks.