Skip to content

ConfigRawParams: add optional LLM-assisted parameter description translation - #3784

Open
YQHD711 wants to merge 1 commit into
ArduPilot:masterfrom
YQHD711:pr/llm-param-translation
Open

YQHD711 wants to merge 1 commit into
ArduPilot:masterfrom
YQHD711:pr/llm-param-translation

Conversation

@YQHD711

@YQHD711 YQHD711 commented Sep 19, 2026

Copy link
Copy Markdown

Adds an optional helper on the Full Parameter List that translates English parameter descriptions using any OpenAI-compatible chat-completions endpoint.

  • Utilities/LLMTranslationService.cs - endpoint-agnostic client. Defaults to the standard OpenAI chat-completions URL; any compatible base URL can be configured (OpenAI, Azure OpenAI, local Ollama / vLLM / LM Studio, ...). A candidate-URL fallback tries both /v1/chat/completions and /chat/completions so vendor path conventions are not hard coded.
  • GCSViews/ConfigurationView/LLMConfigDialog.cs - settings dialog (endpoint, key, model, temperature, custom system prompt, connection test).
  • GCSViews/ConfigurationView/ConfigRawParams.cs - toolbar buttons and the right-click entry.

Design notes:

  • Inert until configured. Nothing leaves the machine until the user sets an endpoint and key; IsConfigured is false with an empty key and TranslateAsync returns the input unchanged.
  • The API key is stored through the existing Settings mechanism and is never logged (debug output records only its length).
  • Parameter descriptions are sent to the configured third-party endpoint, which is why the feature is opt-in.
  • All user-visible strings go through the existing resx mechanism.

Testing: built successfully; exercised single-row translate, translate-all with progress, stop mid-batch, connection test pass/fail, and the no-key path.

…slation

Adds an opt-in helper that translates English parameter descriptions through any OpenAI-compatible chat-completions endpoint. Inert until the user configures an endpoint and API key in the new settings dialog. All user-visible strings are localised through the existing resx mechanism.
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.

1 participant