This commit is contained in:
CakeCN
2025-01-01 01:43:28 +08:00
parent 1280a978f5
commit eb67bcfb70
115 changed files with 989 additions and 535 deletions

View File

@@ -0,0 +1,25 @@
{
"course_id": "CS101",
"course_name": "Computer Science 101",
"course_auther": "John Doe",
"course_img_path": "/static/image/algorithm/book_cover.png",
"description":"这个老师很懒,没有写介绍",
"lessons": [
{
"lesson_id": "L001",
"lesson_name": "Introduction to Computer Science",
"markdown": "This is the introduction lesson.",
"markdown_prompt": "What is Computer Science?",
"score_prompt": "Please provide an overview of CS.",
"lesson_img_path": "/static/image/algorithm/book_cover.png"
},
{
"lesson_id": "L002",
"lesson_name": "Data Structures",
"markdown": "In this lesson, we cover Data Structures.",
"markdown_prompt": "What is an array?",
"score_prompt": "Explain how linked lists work.",
"lesson_img_path": "/static/image/algorithm/book_cover.png"
}
]
}

View File

@@ -0,0 +1,25 @@
{
"course_id": "algorithm",
"course_name": "algorithm",
"course_auther": "Chao Peng",
"course_img_path": "/static/image/algorithm/book_cover.png",
"description":"这个老师很懒,没有写介绍",
"lessons": [
{
"lesson_id": "binary_search",
"lesson_name": "Introduction to Algorithm",
"markdown": "# 二分查找与二分答案\n\n## 二分查找\n\n### 引入\n\n二分是一个很简单基础但很重要的知识点为以后许多高级的数据结构与算法铺垫。\n\n下面是一个用二分的简单场景\n\n假设小明从0到1000之间选择了一个数字但不告诉你你可以不断猜测这个数每次猜测小明会告知你的猜测得过大还是过小问最多几次就一定能猜中\n\n答案是利用二分查找的原理猜测11次即可。\n\n1. 对于0到1000的答案备选区猜测中位数500假设过小\n2. 则对于501到1000的答案备选区猜测750假设过大\n3. 则对于501到749的答案备选区猜测625假设过小\n4. 则对于626到749区间......\n5. 688-749\n6. 718-749\n7. 734-749\n8. 742-749\n9. 746-749\n10. 748-749\n11. 749-749\n\n在最差的情况下第11次的答案备选区就一定长度为1了也就是必然是答案。\n\n因此如果序列是有序的就可以通过二分查找快速定位所需要的数据。\n\n#### 思考题询问Agent以学习计算方法或验证你的答案\n\n对于上面那个题目如果问题区间是1到4000最差情况下需要猜测几次\n\n### 练习:二分查找\n\n试试对于下面的题目用代码实现一下二分查找。\n\n#### 题目:有序数组寻址\n\n给出一个长度为n的有序数组从小到大有q次询问对于每次询问输出指定数在数组中的下标。如果不存在则输出-1。\n\n##### 输入\n\n第一行一个整数n。(1<=n<=10^5)\n\n第二行n个用空格分开的整数ai。(0<=ai<=10^8)\n\n第三行一个整数q表示询问的次数。(1<=q<=10^4)\n\n后q行每行一个整数b表示询问的数。(0<=b<=10^8)\n\n##### 输出\n\nq行每行一个整数对应每次询问的返回结果。\n\n##### 提示:\n\n完成代码后通知Agent进行评测。\n\n如果你还不完全会这个算法询问Agent获取提示并进行学习。\n",
"markdown_prompt": "What is Algorithm?",
"score_prompt": "Please provide an overview of CS.",
"lesson_img_path": "/static/image/algorithm/book_cover.png"
},
{
"lesson_id": "L002",
"lesson_name": "Data Structures",
"markdown": "### This is the introduction lesson.\n ### This is the introduction lesson.\n",
"markdown_prompt": "What is an array?",
"score_prompt": "Explain how linked lists work.",
"lesson_img_path": "/static/image/algorithm/book_cover.png"
}
]
}

View File

