refactor(instructions): share instruction template rendering via @d3ro/core
This commit is contained in:
parent
d311e8123f
commit
ba0dbbd813
11 changed files with 423 additions and 36 deletions
|
|
@ -5,6 +5,7 @@ import { describe, it, expect, beforeEach, vi } from 'vitest'
|
|||
import { EventEmitter } from 'events'
|
||||
import { RecognitionState, AudioState } from '@d3ro/core/types'
|
||||
import { TIMING } from '@d3ro/core/constants'
|
||||
import { FREE_PROMPT_SYSTEM_PROMPT } from '../../../src/main/services/llm-prompts'
|
||||
|
||||
// 모든 하위 서비스 모킹
|
||||
vi.mock('../../../src/main/services/LoggerService', () => ({
|
||||
|
|
@ -347,7 +348,8 @@ describe('VoiceModeService', () => {
|
|||
const [text, , , systemPrompt] = mockLLM.processText.mock.calls[0]
|
||||
|
||||
expect(text).toBe(TRANSCRIPT)
|
||||
expect(systemPrompt).toBe(TRANSCRIPT)
|
||||
// 자유 프롬프트는 전사 텍스트를 시스템 프롬프트로 올리지 않는다
|
||||
expect(systemPrompt).toBe(FREE_PROMPT_SYSTEM_PROMPT)
|
||||
})
|
||||
|
||||
it('{{text}}를 쓰는 사용자 정의 지시문은 치환 결과를 처리 대상 텍스트로 넘긴다', async () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue