Add remote/external llama.cpp server (URL) option to translate (#11584)#11599
Open
muaz978 wants to merge 1 commit into
Open
Add remote/external llama.cpp server (URL) option to translate (#11584)#11599muaz978 wants to merge 1 commit into
muaz978 wants to merge 1 commit into
Conversation
…tleEdit#11584) The llama.cpp translate engine only managed a local server (download a model, start a local process, point the URL at localhost), so it couldn't use an existing GPU-accelerated llama.cpp server. The translate core already POSTs to a configurable OpenAI-compatible endpoint (LlamaCppApiUrl) - same shape as the LM Studio engine - so only the UI needed to expose it. Add a "Use external server (URL)" checkbox to the llama.cpp engine: - off (default): unchanged - local model download + managed server. - on: shows an editable API URL field; translation posts directly to that endpoint and skips local server management. New setting AutoTranslate.LlamaCppUseRemoteServer (default false). The toggle swaps the panel live; a guard prevents the programmatic re-setup from recursing.
Member
|
PRs with new language tags will have to wait for SE 5.0.1 |
Author
|
It is completely up to you and how you see things best fit for the sake of development of the SE, please tell me if there is anything I can do more when needed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements #11584 - lets the llama.cpp translate engine connect to an external/remote server via URL (e.g. a GPU box), instead of only managing a local instance.
Background
LlamaCppTranslateandLmStudioTranslateare functionally identical - both POST to an OpenAI-compatible/v1/chat/completionsendpoint read from a settings URL. The translate core for llama.cpp already targets a configurableLlamaCppApiUrl; the engine just never exposed it, instead downloading a model and managing a local server pointed at localhost.Change
Adds a "Use external server (URL)" checkbox to the llama.cpp engine in Auto-translate:
EnsureServerRunningAsyncpath.New setting
AutoTranslate.LlamaCppUseRemoteServer(defaultfalse, so existing behaviour is untouched). The toggle swaps the panel live (a small guard prevents the programmatic re-setup from recursing). Mirrors how the Ollama/LM Studio engines present a URL field.Notes