feat: add digital-intern live-qa endpoints for pinpoint hearing assistance
This commit is contained in:
@@ -564,3 +564,31 @@ export const uploadDocument = async (req: AuthenticatedRequest, res: Response) =
|
||||
res.status(500).json({ error: error.message || 'Internal Server Error' });
|
||||
}
|
||||
};
|
||||
|
||||
// Dijital Stajyer (Duruşma Asistanı - Canlı ve Nokta Atışı Soru/Cevap)
|
||||
export async function runDigitalInternQa(combinedText: string, question: string): Promise<{ summaryJson: any; aiModel: string }> {
|
||||
const prompt = `Sen duruşma salonundaki avukatın yanında duran, saniyeler içinde nokta atışı cevap veren kıdemli DİJİTAL STAJYERSİN.
|
||||
|
||||
AVUKATIN SORUSU: "${question}"
|
||||
|
||||
GÖREVİN & SIKI İLKELERİN:
|
||||
1. Duruşma anında avukatın saniyeler içinde okuyabileceği NOKTA ATIŞI ve NET cevabı ver.
|
||||
2. Uzun giriş paragrafı, merhaba mesajı veya lakırdı KESİNLİKLE YASAKTIR. Doğrudan sonuca gir.
|
||||
3. Bulduğun veriyi (Tarih, Saat, Belge Adı/No, İsim, Tutar, Sayfa) açıkça yaz.
|
||||
4. Aranan bilgi dava evraklarında açıkça yer almıyorsa: "found": false yaz ve "Bu bilgi dosyadaki evraklarda bulunmamaktadır" de.
|
||||
|
||||
ÇIKTI FORMATI (SADECE GEÇERLİ JSON):
|
||||
{
|
||||
"found": true,
|
||||
"answer": "📌 12 Ekim 2021 tarihinde düzenlenen Marmara Devlet Hastanesi Adli Muayene Raporu'nda altta kalça kırığı tespit edilmiştir.",
|
||||
"dateInfo": "12 Ekim 2021",
|
||||
"documentRef": "Marmara Devlet Hastanesi Adli Muayene Raporu (Belge No: 45)",
|
||||
"exactExcerpt": "Dosyadan alınan birebir pasaj veya ilgili cümle...",
|
||||
"confidenceScore": "%95"
|
||||
}
|
||||
|
||||
Sadece ve sadece JSON döndür, kod bloğu işareti (\`\`\`) veya başka bir açıklama ekleme.`;
|
||||
|
||||
const { resultJson, aiModel } = await callAiModel(prompt, combinedText);
|
||||
return { summaryJson: resultJson, aiModel };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user