ragflow/api
shizzgar 4b3eeaa6ef
Added LocalAI support for rerank models (#3446)
### What problem does this PR solve?

Hi there!
LocalAI added support of rerank models
https://localai.io/features/reranker/

I've implemented LocalAIRerank class (typically copied it from
OpenAI_APIRerank class).
Also, LocalAI model response with 500 error code if len of "documents"
is less than 2 in similarity check.
So I've added the second "document" on RERANK model connection check in
`api/apps/llm_app.py`.

### Type of change

- [x] New Feature (non-breaking change which adds functionality)

Co-authored-by: Kevin Hu <kevinhu.sh@gmail.com>
2024-11-18 12:05:52 +08:00
..
apps Added LocalAI support for rerank models (#3446) 2024-11-18 12:05:52 +08:00
db handle_task catch all exception (#3441) 2024-11-15 18:51:09 +08:00
utils Remove unused code (#3448) 2024-11-18 12:05:38 +08:00
__init__.py rename web_server to api (#29) 2024-01-17 09:43:27 +08:00
constants.py Remove unused code (#3448) 2024-11-18 12:05:38 +08:00
ragflow_server.py Move settings initialization after module init phase (#3438) 2024-11-15 17:30:56 +08:00
settings.py Remove unused code (#3448) 2024-11-18 12:05:38 +08:00
validation.py Print configs when startup RAGFlow server (#3414) 2024-11-15 09:29:40 +08:00
versions.py Update version display on web UI (#3405) 2024-11-14 17:51:21 +08:00