From c022ee21d029d7e9f414d88a979795bdf8b5e11c Mon Sep 17 00:00:00 2001 From: thug0bin Date: Sat, 28 Feb 2026 11:33:38 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20RAG=EC=97=90=20=EC=84=B1=EB=B6=84/?= =?UTF-8?q?=EC=9A=A9=EB=8F=84=20=EC=A0=95=EB=B3=B4=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/backend/app.py b/backend/app.py index 1eec1fd..d29a326 100644 --- a/backend/app.py +++ b/backend/app.py @@ -2708,7 +2708,10 @@ def _get_animal_drug_rag(apc_codes): llm_pharm->>'체중/부위' as dosage_weight, llm_pharm->>'기간/용법' as usage_period, llm_pharm->>'월령금기' as age_restriction, - llm_pharm->>'반려인주의' as owner_caution + llm_pharm->>'반려인주의' as owner_caution, + llm_pharm->>'주성분' as main_ingredient_detail, + llm_pharm->>'LLM설명' as description, + llm_pharm->>'어떤질병에사용하나요?' as usage_for FROM apc WHERE apc IN ({placeholders}) """)) @@ -2721,7 +2724,10 @@ def _get_animal_drug_rag(apc_codes): 'dosage_weight': row.dosage_weight or '', 'usage_period': row.usage_period or '', 'age_restriction': row.age_restriction or '', - 'owner_caution': row.owner_caution or '' + 'owner_caution': row.owner_caution or '', + 'main_ingredient': row.main_ingredient_detail or row.main_ingredient or '', + 'description': row.description or '', + 'usage_for': row.usage_for or '' } return rag_data except Exception as e: @@ -2830,6 +2836,10 @@ def api_animal_chat(): details = [] if info.get('target_animals'): details.append(f"대상: {info['target_animals']}") + if info.get('main_ingredient'): + details.append(f"성분: {info['main_ingredient']}") + if info.get('usage_for'): + details.append(f"용도: {info['usage_for']}") if info.get('dosage_weight'): details.append(f"용량: {info['dosage_weight']}") if info.get('age_restriction'):