ragflow/api/apps
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
..
auth Fix: use jwks_uri from OIDC metadata for JWKS client (#8136) 2025-06-10 10:16:58 +08:00
sdk Refactor: rename rmSpace to remove_redundant_spaces (#10796) 2025-10-28 09:46:32 +08:00
__init__.py Feat: rename file to avoid package name conflict (#10863) 2025-10-29 12:19:57 +08:00
api_app.py Fix: predictable token generation (#10868) 2025-10-30 09:31:36 +08:00
canvas_app.py Fix: agent templates... (#10564) 2025-10-15 10:31:30 +08:00
chunk_app.py Refactor: rename rmSpace to remove_redundant_spaces (#10796) 2025-10-28 09:46:32 +08:00
conversation_app.py fix: replace traceback.print_exc() with logging.exception(e) in conve… (#10275) 2025-09-25 11:45:44 +08:00
dialog_app.py Fix typo (#9766) 2025-08-27 18:56:40 +08:00
document_app.py Feat: Make knowledge base renaming automatically reflected in agent discussions, solved #10597 (#10680) 2025-10-21 10:42:05 +08:00
file2document_app.py Feat: add advanced document filter (#8723) 2025-07-09 09:33:11 +08:00
file_app.py Improve file management (#10577) 2025-10-16 09:38:25 +08:00
kb_app.py Feat:check embedding model api (#10854) 2025-10-30 19:06:16 +08:00
langfuse_app.py Feat: add project_id and project_name to Langfuse API (#6481) 2025-03-25 10:36:34 +08:00
llm_app.py Fix: the input length exceeds the context length (#10895) 2025-10-30 19:00:53 +08:00
mcp_server_app.py Fix typo (#9766) 2025-08-27 18:56:40 +08:00
plugin_app.py Fix typos: retrievaler -> retriever (#10372) 2025-10-10 09:17:36 +08:00
search_app.py Fix typo (#9766) 2025-08-27 18:56:40 +08:00
system_app.py Fix: predictable token generation (#10868) 2025-10-30 09:31:36 +08:00
tenant_app.py Add time utils (#10849) 2025-10-28 19:09:14 +08:00
user_app.py Add time utils (#10849) 2025-10-28 19:09:14 +08:00