Optional AI Input
AI input is optional: with it off, the engine only does local pinyin decoding and sends no network request at all. This page covers how to turn it on, what you get, and where the key lives. The data-boundary conclusions are on Privacy and data, not repeated here.
1. Three things to know first
Section titled “1. Three things to know first”- Off by default. The switch is Settings → Pinyin → Enable AI input.
- Once on, the cloud only takes part in re-ranking and continuation. Every keystroke is still served local candidates first; being offline, timing out, or turning it off never changes that frame.
- How special fields such as password boxes are handled is on Privacy and data. A cloud response is never written straight into your user dictionary or memory.
2. Attaching an endpoint
Section titled “2. Attaching an endpoint”Settings → Pinyin. After ticking Enable AI input, fill three fields: provider, API URL, model.
The provider dropdown is a convenience preset: picking a row fills in the URL and model name for you, and both stay editable. Any OpenAI-compatible endpoint works.
| Provider | Prefilled API URL | Prefilled model |
|---|---|---|
| DeepSeek (default) | https://api.deepseek.com/v1/chat/completions | deepseek-chat |
| Tongyi Qianwen | https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions | qwen-plus |
| OpenAI | https://api.openai.com/v1/chat/completions | gpt-4o-mini |
| Grok | https://api.x.ai/v1/chat/completions | grok-4.6 |
| Local | http://127.0.0.1:11434/v1/chat/completions | llama3 |
| Other | does not overwrite; uses what you type | uses what you type |
The Local row points at an OpenAI-compatible endpoint listening on your own machine (Ollama, for example). A local service needs no key.
3. Where the API key is stored
Section titled “3. Where the API key is stored”The key is not written to the config file. The settings window saves it into the Linux desktop Secret Service (GNOME Keyring / KWallet): type the new value under “API key”, press Save key, or Delete key to clear it; the status line next to it shows whether an entry already exists for that provider.
- When no keyring is available, no cloud request is sent, and local pinyin input is unaffected.
- Do not put the key in command-line arguments, environment variables, or logs, and do not “verify” it with a command that prints its contents.
- To check whether your session can reach Secret Service:
busctl --user list --no-pager | grep -F org.freedesktop.secretscommand -v secret-toolIf the first line prints nothing, check that the desktop session’s D-Bus and keyring service are started and unlocked. The second command only tells you whether the diagnostic tool is installed.
4. Ghost continuation
Section titled “4. Ghost continuation”Continuation has its own switch: Settings → Pinyin → Enable Ghost continuation, and it depends on Enable AI input already being on. The same page tunes:
| Item | Range and default |
|---|---|
| Continuation debounce (ms) | 0–2000, default 300: how long a pause must last before a request goes out |
| Ghost minimum confidence | 0–1, default 0.6: below this score nothing is shown |
| Streaming continuation | on by default |
| Continuation context scrubbing | on by default |
| Prefer on-device re-ranking (off goes straight to the cloud) | on by default |
The context window is roughly 800 characters on each side of the caret.
5. Accept or reject
Section titled “5. Accept or reject”When you pause, a grey suggestion may appear in the candidate row, labelled “from cloud”.
- Press
Tabto accept it. - Just keep typing to reject it — no extra key, and it does not interrupt the pinyin you are composing.
- Cloud and local rows are clearly separated: local results say “from local”, cloud results say “from cloud”.
6. Two common problems
Section titled “6. Two common problems”It says the keyring is unavailable Confirm the desktop session has GNOME Keyring or KWallet started and unlocked, then reopen the settings window and try again. The diagnostic commands are in section 3 above. Without a keyring, ordinary pinyin input keeps working — only the cloud stays silent.
It says “configured”, but no suggestion ever appears “Configured” only means an entry for that provider exists in the keyring; it does not mean the key still works. Check that the provider, model, and API URL match what your provider uses today, that the key is valid, and that the account has usable quota; re-save the key if needed.