Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local LLM models #11

Open
blu3knight opened this issue May 10, 2023 · 14 comments · Fixed by #13
Open

Local LLM models #11

blu3knight opened this issue May 10, 2023 · 14 comments · Fixed by #13

Comments

@blu3knight
Copy link

blu3knight commented May 10, 2023

Would you consider using a local LLM model that is compatible to the OpenAI GPT API, but would need a config to use locally.

As information here is an API that is able to be used by a lot of models.
https://github.com/go-skynet/LocalAI

For embeddings support this is new (mudler/LocalAI#70)

@rizerphe
Copy link
Owner

I definitely will be exploring this idea. It might take a bit of time, but expect it to be a feature in the near future. Thank you!

@blu3knight
Copy link
Author

So good news GPT4ALL client has created an API web mode within their client so that you can use ANY LLM (including GPT3.5/4) as part of the communication. Their API mode is compatible with opening AI, so all you would have to do is allow the pointing of the plugin to localhost on port 4891.

Ignore the previous API I mentioned as this is no longer needed. On the opensource LLM front, the advancement is at lightning speed.

https://docs.gpt4all.io/gpt4all_chat.html

@amitkot
Copy link

amitkot commented May 17, 2023

@blu3knight can we specify host and port using this plugin?

@blu3knight
Copy link
Author

Well depends what you are referencing to. For GPT4all it is no longer a plug-in but actually part of the code.

For this plug-in I took a look and this is part of the code in a separate file for each of the providers supported.

@amitkot
Copy link

amitkot commented May 17, 2023

@blu3knight I am referring to this project. So it looks like extracting these settings to a file and exposing them in the config UI? Maybe duplicating the OpenAI file to "local" llm first?

@blu3knight
Copy link
Author

blu3knight commented May 17, 2023

I am not the author of the project just read the code. To me there looks like changes need to be made for the config Ui and then adding the config for GPT4all would get this working, but I did not dive deeply into the code to figure everything out.

@blu3knight
Copy link
Author

blu3knight commented May 18, 2023

@rizerphe great new development in the Local API case, early next week it will be able to ingest and answer questions on Markdown, PDF's, and other data, by adding the directory to the GUI. So all you would need to do is ask questions about the local files. Implementation super simple, download Windows, Mac or Ubuntu Linux front end, install it, add directory (some questions about it), but then using the OpenAI API (that you already use) you can interact directly with the data.

Based on my understanding of the current plugin in the config you would want to have the following for people to change:

Local LLM URL: predefault with HTTP://localhost:4891/v1 or leave blank
Local LLM API Key: (this is not needed but in case you want to future proof)
Local LLM Model: Free form field so that it could be changed.

I can help test and help write the appropriate docs, etc if you would like.

@rizerphe
Copy link
Owner

Reopening this because adding one provider just isn't enough

@rizerphe rizerphe reopened this Jun 16, 2023
@blu3knight
Copy link
Author

I think that by using the openai api but making the host / api key/ model changeable, you can service more than one provider.

Example

these are just 3 easy ones, but I think there are others that use open AI api.

@rizerphe
Copy link
Owner

@blu3knight for that I'd also need to then properly process the list of the models, and OpenAI complicates this a lot. I currently have the models just hard-coded. Why I can't just fetch them is that I have to somehow differentiate completion, transcription and chat models, and the API doesn't provide me with an easy way to do so. I will see what I can do, but it's more complicated than just exposing the api_base parameter.

@wzh4464
Copy link

wzh4464 commented Jul 2, 2023

Hoping we have an azure version of chatgpt!

@ishaan-jaff
Copy link

I'm the maintainer of https://github.com/BerriAI/litellm/, happy to make a PR to help integrate Local LLM models + azure while calling them in the chatGPT input / output format

@EternalGoldenBraid
Copy link

Is there local-llm support? Based on the discussion and the following snippet from README.md no?

This plugin can use more than one source of completions, with more on the way. Currently it can:

    Ask ChatGPT to "Continue the following"
    Use the usual GPT-3 models
    Use AI21's Jurassic-2 models
    Use models hosted on goose.ai

If there are any sources you'd like to suggest, feel free to open an issue.

@RobKnop
Copy link

RobKnop commented Jun 27, 2024

Pls also add LM Studio
https://lmstudio.ai/docs/local-server
support. That would be awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants