AgentGPT icon indicating copy to clipboard operation
AgentGPT copied to clipboard

🤖 Investigate utilizing local models

Open asim-shrestha opened this issue 1 year ago • 1 comments

This is a big undertaking. As a user, I'd like to be able to use my own local models to not be crippled by limitations of OpenAI models. The opensource model scene is getting huge and we want to support this as best as possible. The issue is, given we are a product first and foremost, connection to local models must work in both prod and dev and must be as simple as possible to setup.

One option is WindowAI: https://twitter.com/xanderatallah/status/1643356106670981122. This is an extension that will allow a site to connect to a model locally.

Before implementing anything, we should first investigate possibilities and report back in this issue.

asim-shrestha avatar Apr 11 '23 17:04 asim-shrestha

@asim-shrestha I would be interested in assisting with this issue.

On initial analysis, it appears that window.ai uses a combination of Python + Flask to host a model local to the server, provided by Flask. The repo includes an example using a model ftrom hugging face, imported locally, and being used by the server to support a completions endpoint.

In my opinion, models such as the following could also be investigated for suitability as candidates for use locally with AgentGPT:

psgit avatar Apr 15 '23 14:04 psgit

I'm not a specialist, but the ideal for me would be to be able to mix AgentGPT and GPT4All so that I could use any model locally, without having to spend money with OpenAI to use ChatGPT. Some models perform better than ChatGPT in certain areas, and being able to use AgentGPT on them would be a huge leap forward.

AgimaFR avatar Jun 05 '23 16:06 AgimaFR

@psgit @AgimaFR, haven't looked too closely at the local model scene. Are there any that expose an API that we can download directly from docker-compose at this point? I think GPT4All has an installer process?

Won't be able to use them in prod but would be a huge win for local installations of AgentGPT. (Though I question their performance capabilities / abilities to output structured JSON)

asim-shrestha avatar Jun 05 '23 18:06 asim-shrestha