-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Add support for localai #15635
Comments
Here is a 2 line modification that accomplishes what you are looking for
|
there was potential for this to be supported but the contributor did not confirm if testing was done #14953 |
Looks interesting! any way I can test it? I imagine I would need to clone the repo, checkout the PR branch, compile & test - would that work? I mean unless the CI/CD pipeline builds a docker image for each PR - which I doubt. |
it builds a local docker image for test but not one that can be pulled. |
I see. Can I manually download it? I am using the tensorrt version but I guess just for this test I can use anything... |
it would be easier to just test on a local dev instance. But in general, regardless, I think at this point such a change wouldn't be brought in to 0.15, would need to wait for 0.16. Would have to see what other maintainers think though |
Thanks @NickM-27 I understand. Let's see if I am able to do this in the next few days - in case it can make things easier I am willing to expose my |
@wilcomir |
@NickM-27 @hawkeye217
|
Thanks @saket424 - I believe the original PR is somewhat better, as now you are hardcoding the openai url in the calling code, but the url is already hardcoded in the |
Describe what you are trying to accomplish and why in non technical terms
I want to be able to use my localai instance with the genai features so that I can avoid paid services. Right now I am using ollama, but I would prefer localai support to be there as well
Describe the solution you'd like
Add the possibility to specify a
base_url
foropenai
:Describe alternatives you've considered
Using ollama is a possible alternative, and what I am currently doing, but localai is more flexible than ollama, and I would rather have a single stack up for everything.
Additional context
As a side note, one of the main goals of localai is being a drop-in replacement for openai APIs, this is why I am suggesting to just add a
base_url
option - nothing else should be necessary. I could accomplish something like this spoofing the openai domain for the frigate instance I am running, but of course I'd rather not.In case there is little time to implement this, I can try and submit a PR - I have never worked on such a big project so it might take me a while. I decided to open the feature request before putting any actual work in, because first I want to hear your feedback on the implementation suggestion, and second this looks like something a person confident with this codebase can take care of in 1/10th of the time it would take me.
The text was updated successfully, but these errors were encountered: