ragflow/api/apps
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
..
sdk Move settings initialization after module init phase (#3438) 2024-11-15 17:30:56 +08:00
__init__.py Remove unused code (#3448) 2024-11-18 12:05:38 +08:00
api_app.py Move settings initialization after module init phase (#3438) 2024-11-15 17:30:56 +08:00
canvas_app.py Move settings initialization after module init phase (#3438) 2024-11-15 17:30:56 +08:00
chunk_app.py Move settings initialization after module init phase (#3438) 2024-11-15 17:30:56 +08:00
conversation_app.py Move settings initialization after module init phase (#3438) 2024-11-15 17:30:56 +08:00
dialog_app.py Move settings initialization after module init phase (#3438) 2024-11-15 17:30:56 +08:00
document_app.py enlarge the default token length of RAPTOR summarization (#3454) 2024-11-18 10:15:26 +08:00
file2document_app.py Move settings initialization after module init phase (#3438) 2024-11-15 17:30:56 +08:00
file_app.py Move settings initialization after module init phase (#3438) 2024-11-15 17:30:56 +08:00
kb_app.py Move settings initialization after module init phase (#3438) 2024-11-15 17:30:56 +08:00
llm_app.py Added LocalAI support for rerank models (#3446) 2024-11-18 12:05:52 +08:00
system_app.py Adjusted heartbeat format (#3459) 2024-11-18 12:03:28 +08:00
tenant_app.py Unified API response json schema (#3170) 2024-11-05 11:02:31 +08:00
user_app.py Move settings initialization after module init phase (#3438) 2024-11-15 17:30:56 +08:00