Fix wizard translations: force mistral for all translation/outline calls
gpt-oss:120b-cloud refuses even short medical texts with "텍스트가 너무 길어...". Add model:'mistral-large-3:675b-cloud' explicitly to three wizard /api/chat calls: - translateAbstract() — abstract Korean translation - chatStream() — PDF text chunk translation (used by translatePdfText) - generateOutline() — slide outline generation Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1400,7 +1400,7 @@ async function translateAbstract() {
|
||||
bodyEl.textContent='번역 중...';
|
||||
try {
|
||||
const msg='다음 영문 의학 논문 초록을 자연스러운 한국어로 번역해주세요:\n\n'+abEn;
|
||||
const r=await fetch('/api/chat',{method:'POST',credentials:'include',headers:{'Content-Type':'application/json','Accept':'text/event-stream'},body:JSON.stringify({message:msg,sessionId:'translate-abstract'})});
|
||||
const r=await fetch('/api/chat',{method:'POST',credentials:'include',headers:{'Content-Type':'application/json','Accept':'text/event-stream'},body:JSON.stringify({message:msg,sessionId:'translate-abstract',model:'mistral-large-3:675b-cloud'})});
|
||||
if(!r.ok) throw new Error('API '+r.status);
|
||||
const reader=r.body.getReader(),dec=new TextDecoder();
|
||||
let buf='',reply='';
|
||||
@@ -1454,7 +1454,7 @@ function splitChunks(text, size) {
|
||||
async function chatStream(msg, sessionId) {
|
||||
const r = await fetch('/api/chat', {method:'POST', credentials:'include',
|
||||
headers:{'Content-Type':'application/json','Accept':'text/event-stream'},
|
||||
body: JSON.stringify({message: msg, sessionId, direct: true})});
|
||||
body: JSON.stringify({message: msg, sessionId, direct: true, model: 'mistral-large-3:675b-cloud'})});
|
||||
if (!r.ok) throw new Error('API ' + r.status);
|
||||
const reader = r.body.getReader(), dec = new TextDecoder();
|
||||
let buf = '', reply = '';
|
||||
@@ -2234,7 +2234,7 @@ async function generateOutline() {
|
||||
const prompt=`[PPTX 워크플로 시작]\n요청: ${topic}\nPMCIDs: ${pmcids}\n템플릿: ${tmpl}${skin?'\n배경 스킨: '+skin:''}\n슬라이드 수: ${slides}장\n\n=== 논문 내용 ===\n${contentBlocks.join('\n\n---\n')}\n\n=== 추출된 이미지 ===\n${imgList||'없음'}\n\n위 논문 내용과 이미지를 활용해 슬라이드 아웃라인을 \`\`\`pptx-outline 블록으로 출력해주세요. create_presentation은 아직 호출하지 마세요.`;
|
||||
|
||||
try{
|
||||
const r=await fetch('/api/chat',{method:'POST',credentials:'include',headers:{'Content-Type':'application/json','Accept':'text/event-stream'},body:JSON.stringify({message:prompt,history:[],useTools:true})});
|
||||
const r=await fetch('/api/chat',{method:'POST',credentials:'include',headers:{'Content-Type':'application/json','Accept':'text/event-stream'},body:JSON.stringify({message:prompt,history:[],useTools:true,model:'mistral-large-3:675b-cloud'})});
|
||||
if(!r.ok) throw new Error('API '+r.status);
|
||||
const reader=r.body.getReader(),dec=new TextDecoder();
|
||||
let buf='',reply='';
|
||||
|
||||
Reference in New Issue
Block a user