### 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> |
||
|---|---|---|
| .. | ||
| sdk | ||
| __init__.py | ||
| api_app.py | ||
| canvas_app.py | ||
| chunk_app.py | ||
| conversation_app.py | ||
| dialog_app.py | ||
| document_app.py | ||
| file2document_app.py | ||
| file_app.py | ||
| kb_app.py | ||
| llm_app.py | ||
| system_app.py | ||
| tenant_app.py | ||
| user_app.py | ||