stable POC version 1 - chat and topics

This commit is contained in:
Adrien
2026-04-02 21:04:33 +02:00
parent 618e28b354
commit bcc80d250b
74 changed files with 11692 additions and 278 deletions

View File

@@ -7,7 +7,7 @@ spring:
jpa:
hibernate:
ddl-auto: update
ddl-auto: false
show-sql: false
properties:
hibernate:
@@ -25,15 +25,15 @@ spring:
dimensions: 1536
distance-type: COSINE_DISTANCE
index-type: HNSW
initialize-schema: false
initialize-schema: true
openai:
api-key: ${OPENAI_API_KEY}
api-key: ${OPENAI_API_KEY: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}
chat:
options:
model: gpt-4o
model: gpt-4o-mini
embedding:
options:
model: "text-embedding-3-small"
model: text-embedding-3-small
servlet:
multipart:

View File

@@ -0,0 +1,48 @@
CREATE TABLE topic (
id VARCHAR(100) PRIMARY KEY,
name VARCHAR(255) NOT NULL,
description TEXT NOT NULL,
category VARCHAR(100) NOT NULL
);
INSERT INTO topic (id, name, description, category) VALUES
('intracranial-aneurysms',
'Intracranial Aneurysms',
'Diagnosis, classification, endovascular coiling, flow diversion, and surgical clipping of intracranial aneurysms.',
'Neurointervention'),
('arteriovenous-malformations',
'Arteriovenous Malformations',
'Pathophysiology, Spetzler-Martin grading, embolization strategies, and multimodality treatment of cerebral AVMs.',
'Neurointervention'),
('dural-arteriovenous-fistula',
'Dural Arteriovenous Fistula (DAVF)',
'Classification (Borden/Cognard), clinical presentation, transarterial and transvenous embolization of DAVFs.',
'Neurointervention'),
('acute-ischemic-stroke',
'Acute Ischemic Stroke (AIS)',
'IV thrombolysis, mechanical thrombectomy, patient selection, access strategies, and outcomes for acute ischemic stroke.',
'Neurointervention'),
('carotid-vertebral-artery-disease',
'Carotid & Vertebral Artery Disease',
'Carotid artery stenting, angioplasty, dissection management, and vertebral artery interventions.',
'Neurointervention'),
('spinal-vascular-malformations',
'Spinal Vascular Malformations',
'Classification, angiographic evaluation, and endovascular treatment of spinal dural and perimedullary fistulas and AVMs.',
'Neurointervention'),
('tumor-embolization',
'Tumor Embolization',
'Pre-operative embolization techniques, embolic agents, and complication management for hypervascular tumors.',
'Neurointervention'),
('cerebral-venous-disease',
'Cerebral Venous Disease',
'Cerebral venous sinus thrombosis, venous angioplasty, stenting for intracranial hypertension, and dural sinus interventions.',
'Neurointervention'),
('pediatric-neurointervention',
'Pediatric Neurointervention',
'Specific considerations, techniques, and outcomes for endovascular procedures in the pediatric population.',
'Neurointervention'),
('free-form',
'Free-form Chat',
'Open-ended questions across any neurointervention topic.',
'General');

View File

@@ -1,74 +1,56 @@
[
{
"id": "cerebral-aneurysm",
"name": "Cerebral Aneurysm Management",
"description": "Diagnosis, grading, and surgical/endovascular treatment of cerebral aneurysms.",
"category": "Vascular"
"id": "intracranial-aneurysms",
"name": "Intracranial Aneurysms",
"description": "Diagnosis, classification, endovascular coiling, flow diversion, and surgical clipping of intracranial aneurysms.",
"category": "Neurointervention"
},
{
"id": "subarachnoid-hemorrhage",
"name": "Subarachnoid Hemorrhage",
"description": "Pathophysiology, clinical presentation, and management of subarachnoid hemorrhage.",
"category": "Vascular"
"id": "arteriovenous-malformations",
"name": "Arteriovenous Malformations",
"description": "Pathophysiology, Spetzler-Martin grading, embolization strategies, and multimodality treatment of cerebral AVMs.",
"category": "Neurointervention"
},
{
"id": "arteriovenous-malformation",
"name": "Arteriovenous Malformation (AVM)",
"description": "Classification, natural history, and treatment options for cerebral AVMs.",
"category": "Vascular"
"id": "dural-arteriovenous-fistula",
"name": "Dural Arteriovenous Fistula (DAVF)",
"description": "Classification (Borden/Cognard), clinical presentation, transarterial and transvenous embolization of DAVFs.",
"category": "Neurointervention"
},
{
"id": "carotid-stenosis",
"name": "Carotid Artery Stenosis",
"description": "Evaluation and surgical or endovascular management of carotid artery stenosis.",
"category": "Vascular"
"id": "acute-ischemic-stroke",
"name": "Acute Ischemic Stroke (AIS)",
"description": "IV thrombolysis, mechanical thrombectomy, patient selection, access strategies, and outcomes for acute ischemic stroke.",
"category": "Neurointervention"
},
{
"id": "glioblastoma",
"name": "Glioblastoma (GBM)",
"description": "Pathophysiology, surgical resection strategies, and adjuvant therapy for GBM.",
"category": "Oncology"
"id": "carotid-vertebral-artery-disease",
"name": "Carotid & Vertebral Artery Disease",
"description": "Carotid artery stenting, angioplasty, dissection management, and vertebral artery interventions.",
"category": "Neurointervention"
},
{
"id": "meningioma",
"name": "Meningioma",
"description": "Classification, surgical approaches, and recurrence management for meningiomas.",
"category": "Oncology"
"id": "spinal-vascular-malformations",
"name": "Spinal Vascular Malformations",
"description": "Classification, angiographic evaluation, and endovascular treatment of spinal dural and perimedullary fistulas and AVMs.",
"category": "Neurointervention"
},
{
"id": "pituitary-adenoma",
"name": "Pituitary Adenoma",
"description": "Hormonal assessment, transsphenoidal surgery, and medical management of pituitary adenomas.",
"category": "Oncology"
"id": "tumor-embolization",
"name": "Tumor Embolization",
"description": "Pre-operative embolization techniques, embolic agents, and complication management for hypervascular tumors.",
"category": "Neurointervention"
},
{
"id": "lumbar-disc-herniation",
"name": "Lumbar Disc Herniation",
"description": "Anatomy, clinical presentation, conservative and surgical treatment of lumbar disc herniation.",
"category": "Spine"
"id": "cerebral-venous-disease",
"name": "Cerebral Venous Disease",
"description": "Cerebral venous sinus thrombosis, venous angioplasty, stenting for intracranial hypertension, and dural sinus interventions.",
"category": "Neurointervention"
},
{
"id": "cervical-myelopathy",
"name": "Cervical Spondylotic Myelopathy",
"description": "Pathomechanics, clinical grading, and decompressive surgery for cervical myelopathy.",
"category": "Spine"
},
{
"id": "spinal-cord-injury",
"name": "Spinal Cord Injury",
"description": "ASIA classification, acute management protocols, and rehabilitation strategies for SCI.",
"category": "Spine"
},
{
"id": "traumatic-brain-injury",
"name": "Traumatic Brain Injury (TBI)",
"description": "GCS scoring, intracranial pressure monitoring, and surgical management of TBI.",
"category": "Trauma"
},
{
"id": "epidural-hematoma",
"name": "Epidural Hematoma",
"description": "Mechanism, radiological features, and emergency surgical evacuation of epidural hematomas.",
"category": "Trauma"
"id": "pediatric-neurointervention",
"name": "Pediatric Neurointervention",
"description": "Specific considerations, techniques, and outcomes for endovascular procedures in the pediatric population.",
"category": "Neurointervention"
}
]

View File

@@ -19,5 +19,6 @@
/home/adrien/project/java/ai-teacher/backend/src/main/java/com/aiteacher/topic/Topic.java
/home/adrien/project/java/ai-teacher/backend/src/main/java/com/aiteacher/topic/TopicConfigLoader.java
/home/adrien/project/java/ai-teacher/backend/src/main/java/com/aiteacher/topic/TopicController.java
/home/adrien/project/java/ai-teacher/backend/src/main/java/com/aiteacher/topic/TopicRepository.java
/home/adrien/project/java/ai-teacher/backend/src/main/java/com/aiteacher/topic/TopicSummaryResponse.java
/home/adrien/project/java/ai-teacher/backend/src/main/java/com/aiteacher/topic/TopicSummaryService.java