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
|
|
@ -25,6 +25,7 @@ import {
|
|||
BASE_SYSTEM_PROMPTS,
|
||||
SUGGESTION_NO_THINK_PREFIX,
|
||||
SUGGESTION_SYSTEM_PROMPT,
|
||||
FREE_PROMPT_SYSTEM_PROMPT,
|
||||
} from '../../../src/main/services/llm-prompts'
|
||||
import { buildCaptionRefinePrompt } from '../../../src/main/services/llm-prompts'
|
||||
|
||||
|
|
@ -101,11 +102,11 @@ describe('buildInstructionInvocation', () => {
|
|||
expect(invocation.systemPrompt).not.toContain('{{')
|
||||
})
|
||||
|
||||
it('builtin-free-prompt는 사용자 텍스트를 시스템 프롬프트로 보낸다', () => {
|
||||
it('builtin-free-prompt는 사용자 텍스트를 처리 대상으로만 보내고 시스템 프롬프트는 고정 지시문이다', () => {
|
||||
const invocation = buildInstructionInvocation('{{userPrompt}}', '파이썬으로 피보나치 짜줘')
|
||||
|
||||
expect(invocation.text).toBe('파이썬으로 피보나치 짜줘')
|
||||
expect(invocation.systemPrompt).toBe('파이썬으로 피보나치 짜줘')
|
||||
expect(invocation.systemPrompt).toBe(FREE_PROMPT_SYSTEM_PROMPT)
|
||||
})
|
||||
|
||||
it('{{text}}를 쓰는 지시문은 하위 호환을 위해 치환 결과를 처리 대상 텍스트로 보낸다', () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue