mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-04-18 12:09:58 +08:00
fix(API): fixed retrieval api parameters matching (#2550)
### What problem does this PR solve? fixed /datasets/retrieval API: KeyError('size') and 'doc_ids': ['Field may not be null.'] ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
parent
5110a3ba90
commit
1fafdb8471
@ -64,7 +64,7 @@ class RetrievalReq(Schema):
|
||||
question = fields.String(required=True)
|
||||
page = fields.Integer(load_default=1)
|
||||
page_size = fields.Integer(load_default=30)
|
||||
doc_ids = fields.List(fields.String())
|
||||
doc_ids = fields.List(fields.String(), allow_none=True)
|
||||
similarity_threshold = fields.Float(load_default=0.0)
|
||||
vector_similarity_weight = fields.Float(load_default=0.3)
|
||||
top_k = fields.Integer(load_default=1024)
|
||||
@ -180,7 +180,7 @@ def delete_dataset(tenant_id, kb_id):
|
||||
|
||||
def retrieval_in_dataset(tenant_id, json_data):
|
||||
page = json_data["page"]
|
||||
size = json_data["size"]
|
||||
size = json_data["page_size"]
|
||||
question = json_data["question"]
|
||||
kb_id = json_data["kb_id"]
|
||||
if isinstance(kb_id, str): kb_id = [kb_id]
|
||||
|
Loading…
x
Reference in New Issue
Block a user