ragflow/api
buua436 5674d762f7
Feat:check embedding model api (#10854)
### What problem does this PR solve?
change:
Randomly sample `check_num` chunks from knowledge base `kb_id`, re-embed
them using `embd_id`, and compare with stored vectors via cosine
similarity. If `avg_cos_sim > 0.99`, return success (`code=0`);
otherwise return business failure (`code=10`).

url:
`/v1/kb/check_embedding`

Request Body:
```
{
  "kb_id": "<dataset_id>",
  "embd_id": "BAAI/bge-m3@SILICONFLOW",
  "check_num": 5
}

```
Success Response:
```
{
  "code": 0,
  "message": "success",
  "data": {
    "summary": { "avg_cos_sim": 0.999999, "sampled": 5, "valid": 5, "max_cos_sim":0.999999,"min_cos_sim":0.999999,"model":"BAAI/bge-m3@SILICONFLOW" },
    "results": [ ... ]
  }
}
```

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
2025-10-30 19:06:16 +08:00
..
apps Feat:check embedding model api (#10854) 2025-10-30 19:06:16 +08:00
common Feat:admin api (#10642) 2025-10-18 16:09:48 +08:00
db Fix: the input length exceeds the context length (#10895) 2025-10-30 19:00:53 +08:00
utils Fix: predictable token generation (#10868) 2025-10-30 09:31:36 +08:00
__init__.py
constants.py
ragflow_server.py Refactor: move some functions out of api/utils/__init__.py (#10216) 2025-09-25 18:04:49 +08:00
settings.py Don't release full image (#10654) 2025-10-23 23:02:27 +08:00
validation.py
versions.py Don't release full image (#10654) 2025-10-23 23:02:27 +08:00