You might be able to use Ollama, which has a OpenAI compatible API.
Not without chaning the code (should be easy though)
https://github.com/DocumindHQ/documind/blob/d91121739df03867...