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

feat(llm): Add openailike llm mode #1447

Merged
merged 2 commits into from
Dec 26, 2023
Merged

Conversation

mchill
Copy link
Contributor

@mchill mchill commented Dec 22, 2023

This mode behaves the same as the openai mode, except that it allows setting custom models not supported by OpenAI. It can be used with any tool that serves models from an OpenAI compatible API.

Note that the mentioned libraries, LocalAI and vLLM, also have their own providers in LlamaIndex. This is a more generic solution that should support those and many more libraries.

One fun implication that I'm testing is the possibility of running PrivateGPT on top of another instance of PrivateGPT. The top-level instance manages embeddings, and the bottom-level instance runs an LLM. With a little additional logic, it could be possible to route requests from the parent instance to multiple child instances based on model id in the request, effectively letting a single PrivateGPT instance serve multiple models while benefiting from a single document store.

Implements #1424

This mode behaves the same as the openai mode, except that it allows setting custom models not
supported by OpenAI. It can be used with any tool that serves models from an OpenAI compatible API.

Implements zylon-ai#1424
Copy link
Contributor

imartinez
imartinez previously approved these changes Dec 22, 2023
Copy link
Collaborator

@imartinez imartinez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love the proposal and the execution. Great job. And the possibility of running a PGPT on top of another PGPT is really exciting. Thanks!

Add the "required" fields. The fields aren't really required, but mypy throws an error for fields
that don't have default values set.
Copy link
Contributor

@mchill
Copy link
Contributor Author

mchill commented Dec 22, 2023

Pushed a fix for the linting errors. I ran make test and completely skipped over the make check instruction. 😅

@imartinez imartinez merged commit 2d27a9f into zylon-ai:main Dec 26, 2023
8 checks passed
simonbermudez pushed a commit to simonbermudez/saimon that referenced this pull request Feb 24, 2024
This mode behaves the same as the openai mode, except that it allows setting custom models not
supported by OpenAI. It can be used with any tool that serves models from an OpenAI compatible API.

Implements zylon-ai#1424
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 this pull request may close these issues.

2 participants