@@ -1,21 +1,25 @@
{
"course_id": "CS101",
"course_name": "Computer Science 101",
"course_img_path": "images/cs101.png",
"lessons": [
{
"lesson_id": "L001",
"lesson_name": "Introduction to Computer Science",
"markdown": "This is the introduction lesson.",
"markdown_prompt": "What is Computer Science?",
"score_prompt": "Please provide an overview of CS."
},
{
"lesson_id": "L002",
"lesson_name": "Data Structures",
"markdown": "In this lesson, we cover Data Structures.",
"markdown_prompt": "What is an array?",
"score_prompt": "Explain how linked lists work."
}
]
}
"CS101":{
"course_id": "CS101",
"course_name": "Computer Science 101",
"course_description":"这个老师很懒,没有写介绍",
"course_img_path": "/static/image/algorithm/book_cover.png",
"course_create_date": "2023-01-01",
"course_update_data": "2023-01-01"},
"algorithm":{
"course_id": "algorithm",
"course_name": "算法分析与设计",
"course_description":"这个老师很懒,没有写介绍",
"course_img_path": "/static/image/algorithm/book_cover.png",
"course_create_date": "2023-01-01",
"course_update_data": "2023-01-01"},
"data-structure":{
"course_id": "data-structure",
"course_name": "数据结构",
"course_description":"这个老师很懒,没有写介绍",
"course_img_path": "/static/image/algorithm/book_cover.png",
"course_create_date": "2023-01-01",
"course_update_data": "2023-01-01"}
}

View File

@@ -0,0 +1,25 @@
{
"course_id": "data-structure",
"course_name": "data-structure",
"course_auther": "Chao Peng",
"course_img_path": "/static/image/algorithm/book_cover.png",
"description":"这个老师很懒,没有写介绍",
"lessons": [
{
"lesson_id": "L001",
"lesson_name": "Introduction to Data structure",
"markdown": "This is the introduction lesson.",
"markdown_prompt": "What is Data structure?",
"score_prompt": "Please provide an overview of CS.",
"lesson_img_path": "/static/image/algorithm/book_cover.png"
},
{
"lesson_id": "L002",
"lesson_name": "Data Structures",
"markdown": "In this lesson, we cover Data Structures.",
"markdown_prompt": "What is an array?",
"score_prompt": "Explain how linked lists work.",
"lesson_img_path": "/static/image/algorithm/book_cover.png"
}
]
}

40
Html/db/data/user/a.json Normal file
View File

@@ -0,0 +1,40 @@
{
"user_id": "a",
"select_course": [
"algorithm",
"data-structure"
],
"head_icon": "",
"course_process_dict": {
"algorithm": {
"lesson_processs": [
[
[],
"L001"
],
[
[],
"L002"
]
],
"course_put_in_date": "",
"course_last_study_date": "",
"course_total_study_time": 0
},
"data-structure": {
"lesson_processs": [
[
[],
"L001"
],
[
[],
"L002"
]
],
"course_put_in_date": "",
"course_last_study_date": "",
"course_total_study_time": 0
}
}
}

View File

