회의록: 전사 토큰·임직원 명단 퍼지 매칭 후 LLM에 표기 통일 블록만 주입

Made-with: Cursor
This commit is contained in:
2026-04-15 18:34:52 +09:00
parent 5ef2f14603
commit e063bcd732
5 changed files with 350 additions and 46 deletions

View File

@@ -4,6 +4,7 @@
const fsSync = require("fs");
const os = require("os");
const path = require("path");
const meetingEmployeeNames = require("./meeting-employee-names");
const { execFile } = require("child_process");
const { promisify } = require("util");
const execFileAsync = promisify(execFile);
@@ -59,7 +60,8 @@ const ACTION_ITEMS_GUIDANCE_MINIMAL = [
const EMPLOYEE_NAME_GUIDANCE_MINIMAL = [
"【인명·담당자】",
"참석자·담당자 이름은 **원문·전사에 실제로 등장한 표기**를 따릅니다. 음성 인식 오류로 같은 사람이 문맥상 확실할 때만 철자를 다듬습니다.",
"사내 다른 성명 목록으로 바꿔 끼우거나, 전사에 없는 사람을 만들어내지 마세요.",
"사용자 메시지 상단에「이번 원문/전사 한정 · 임직원 표기 통일」블록이 있으면, **그 안의 매핑만** 적용하고 다른 이름을 임의로 목록에서 끌어오지 마세요.",
"전사에 없는 사람을 만들어내지 마세요.",
];
/** 회의 체크리스트 — 정의·목적·전·중·후 + 업무 체크리스트 AI 연동 */
@@ -708,13 +710,15 @@ async function transcribeMeetingAudio(openai, filePath, uiModel = DEFAULT_TRANSC
*/
async function generateMeetingMinutes(openai, { systemPrompt, userContent, uiModel, resolveApiModel, omitMeetingChecklistSection }) {
const apiModel = resolveApiModel(uiModel || "gpt-5-mini");
const namePrefix = meetingEmployeeNames.buildNameNormalizationUserPrefix(userContent);
const userPayload = namePrefix ? `${namePrefix}${userContent}` : userContent;
const completion = await openai.chat.completions.create({
model: apiModel,
messages: [
{ role: "system", content: systemPrompt },
{
role: "user",
content: `아래는 회의 원문 또는 전사입니다. 위 지시에 맞게 회의록을 작성해 주세요.\n\n---\n\n${userContent}`,
content: `아래는 회의 원문 또는 전사입니다. 위 지시에 맞게 회의록을 작성해 주세요.\n\n---\n\n${userPayload}`,
},
],
});