LLM 후처리 명령어 선택 기능 추가
- Settings LLM 탭: "기본 후처리 명령어" 드롭다운 추가 (없음/다듬기/번역/요약/문법교정/커스텀) - VoiceModeService: defaultLLMAction='none'이면 LLM 스킵 (이전: 'refine' 아니면 무조건 스킵 → 수정) - 사용자가 Settings에서 후처리 방식을 선택하면 모든 녹음에 적용
This commit is contained in:
parent
5596a52dcb
commit
4e23622c44
2 changed files with 34 additions and 4 deletions
|
|
@ -440,10 +440,9 @@ class VoiceModeService extends EventEmitter {
|
|||
|
||||
this.emit('transcription-update', { text: result.text, isFinal: true })
|
||||
|
||||
// LLM 후처리
|
||||
// LLM 후처리: none이면 스킵, 그 외에는 LLM 처리
|
||||
const llmAction = configGet('defaultLLMAction')
|
||||
if (llmAction !== 'refine' || !getLocalLLMService().isAvailable()) {
|
||||
// LLM 미가용이거나 기본 액션이면 원본 텍스트로 완료
|
||||
if (llmAction === 'none' || !getLocalLLMService().isAvailable()) {
|
||||
this._completeSession(result.text)
|
||||
} else {
|
||||
await this._processWithLLM(result.text)
|
||||
|
|
|
|||
|
|
@ -614,6 +614,10 @@ export function SettingsModal({ open, onClose }: SettingsModalProps): React.Reac
|
|||
{/* ── LLM 탭 ──────────────────────────────── */}
|
||||
<TabPanel value={activeTab} index={3}>
|
||||
<Box sx={{ display: 'flex', flexDirection: 'column', gap: 2 }}>
|
||||
<Typography variant="overline" sx={{ color: d3roPalette.text.label, letterSpacing: '1.5px' }}>
|
||||
Ollama 서버
|
||||
</Typography>
|
||||
|
||||
<TextField
|
||||
label="Ollama 서버 URL"
|
||||
value={config.ollamaServerUrl ?? 'http://localhost:11434'}
|
||||
|
|
@ -621,10 +625,37 @@ export function SettingsModal({ open, onClose }: SettingsModalProps): React.Reac
|
|||
fullWidth
|
||||
/>
|
||||
|
||||
<Typography variant="body2" color="text.secondary">
|
||||
<Typography variant="body2" sx={{ color: d3roPalette.text.inactive, fontSize: '11px' }}>
|
||||
Ollama가 실행 중이면 자동으로 연결됩니다.
|
||||
모델은 Ollama에서 직접 pull하세요 (예: ollama pull qwen3:4b).
|
||||
</Typography>
|
||||
|
||||
<Divider sx={{ borderColor: d3roPalette.border.subtle }} />
|
||||
|
||||
<Typography variant="overline" sx={{ color: d3roPalette.text.label, letterSpacing: '1.5px' }}>
|
||||
음성 후처리
|
||||
</Typography>
|
||||
|
||||
<FormControl size="small">
|
||||
<InputLabel>기본 후처리 명령어</InputLabel>
|
||||
<Select
|
||||
label="기본 후처리 명령어"
|
||||
value={config.defaultLLMAction ?? 'refine'}
|
||||
onChange={(e) => updateConfig('defaultLLMAction', e.target.value)}
|
||||
>
|
||||
<MenuItem value="none">없음 (원본 텍스트 그대로)</MenuItem>
|
||||
<MenuItem value="refine">다듬기 (문법+자연스러움)</MenuItem>
|
||||
<MenuItem value="translate">번역</MenuItem>
|
||||
<MenuItem value="summarize">요약</MenuItem>
|
||||
<MenuItem value="grammar">문법 교정</MenuItem>
|
||||
<MenuItem value="custom">커스텀 프롬프트</MenuItem>
|
||||
</Select>
|
||||
</FormControl>
|
||||
|
||||
<Typography variant="body2" sx={{ color: d3roPalette.text.inactive, fontSize: '11px' }}>
|
||||
핫키로 녹음 후 전사된 텍스트에 선택한 LLM 후처리가 적용됩니다.
|
||||
Ollama가 연결되어 있을 때만 동작합니다.
|
||||
</Typography>
|
||||
</Box>
|
||||
</TabPanel>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue