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

@ -197,6 +197,7 @@ class RAGFlow:
top_k=1024,
rerank_id: str | None = None,
keyword: bool = False,
cross_languages: list[str]|None = None
):
if document_ids is None:
document_ids = []
@ -211,6 +212,7 @@ class RAGFlow:
"question": question,
"dataset_ids": dataset_ids,
"document_ids": document_ids,
"cross_languages": cross_languages
}
# Send a POST request to the backend service (using requests library as an example, actual implementation may vary)
res = self.post("/retrieval", json=data_json)