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
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
import { describe, it, expect, beforeEach, vi } from 'vitest'
|
||||
import type { LLMChain } from '@d3ro/core/types'
|
||||
import { FREE_PROMPT_SYSTEM_PROMPT } from '../../../src/main/services/llm-prompts'
|
||||
|
||||
vi.mock('../../../src/main/services/LoggerService', () => ({
|
||||
getLogger: () => ({ info: vi.fn(), warn: vi.fn(), error: vi.fn(), debug: vi.fn() })
|
||||
|
|
@ -119,7 +120,8 @@ describe('ChainService.execute — 지시문 인자 전달', () => {
|
|||
const [text, , , systemPrompt] = mockLLM.processText.mock.calls[0]
|
||||
|
||||
expect(text).toBe('피보나치 짜줘')
|
||||
expect(systemPrompt).toBe('피보나치 짜줘')
|
||||
// 자유 프롬프트는 사용자 텍스트를 시스템 프롬프트로 올리지 않는다
|
||||
expect(systemPrompt).toBe(FREE_PROMPT_SYSTEM_PROMPT)
|
||||
})
|
||||
|
||||
it('{{text}}를 쓰는 지시문은 치환 결과를 처리 대상 텍스트로 넘긴다', async () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue