JirasakJo commited on
Commit
0153f68
·
verified ·
1 Parent(s): 8f7f38c

Update calendar_rag.py

Browse files
Files changed (1) hide show
  1. calendar_rag.py +1 -36
calendar_rag.py CHANGED
@@ -1585,39 +1585,4 @@ class AcademicCalendarRAG:
1585
  "query": query,
1586
  "answer": "ขออภัย ไม่สามารถประมวลผลคำตอบได้ในขณะนี้",
1587
  "error": "Maximum retry attempts reached"
1588
- }
1589
-
1590
- # def main():
1591
- # """Main function demonstrating hybrid retrieval"""
1592
- # try:
1593
- # # Load API key
1594
- # with open("key.txt", "r") as f:
1595
- # openai_api_key = f.read().strip()
1596
-
1597
- # # Create config with hybrid retrieval settings
1598
- # config = create_default_config(openai_api_key)
1599
- # pipeline = AcademicCalendarRAG(config)
1600
-
1601
- # # Load and process data
1602
- # with open("raw-data.json", "r", encoding="utf-8") as f:
1603
- # raw_data = json.load(f)
1604
-
1605
- # pipeline.load_data(raw_data)
1606
-
1607
- # # Test queries with different semantic weights
1608
- # # queries = ["ค่าเทอมเท่าไหร่","เปิดเรียนวันไหน","ขั้นตอนการสมัครที่สาขานี้มีอะไรบ้าง","ต้องใช้ระดับภาษาอังกฤษเท่าไหร่ในการสมัครเรียนที่นี้","ถ้าจะไปติดต่อมาหลายต้องลง mrt อะไร","มีวิชาหลักเเละวิชาเลือกออะไรบ้าง", "ปีที่ 1 เทอม 1 ต้องเรียนอะไรบ้าง", "ปีที่ 2 เทอม 1 ต้องเรียนอะไรบ้าง"]
1609
- # queries = ["สอบปลายภาควันไหน"]
1610
- # print("=" * 80)
1611
-
1612
- # for query in queries:
1613
- # print(f"\nQuery: {query}")
1614
- # result = pipeline.process_query(query)
1615
- # print(f"Answer: {result['answer']}")
1616
- # print("-" * 40)
1617
-
1618
- # except Exception as e:
1619
- # logger.error(f"Pipeline execution failed: {str(e)}")
1620
- # raise
1621
-
1622
- # if __name__ == "__main__":
1623
- # main()
 
1585
  "query": query,
1586
  "answer": "ขออภัย ไม่สามารถประมวลผลคำตอบได้ในขณะนี้",
1587
  "error": "Maximum retry attempts reached"
1588
+ }