JSv4 / OpenContracts

Mass document analytics platform based on LlamaIndex, Pgvector, React and Django.
https://JSv4.github.io/OpenContracts/
Apache License 2.0
671 stars 53 forks source link

Feature/Enhancement Add or Help to add Open Source LLM support #177

Open JPC612 opened 1 month ago

JPC612 commented 1 month ago

It would be great to add support for an open-source LLM or get help integrating one, for example with LlamaIndex and Ollama. I could potentially do it myself, but I'm not yet sure if I can replace the Marvin OpenAI dependency with something like LlamaIndex's structured output parser. I also don't know if LlamaIndex can fully replicate Marvin's capabilities for this project. Could you assist with this.

Thanks in advance

JSv4 commented 1 month ago

Sure, I'd be happy to help. Marvin is exceptionally good at the structured extract, but LangChain or LlamaIndex have structured parsers that should work.

Switching to an open source LLM is pretty easy in LlamaIndex. The bigger challenge will be where to host it. We could host it in a container in the compose stack, but it'll likely have huge memory requirements. Better bet is to use HF's inference endpoints. You can also see some work another user did on integrating Olama here.