ragflow/rag
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
..
app Use consistent log file names, introduced initLogger (#3403) 2024-11-14 17:13:48 +08:00
llm Added LocalAI support for rerank models (#3446) 2024-11-18 12:05:52 +08:00
nlp refine the message of queuing a task (#3437) 2024-11-15 15:59:54 +08:00
res Format file format from Windows/dos to Unix (#1949) 2024-08-15 09:17:36 +08:00
svr Added current task into task executor's hearbeat (#3444) 2024-11-15 22:55:41 +08:00
utils handle_task catch all exception (#3441) 2024-11-15 18:51:09 +08:00
__init__.py build python version rag-flow (#21) 2024-01-15 08:46:22 +08:00
benchmark.py Move settings initialization after module init phase (#3438) 2024-11-15 17:30:56 +08:00
raptor.py enlarge the default token length of RAPTOR summarization (#3454) 2024-11-18 10:15:26 +08:00
settings.py Rework logging (#3358) 2024-11-12 17:35:13 +08:00