@@ -1,57 +1,105 @@
{
"user_id": "user123",
"select_course": ["algorithm", "data-structure"],
"head_icon": "/static/image/book_cover.jpg",
"course_process_dict": {
"algorithm": {
"course_process": {
"user_id": "cake",
"select_course": [
"CS101",
"algorithm",
"data-structure"
],
"head_icon": "/static/image/book_cover.jpg",
"course_process_dict": {
"algorithm": {
"lesson_processs": [
{
"lesson_process": [
[
[
{
"chapter_info": {
"dialog": ["This is chapter 1 dialog"],
"score": 85,
"is_rebuttal": true,
"rebuttal_score": 90
}
},
{
"chapter_info": {
"dialog": ["This is chapter 2 dialog"],
"score": 75,
"is_rebuttal": false,
"rebuttal_score": 0
}
"title": "\u5f15\u5165",
"dialog": [
{
"id": "0b26417b9a4a41c3a86a63e96ac279f7",
"timestamp": "2025-01-01 01:40:36",
"name": "system",
"content": "You're a helpful assistant.\n\n## \u4f60\u7684\u89d2\u8272\uff1a\n\u4f60\u9700\u8981\u5e2e\u52a9\u5b66\u751f\u5b66\u4e60\u7b97\u6cd5\uff0c\u5b8c\u6210\u7279\u5b9a\u7684\u7f16\u7a0b\u4efb\u52a1\u3002\n\n## \u4f60\u9700\u8981\u505a\u7684\uff1a\n0. \u4f60\u5fc5\u987b\u6839\u636e\u8001\u5e08\u63d0\u4f9b\u7684\u6559\u5b66\u5927\u7eb2\uff0c\u6309\u7167\u7ae0\u8282\u987a\u5e8f\uff0c\u4f9d\u6b21\u5b66\u4e60\u3002\n1. \u5b66\u751f\u53ef\u80fd\u4f1a\u63d0\u51fa\u4e00\u4e9b\u95ee\u9898\uff0c\u4f60\u65e0\u9700\u56de\u7b54\u95ee\u9898\uff0c\u800c\u662f\u6839\u636e\u4e0a\u4e0b\u6587\uff08\u6bd4\u5982\u5b66\u751f\u81ea\u5df1\u7684\u4ee3\u7801\uff09\u6765\u5206\u6790\uff0c\u5e76\u7ed9\u51fa\u4e00\u6b65\u7684\u89e3\u51b3\u65b9\u6848\u3002\n2. \u6559\u5b66\u5927\u7eb2\u4e2d\u4f1a\u6307\u660e\u6bcf\u4e2a\u7ae0\u8282\u7684\u5b66\u4e60\u76ee\u6807\uff0c\u4f60\u6309\u7167\u76ee\u6807\u5b66\u4e60\u3002\n3. \u7cfb\u7edf\u4f1aoccasionally gather\u5b66\u751f\u4fe1\u606f\uff0c\u4f60\u9700\u8981\u5206\u6790\u5b66\u751f\u5b66\u4e60\u8bb0\u5f55\uff0c\u8c03\u7528\u5fc5\u8981\u7684\u51fd\u6570\u3002\n\n## \u6ce8\u610f\u4e8b\u9879\uff1a\n1. \u786e\u4fdd\u4f7f\u7528\u5de5\u5177\u51fd\u6570\u65f6\uff0c\u63d0\u4f9b\u7684\u53c2\u6570\u7c7b\u578b\u548c\u503c\u662f\u6b63\u786e\u7684\u3002\n2. \u4e0d\u8981\u592a\u76f8\u4fe1\u81ea\u5df1\uff0c\u4f8b\u5982\uff0c\u5f53\u524d\u4f4d\u7f6e\uff0c\u5f53\u524d\u65f6\u95f4\u7b49\uff0c\u4f60\u53ef\u4ee5\u5c1d\u8bd5\u4f7f\u7528\u5de5\u5177\u51fd\u6570\u83b7\u53d6\u4fe1\u606f\u3002\n3. \u5982\u679c\u51fd\u6570\u6267\u884c\u5931\u8d25\uff0c\u4f60\u9700\u8981\u5206\u6790\u9519\u8bef\u5e76\u5c1d\u8bd5\u89e3\u51b3\u3002\n4. \u786e\u4fdd\u5b66\u751f\u63d0\u51fa\u7684\u95ee\u9898\u6216\u60f3\u6cd5\u662f\u5426\u4e0e\u5f53\u524d\u7ae0\u8282\u76f8\u5173\uff0c\u5982\u679c\u4e0d\u76f8\u5173\uff0c\u4f60\u5e94\u7b54\u5e76\u63d0\u9192\u5b66\u751f\u5173\u6ce8\u5f53\u524d\u7ae0\u8282\u3002\n\n## \u8d44\u6e90\uff1a\n1. \u4f60\u53ef\u4ee5\u4f7f\u7528\u7684\u5de5\u5177\u51fd\u6570\u3002\n2. \u4e0a\u4e0b\u6587\uff0c\u5305\u62ec\u5b66\u751f\u7684\u4ee3\u7801\uff0c\u548c\u6559\u5b66\u5927\u7eb2\u3002\n",
"role": "system",
"url": null,
"metadata": null
},
{
"id": "461938c9265547c9bd0187ece94d659d",
"timestamp": "2025-01-01 01:40:43",
"name": "system",
"content": "##The Chapter Chain##\n(Your Now Chapter) Chapter 1: \n\u4e8c\u5206\u662f\u4e00\u4e2a\u5f88\u7b80\u5355\u57fa\u7840\uff0c\u4f46\u5f88\u91cd\u8981\u7684\u77e5\u8bc6\u70b9\uff0c\u4e3a\u4ee5\u540e\u8bb8\u591a\u9ad8\u7ea7\u7684\u6570\u636e\u7ed3\u6784\u4e0e\u7b97\u6cd5\u94fa\u57ab\u3002\n\n\u4e0b\u9762\u662f\u4e00\u4e2a\u7528\u4e8c\u5206\u7684\u7b80\u5355\u573a\u666f\uff1a\n\n\u5047\u8bbe\u5c0f\u660e\u4ece0\u52301000\u4e4b\u95f4\u9009\u62e9\u4e86\u4e00\u4e2a\u6570\u5b57\u4f46\u4e0d\u544a\u8bc9\u4f60\uff0c\u4f60\u53ef\u4ee5\u4e0d\u65ad\u731c\u6d4b\u8fd9\u4e2a\u6570\uff0c\u6bcf\u6b21\u731c\u6d4b\u5c0f\u660e\u4f1a\u544a\u77e5\u4f60\u7684\u731c\u6d4b\u5f97\u8fc7\u5927\u8fd8\u662f\u8fc7\u5c0f\uff0c\u95ee\u6700\u591a\u51e0\u6b21\u5c31\u4e00\u5b9a\u80fd\u731c\u4e2d\uff1f\n\n\u7b54\u6848\u662f\u5229\u7528\u4e8c\u5206\u67e5\u627e\u7684\u539f\u7406\uff0c\u731c\u6d4b11\u6b21\u5373\u53ef\u3002\n\n1. \u5bf9\u4e8e0\u52301000\u7684\u7b54\u6848\u5907\u9009\u533a\uff0c\u731c\u6d4b\u4e2d\u4f4d\u6570500\uff0c\u5047\u8bbe\u8fc7\u5c0f\uff0c\n2. \u5219\u5bf9\u4e8e501\u52301000\u7684\u7b54\u6848\u5907\u9009\u533a\uff0c\u731c\u6d4b750\uff0c\u5047\u8bbe\u8fc7\u5927\n3. \u5219\u5bf9\u4e8e501\u5230749\u7684\u7b54\u6848\u5907\u9009\u533a\uff0c\u731c\u6d4b625\uff0c\u5047\u8bbe\u8fc7\u5c0f\uff0c\n4. \u5219\u5bf9\u4e8e626\u5230749\u533a\u95f4......\n5. \uff08688-749\uff09\n6. \uff08718-749\uff09\n7. \uff08734-749\uff09\n8. \uff08742-749\uff09\n9. \uff08746-749\uff09\n10. \uff08748-749\uff09\n11. \uff08749-749\uff09\n\n\u5728\u6700\u5dee\u7684\u60c5\u51b5\u4e0b\uff0c\u7b2c11\u6b21\u7684\u7b54\u6848\u5907\u9009\u533a\u5c31\u4e00\u5b9a\u957f\u5ea6\u4e3a1\u4e86\uff0c\u4e5f\u5c31\u662f\u5fc5\u7136\u662f\u7b54\u6848\u3002\n\n\u56e0\u6b64\u5982\u679c\u5e8f\u5217\u662f\u6709\u5e8f\u7684\uff0c\u5c31\u53ef\u4ee5\u901a\u8fc7\u4e8c\u5206\u67e5\u627e\u5feb\u901f\u5b9a\u4f4d\u6240\u9700\u8981\u7684\u6570\u636e\u3002\n\n#### \u601d\u8003\u9898\uff08\u8be2\u95eeAgent\u4ee5\u5b66\u4e60\u8ba1\u7b97\u65b9\u6cd5\uff0c\u6216\u9a8c\u8bc1\u4f60\u7684\u7b54\u6848\uff09\n\n\u5bf9\u4e8e\u4e0a\u9762\u90a3\u4e2a\u9898\u76ee\uff0c\u5982\u679c\u95ee\u9898\u533a\u95f4\u662f1\u52304000\uff0c\u6700\u5dee\u60c5\u51b5\u4e0b\u9700\u8981\u731c\u6d4b\u51e0\u6b21\uff1f\n\n\nHere are some concrete instructions:\n\n\u672c\u5c0f\u8282\u8fdb\u884c\u4e8c\u5206\u67e5\u627e\u7684\u5f15\u5165\uff0c\u9996\u5148\u5e2e\u52a9\u5b66\u751f\u7406\u89e3\u6559\u6848\u5f15\u5165\u7ae0\u8282\u7684\u6545\u4e8b\u3002\n\n\u786e\u4fdd\u5b66\u751f\u7406\u89e3\u4e86\u5f15\u5165\u540e\uff0c\u5728\u8fdb\u884c\u601d\u8003\u9898\u3002\n\n\u5982\u679c\u4e0d\u8fdb\u884c\u601d\u8003\u9898\uff0c\u5219\u8be2\u95ee\u4e00\u4e0b\u662f\u5426\u4e0d\u8fdb\u884c\u601d\u8003\u9898\uff0c\u786e\u8ba4\u540e\u8fdb\u5165\u4e0b\u4e00\u8282\u3002\n\n\u5982\u679c\u8fdb\u884c\u601d\u8003\u9898\uff0c\u544a\u77e5\u5b66\u751f\u8ba1\u7b97\u65b9\u6cd5\u5e76\u9a8c\u8bc1\u7b54\u6848\uff08\u7b54\u6848\u662f13\u6b21\uff09\n\n\u8ba1\u7b97\u65b9\u6cd5\uff1a\n\n4000\u662f\u521d\u59cb\u7b54\u6848\u533a\u95f4\u957f\u5ea6\uff0c\u6bcf\u6b21\u8be2\u95ee\u80fd\u591f\u6392\u9664\u4e00\u534a\u7684\u533a\u95f4\uff0c\u5f53\u533a\u95f4\u957f\u5ea6\u5c0f\u4e8e\u7b49\u4e8e1\u65f6\uff0c\u518d\u8fdb\u884c\u4e00\u6b21\u731c\u6d4b\u5c31\u4e00\u5b9a\u662f\u7b54\u6848\u3002\n\n4000\u4e0d\u65ad\u9664\u4ee52\uff0c\u966412\u6b21\u5c31\u5c0f\u4e8e\u7b49\u4e8e1\u4e86\uff0c\u518d\u52a0\u4e00\u6b21\u5c31\u4e00\u5b9a\u662f\u7b54\u6848\u3002\u6700\u540e\u662f12+1=13\u6b21\u3002\n\n\uff08\u6bd44000\u5927\u7684\u6700\u5c0f2\u7684\u6b21\u65b9\u6570\uff0c4096\u5c31\u662f2\u768412\u6b21\u65b9\uff0c\u8fd9\u91cc\u768412\u5c31\u662f\u7b54\u6848\u4e2d\u768412\uff0c\u6216\u8005\u5199\u4f5c\"\u4e0a\u53d6\u6574(log2(4000))\")\n\n\u8be2\u95ee\u5b66\u751f\uff0c\u5f53\u5b66\u751f\u544a\u77e5\u7406\u89e3\u540e\uff0c\u8fdb\u5165\u4e0b\u4e00\u8282\u3002\n\n\n\n\n",
"role": "system",
"url": null,
"metadata": null
},
{
"id": "4d63161cb43344d79a2a27abde4a4439",
"timestamp": "2025-01-01 01:40:43",
"name": "user",
"content": "\u7b54\u6848\u662f13\uff0clog2 4000+1",
"role": "user",
"url": null,
"metadata": null
},
{
"id": "af2e4a0d68f34e61b977ee54f72acf63",
"timestamp": "2025-01-01 01:40:46",
"name": "user_342ee332-16c3-4722-a7aa-fd020088aba1",
"content": {
"thought": "\u5b66\u751f\u7406\u89e3\u4e86\u601d\u8003\u9898\u7684\u7b54\u6848\uff0c\u4e0b\u4e00\u6b65\u8fdb\u5165\u4e0b\u4e00\u8282\u3002",
"speak": "\u597d\u7684\uff0c\u4f60\u7684\u8ba1\u7b97\u65b9\u6cd5\u662f\u6b63\u786e\u7684\uff0c\u6700\u5dee\u60c5\u51b5\u4e0b\u9700\u8981\u731c\u6d4b13\u6b21\u3002\u6211\u4eec\u73b0\u5728\u53ef\u4ee5\u8fdb\u5165\u4e0b\u4e00\u8282\u3002",
"function": "[{\"name\": \"next_chapter\", \"arguments\": {}}]"
},
"role": "assistant",
"url": null,
"metadata": null
}
],
"score": 10,
"is_rebuttal": false,
"rebuttal_score": 0
}
]
}
],
"binary_search"
],
[
[],
"L002"
]
],
"course_put_in_date": "2024-01-01",
"course_last_study_date": "2024-12-25",
"course_total_study_time": 120
}
},
"data-structure": {
"course_process": {
"course_put_in_date": "",
"course_last_study_date": "2025-01-01",
"course_total_study_time": 0
},
"data-structure": {
"lesson_processs": [
{
"lesson_process": [
{
"chapter_info": {
"dialog": ["This is course2 chapter 1 dialog"],
"score": 88,
"is_rebuttal": false,
"rebuttal_score": 0
}
}
]
}
[
[],
"L001"
],
[
[],
"L002"
]
],
"course_put_in_date": "2024-01-01",
"course_last_study_date": "2024-12-25",
"course_total_study_time": 90
"course_put_in_date": "",
"course_last_study_date": "",
"course_total_study_time": 0
},
"CS101": {
"lesson_processs": [
[
[],
"L001"
],
[
[],
"L002"
]
],
"course_put_in_date": "",
"course_last_study_date": "",
"course_total_study_time": 0
}
}
}
}

View File

@@ -2,6 +2,6 @@
"user123": "password123",
"user456": "password456",
"user789": "password789",
"cake": "12138ckC"
}
"cake": "123123",
"a": "123123"
}