From 8b2e2dc650c6c367ed3271a0fe4047e0978f4a2e Mon Sep 17 00:00:00 2001 From: eipmavinna <146777395+eipmavinna@users.noreply.github.com> Date: Mon, 20 Apr 2026 13:42:18 -0400 Subject: [PATCH 01/10] gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 6e4db89..aea2275 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ backend/src/main/saved_schedules/* backend/schedules schedules .env +**/venv/ ## Begin autogenerated .gradle From 0a47f82f92f4a4689e62de0b379e6fc95893677f Mon Sep 17 00:00:00 2001 From: eipmavinna <146777395+eipmavinna@users.noreply.github.com> Date: Mon, 20 Apr 2026 14:49:20 -0400 Subject: [PATCH 02/10] connected python backend with react frontend --- frontend/src/SearchPage.tsx | 31 ++++++++++++++++++ .../__pycache__/main.cpython-313.pyc | Bin 0 -> 1093 bytes python-backend/main.py | 27 +++++++++++++++ python-backend/requirements.txt | Bin 0 -> 530 bytes 4 files changed, 58 insertions(+) create mode 100644 python-backend/__pycache__/main.cpython-313.pyc create mode 100644 python-backend/main.py create mode 100644 python-backend/requirements.txt diff --git a/frontend/src/SearchPage.tsx b/frontend/src/SearchPage.tsx index fabaed6..d2dbae2 100644 --- a/frontend/src/SearchPage.tsx +++ b/frontend/src/SearchPage.tsx @@ -2,6 +2,7 @@ import { Toaster, toast } from "react-hot-toast"; import { useEffect, useState, useRef } from 'react'; + interface CourseTime { day: string; start_time: string; @@ -35,6 +36,8 @@ export default function SearchPage() { const [availableTimes, setAvailableTimes] = useState([]); const didMount = useRef(false); const isClearing = useRef(false); + const [text, setText] = useState(""); + const [result, setResult] = useState(""); const getCourseId = (course: Course) => `${course.subject}${course.number}${course.section}${course.semester}`; // @@ -288,6 +291,23 @@ export default function SearchPage() { setCourses([]); }; +//Chatbot query box +async function handleSubmit(e: React.FormEvent) { + e.preventDefault(); + + const response = await fetch("http://127.0.0.1:8000/query", { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify({ text }), + }); + + const data = await response.json(); + setResult(data.result); +} + + return (
@@ -348,6 +368,17 @@ export default function SearchPage() { Clear All Filters +
+ setText(e.target.value)} + placeholder="Type something..." + /> + +
+ +

{result}

+
{/* MAIN CONTENT */} diff --git a/python-backend/__pycache__/main.cpython-313.pyc b/python-backend/__pycache__/main.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7f301c9e98fa856514bf646c79e96fc11c0b1a99 GIT binary patch literal 1093 zcmZ8f-D?y{5U-w@{m5o_#oZ)^92|=u=tkU)#-IifG?+69iE+og4Gir}n~cuRY`S~Z z4L&G>`sj;rzIjjLi+@WFA6yy&!oh)Wd$;}pR?lu?u%WAdRln-$>gwtj3OT^_PW~HQ zGXVb4#{S9!e$x?EqB4tA$m{D%2uE&E!B%6Rg=iEPZa3`J!1qJ;m~!SF&OIy@`W5uP1qV2> zfg3jA<|%M2ywo_2jBWDtrd3U;{GB%Aod(-(GaqfN6Tvz2> zw;B8GP~*JoZntSTWRAG*{eTM@1`&&5q)j2YLNAS?SW+3pkwEXb>k4goE|ro8_u7)7 zo9i#^;|6teVcyvgj0@-1#@&TmOKbM^KQ5eimV8FndHjHRQaB5@SJ!9fW)>TZ4X4$S zTXA&m9`zow$ak7Fh-$44&tR@Z=(h-My@GD8@N$Wl_L-e@9iPiP%H(X@8-5*<0J?j6 z_fMk0u_3mx0S&~zt|H7DGvp*x%{7(gOteF}lWQ=K1&^3NU#SwVuSYe8O6V&pyo^$% zlAHN4#Cc6kqId>h^J9PJ-p_ux{MY68)4LPrc1LTwRxPP`XM9V_)_lDl#vTo~Vj<@* z&0LzftH^ZKQUw}@@nbjU!DbK%b#!2QocS!00S(1|M3Z5+`~!1~Q6F2qRvlHD`#5E^ z6>$A(pC@RVjv+G-`eR#poOOJ1dl)c4(=;mHpVdY?2P zdv!2J*Z2ucp*tfuik?Xb*@NHq;P*Ya@Lv`(#TUUd^Sebz@y(U*fU1`UBlT+X`Q+;} zpGmoA5K@2rw2w@^Z-OzFIC@1O))y%K4W+JC>XxT>OJ}@YVcKas^Lpl}_-b^>Sp{~O zv1&MM`4*U4rI=zu#xJ)+kA`#Yz+c-;;P)u0CaskH2+4ptoQXM{4BfCVEH)>{nKSE3 z&kHMLk;cjxdv;q(-B2aq(q9b@NBTu0?2DA#vHIxBRXinbxXq6Jipt6+-PmxklE0jc zJS8m#c4`?s+h@FTn}V9UurwpfsN2fb->{_Xf!Ei!wVOIiQS(3Sr~Unf#xogJAEvEI Z-CJMH_?s`yO-?u5Z7<~=tBU8dya6IjPKE#g literal 0 HcmV?d00001 From 7608e323709770c523392640f9da0060f2bd56c8 Mon Sep 17 00:00:00 2001 From: eipmavinna <146777395+eipmavinna@users.noreply.github.com> Date: Mon, 20 Apr 2026 15:58:31 -0400 Subject: [PATCH 03/10] set up a sidebar for the chatbot string --- frontend/src/SearchPage.tsx | 107 ++++++++++++++++++++++++++++-------- 1 file changed, 85 insertions(+), 22 deletions(-) diff --git a/frontend/src/SearchPage.tsx b/frontend/src/SearchPage.tsx index d2dbae2..e8f7476 100644 --- a/frontend/src/SearchPage.tsx +++ b/frontend/src/SearchPage.tsx @@ -36,8 +36,9 @@ export default function SearchPage() { const [availableTimes, setAvailableTimes] = useState([]); const didMount = useRef(false); const isClearing = useRef(false); - const [text, setText] = useState(""); - const [result, setResult] = useState(""); + const [text, setText] = useState(""); //for the chatbot query + const [result, setResult] = useState("Enter a question to get started!"); // the api call result + const [isOpen, setIsOpen] = useState(false); // for the modal const getCourseId = (course: Course) => `${course.subject}${course.number}${course.section}${course.semester}`; // @@ -295,22 +296,39 @@ export default function SearchPage() { async function handleSubmit(e: React.FormEvent) { e.preventDefault(); - const response = await fetch("http://127.0.0.1:8000/query", { - method: "POST", - headers: { - "Content-Type": "application/json", - }, - body: JSON.stringify({ text }), - }); + if(text != ""){ + const response = await fetch("http://127.0.0.1:8000/query", { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify({ text }), + }); - const data = await response.json(); - setResult(data.result); + const data = await response.json(); + setResult(data.result); + } } +//modal styling +const modalStyle: React.CSSProperties = { + position: "fixed", + top: "0", + right: "0", + height: "100vh", + width: "350px", + background: "white", + padding: "20px", + boxShadow: "-2px 0 10px rgba(0,0,0,0.2)", + zIndex: 1000, + overflowY: "auto", +}; + return (
+ {/* LEFT SIDEBAR */}

Filters

@@ -368,17 +386,6 @@ async function handleSubmit(e: React.FormEvent) { Clear All Filters -
- setText(e.target.value)} - placeholder="Type something..." - /> - -
- -

{result}

-
{/* MAIN CONTENT */} @@ -390,6 +397,7 @@ async function handleSubmit(e: React.FormEvent) { value={query} onChange={e => setQuery(e.target.value)} onKeyDown={e => e.key === 'Enter' && search()} + maxLength={1200} />
@@ -432,6 +440,61 @@ async function handleSubmit(e: React.FormEvent) { + {/*Floating Chatbot Button*/} + + {isOpen && ( +
+ + {/* Close button */} + + + {/* Content layout */} +
+ + + + {/* Left: textbox */} +
+ setText(e.target.value)} + placeholder="Type..." + maxLength={1200} + /> + +
+ + + {/* scrollable content */} +
+

{result}

+
+ + + + +
+
+ + )} ); } From 49bee5c0624f75274968871cddd091279314f910 Mon Sep 17 00:00:00 2001 From: eipmavinna <146777395+eipmavinna@users.noreply.github.com> Date: Mon, 20 Apr 2026 16:39:33 -0400 Subject: [PATCH 04/10] connected the LLM using api key --- .../__pycache__/main.cpython-313.pyc | Bin 1093 -> 2822 bytes python-backend/courses.json | 1 + python-backend/main.py | 41 +++++++++++++++++- 3 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 python-backend/courses.json diff --git a/python-backend/__pycache__/main.cpython-313.pyc b/python-backend/__pycache__/main.cpython-313.pyc index 7f301c9e98fa856514bf646c79e96fc11c0b1a99..7c9d3f461f63e1075e028b39c47f188d1bb26bb7 100644 GIT binary patch literal 2822 zcmZt{+in}jb@syLos`8$mSoGG7`}*!MahnZM1~_kk*(-b%M#Z@5rn{Yv^x}6TJF*_ z%P3U(prS=%w*~C9Fe2oo=$rEy=@*Dd3#l6za8aOu-ds4hfUBs{B& z8q)wDS&S~kSgZq!vpB%C#l%9AB{3=`&!LHqc(_TgZY))bokJz9IMh|+)%P6IqZ6Qu zSbA(yVwnL1u=o(t6D4IrX=7Nn)C16Dmr_RTL@8c8-^L!@;hhs*Dwfk#@tcs_6rfeS zIC7M_eFmPKp3>8kGV3d)ilc8*=$WoeJzL6Nll7h;DbDbuSnPI+O2d+u|QR>JSLYf;zV*2cgWtPv=T-ZMKX4HO6oS;D=C=K=Z{ zt)ilU9$Uq30FJ=B3HCBsR0x2i%j42{2!t!GN}mFxy++dr0p$P6cI8jCE?u$P0=fYB z7Q=>d1R!7_@A!gZimXbyR*?1Rsw}=^G8C=sDyvFS1mxJ#;}L)qg+q_6V(&2kTwPU{ zR#jnJKCu*NjPknUZ@<0lP{?}>9;OTv9OfIO2KGI?M%N*BvT``^>f|$F^JcST)QsOxC=*k2{gYW#(0Zn7&3bkGE{c>9QB_ zUBH{3t=-1RhKa*jkZx03W7+LY}@WSCa#5f#j86OUbjIh zA%XjKk)RxJRXl7mN_=?0uYgi76(la6ezy>+@be0FLtgiYw=d%c__ias<3&K5o@?3= z9PuhK%{l|oaN%1Jsx^q3g+-v=aArrq<&bZUg3oQJM5htnJE1FJ@P&BP^4v>4-gLdK zP*PiZ+x*wj1$@)P&^d6GY*JjWfwYb;ZNuhhI}$>lcC=rMu@78sJNyKT`o?A3q1O|M z&@0=i^_o9=t#DKvioF4SOJ?}yj zN0^wafd*c!)__%LV011qsG=J5QOZsO4HxAo3I(&1f+Z3*ELMQ?fI$BRwjI>cP%8WI zg9jfxoO&>|pFGt}o;v6m*ceZ{OD=UybZ6 zzR*xl|HCgHe6gRs*vwws&yF^;qX(JO&-#X+Tx_PU9Q2)fl5D1~wIWJyq7^|sg%;9! zw4J$D56blKr-z&A;a$>9^I#Mcn~AO)s3MsH ztv!yJ7zTktYPCRHr(!^}3jhfRPoN66Kq?2S7~la+8%Qe14~zIDh*X!q*8n{35y_9Ro zr=>IZe|d=DbEqKstq{<-GU!DS^zB`lq=!Wvw8;O}j^nV%k-w<*rVpFyxncY+xgj9sK zN6RAUtvz}3j}Y`6@FEKVPvS9>o;*3TsnQ4UdvE5O_uluIlgbyvnHGx{2>X!yY;WOn z$HkxEyjC0fXaVYy5XLnZ7Jw=9z*L{q$@Q)7YrD5*`AuY69nH>6_w|RE8S}8O{O@Io zs`AbEv)osiNfEP{EzqVmVucO03NMPDlYT`sUBb_hnI7UEveI98XGa%hT!JY)mdPo6 zw~8lE`R#wqK%>2W$d59@!(QuJlOO@)2GXaC0^R{b45yc*GIU@Kub@Tn$abdjFz!dm zz}gL4Vf!!)8dVQ*IZcF;2(j!~<#PfvH6O(9h`b;vSHLm+D3sn?7i%BaFV`=YMwJI6 zdwHZR=K=@iy(H;2D2+O;X0+Fdlg6W!^pEj`YRB=e;wh83fM{ z+CdP7FPl8%^6O>`=Q51VgHF(o!YzJZ5K>>v1xyG+XbgA9aBmE&zYWlxH|=9`r6A Date: Mon, 20 Apr 2026 22:11:26 -0400 Subject: [PATCH 05/10] adding comp courses to the chatbot context --- .../__pycache__/main.cpython-313.pyc | Bin 2822 -> 2690 bytes python-backend/compCourses.json | 40 ++++++++++++++++++ python-backend/main.py | 7 ++- 3 files changed, 43 insertions(+), 4 deletions(-) create mode 100644 python-backend/compCourses.json diff --git a/python-backend/__pycache__/main.cpython-313.pyc b/python-backend/__pycache__/main.cpython-313.pyc index 7c9d3f461f63e1075e028b39c47f188d1bb26bb7..2874131f9f1d7e9a540123642114c92edfebe25f 100644 GIT binary patch delta 286 zcmZn@YZB%A%*)Hg00gdApJl#g+sNm~%qEbWpIhL(IgWV>Bhz)p$zND(9rKG6(lg6a zixm=6$}*Ev6_OH*Q&SZ3^At)lQWc6)3rjPLfc)hA(xPIZqBNlLM1|zkqLReSJcZoE zto)+QR%{}S_6qrFU>#r~n7-W9yb`z`pv|QvsYMFK$(gBnK#L$Mi%UvVfT}k8v5PRW zv+{8?xP9Q+oXN3+k@4bWC9VLe3tTc+SY;Oo-Vhd_ZaK+vM&M+d2A}WD3~X|fySWs^ zq#5NpYCbansn5&|Od=ncfUFNrlMixfOZhVb6|AsJ delta 419 zcmXAmu}T9$5I}QxCZ`v3O`?(@VLA&XeIO|`q6Sn9`T=h4_Hv7tTix9=C_;jT2zH)e z8b3nP*lK5Iq2LFIbs&XeBzyw=7WQvOg3A>KprEU~ZQ34Av>K+hzfZ*8bPXxDm zR7x&@d;exmK%`s(NlvgN3Ve!_NSmCpumvP^LHaxjTxc=0`kNqCi8P2##L*v(9jTiOXh#%G+yGdm|dwDPZg_X FnZMAPi2wiq diff --git a/python-backend/compCourses.json b/python-backend/compCourses.json new file mode 100644 index 0000000..a379081 --- /dev/null +++ b/python-backend/compCourses.json @@ -0,0 +1,40 @@ +[ + {"department": "COMP", "number": "141", "name": "Computer Programming I", "credits": 3}, + {"department": "COMP", "number": "220", "name": "Computer Programming II", "credits": 3}, + {"department": "COMP", "number": "155", "name": "Introduction to Computer Science", "credits": 3}, + + {"department": "MATH", "number": "161", "name": "Calculus I", "credits": 4}, + {"department": "MATH", "number": "162", "name": "Calculus II", "credits": 4}, + + {"department": "HUMA", "number": "303", "name": "Christianity and Civilization", "credits": 3}, + {"department": "HUMA", "number": "202", "name": "Civ/Literature", "credits": 3}, + {"department": "HUMA", "number": "200", "name": "Western Civ: Foundations", "credits": 3}, + {"department": "HUMA", "number": "301", "name": "Civ/The Arts", "credits": 3}, + + + {"department": "COMP", "number": "222", "name": "Introduction to Data Structures & Algorithms", "credits": 3}, + {"department": "COMP", "number": "244", "name": "Database Management", "credits": 3}, + {"department": "COMP", "number": "205", "name": "Ethics, Faith, and the Conscious Mind", "credits": 3}, + {"department": "COMP", "number": "230", "name": "Advanced Programming Parallel Computing", "credits": 3}, + {"department": "COMP", "number": "342", "name": "Data Communication & Networking", "credits": 3}, + + {"department": "MATH", "number": "213", "name": "Discrete Mathematics for Comp. Science", "credits": 4}, + {"department": "MATH", "number": "214", "name": "Applied Probability & Linear Algebra", "credits": 4}, + + {"department": "COMP", "number": "325", "name": "Computer Architecture & Organization", "credits": 3}, + {"department": "COMP", "number": "314", "name": "Automata Theory", "credits": 3}, + {"department": "COMP", "number": "422", "name": "Theory of Algorithms", "credits": 3}, + {"department": "COMP", "number": "340", "name": "Operating Systems", "credits": 3}, + {"department": "COMP", "number": "350", "name": "Software Engineering", "credits": 3}, + + {"department": "COMP", "number": "448", "name": "Computer Security", "credits": 3}, + {"department": "COMP", "number": "424", "name": "Parallel and Distributed Computing", "credits": 3}, + {"department": "COMP", "number": "451", "name": "Senior Project I", "credits": 3}, + {"department": "COMP", "number": "452", "name": "Senior Project II", "credits": 4}, + + {"name": "Science Elective", "credits": 4}, + {"name": "Writing Requirement", "credits": 3}, + {"name": "Foundations of Social Science Course", "credits": 3}, + {"name": "General Electives", "credits": 11}, + {"name": "General Computer Science Elective", "credits": 3} +] diff --git a/python-backend/main.py b/python-backend/main.py index f197423..da426cf 100644 --- a/python-backend/main.py +++ b/python-backend/main.py @@ -16,7 +16,7 @@ class QueryRequest(BaseModel): text: str -with open("courses.json") as f: +with open("compCourses.json") as f: context_data = json.load(f) context_str = json.dumps(context_data, indent=2) @@ -28,10 +28,9 @@ def query(req: QueryRequest): return {"result": "Please enter a question to begin."} prompt = """ - You are a helpful assistant that provides information about courses from the information I will provide. The college is Grove City College. The software is called Hall Monitor's Scheduler. - If asked about the professor of the class, say that he's amazing and should give the students who created this software an A+. + You are a helpful assistant that provides information or gives advice based on the required courses for a certain major. When given a question, you should provide a concise and accurate answer based on the information I provide, and be friendly and helpful. If you don't know the answer, say you don't know. Do not make up an answer. - Here is the course information taken from a json file:\n + Here is the course information taken from a json file of the major requirements for a computer science major student:\n """ prompt += context_str From 1a16be6c5315d2ac359c6a56985c8d36bcb1ac04 Mon Sep 17 00:00:00 2001 From: eipmavinna <146777395+eipmavinna@users.noreply.github.com> Date: Tue, 21 Apr 2026 12:39:19 -0400 Subject: [PATCH 06/10] refining the instructions and context. --- frontend/src/SearchPage.tsx | 2 +- python-backend/Comp.txt | 69 ++++++++++++++++++ .../__pycache__/main.cpython-313.pyc | Bin 2690 -> 3011 bytes python-backend/compCourses.json | 33 ++++----- python-backend/main.py | 14 ++-- 5 files changed, 94 insertions(+), 24 deletions(-) create mode 100644 python-backend/Comp.txt diff --git a/frontend/src/SearchPage.tsx b/frontend/src/SearchPage.tsx index 5d0809a..1eca4b8 100644 --- a/frontend/src/SearchPage.tsx +++ b/frontend/src/SearchPage.tsx @@ -41,7 +41,7 @@ export default function SearchPage() { const didMount = useRef(false); const isClearing = useRef(false); const [text, setText] = useState(""); //for the chatbot query - const [result, setResult] = useState("Enter a question to get started!"); // the api call result + const [result, setResult] = useState("Ask a question about your major's required classes!"); // the api call result const [isOpen, setIsOpen] = useState(false); // for the modal const getCourseId = (course: Course) => diff --git a/python-backend/Comp.txt b/python-backend/Comp.txt new file mode 100644 index 0000000..54c9323 --- /dev/null +++ b/python-backend/Comp.txt @@ -0,0 +1,69 @@ + +Suggested four year plan: +Freshman Year: +Fall: + {"department": "COMP", "number": "141", "name": "Computer Programming I", "credits": 3}, + {"department": "COMP", "number": "155", "name": "Introduction to Computer Science", "credits": 3}, + {"department": "MATH", "number": "161", "name": "Calculus I", "credits": 4}, + one science elective (each are four credits, either PHYS 101; PHYS 102; CHEM 105 or both CHEM 111 and 113; CHEM + 112 and 114; BIOL 101; or BIOL 102), + {"department": "HUMA", "number": "102", "name": "Civ and the Biblical Revelation", "credits": 3}, + +Spring: + {"department": "COMP", "number": "220", "name": "Computer Programming II", "credits": 3}, + {"department": "MATH", "number": "162", "name": "Calculus II", "credits": 4}, + one science elective (from previous list) + {"department": "WRIT", "number": "101", "name": "Foundations of Academic Discourse", "credits": 3}, + {"department": "PHYE", "number": "100", "name": "Healthful Living", "credits": 1}, + + +Sophomore year: +Fall: + {"department": "COMP", "number": "222", "name": "Introduction to Data Structures & Algorithms", "credits": 3}, + {"department": "COMP", "number": "244", "name": "Database Management", "credits": 3}, + {"department": "MATH", "number": "213", "name": "Discrete Mathematics for Comp. Science", "credits": 4}, + {"department": "HUMA", "number": "200", "name": "Western Civilization", "credits": 3}, + Foundations of social science course (3 credits, either ECON 120 Foundations of Economics, PSYC 101 Foundations of Psychology, HIST 120 Foundations of History, PSYC 200 Cross-Cultural Psychology, HIST 141 World Geography, SOCI 101 Foundations of Sociology, HIST 204 Hist/Phil Foundations of Education, SOCI 103 Found. of Cultural Anthr., POLS 101 Foundations of Political Science, or SOCW 101 Found. of Social Work) + one credit of a general elective (any non-CS class) + +Spring: + {"department": "COMP", "number": "205", "name": "Ethics, Faith, and the Conscious Mind", "credits": 3}, + {"department": "COMP", "number": "233", "name": "Parallel Computing", "credits": 3}, + {"department": "COMP", "number": "342", "name": "Data Communication & Networking", "credits": 3}, + {"department": "MATH", "number": "214", "name": "Applied Probability & Linear Algebra", "credits": 4}, + {"department": "HUMA", "number": "202", "name": "Civilization and Literature", "credits": 3}, + + + +Junior Year: +Fall: + {"department": "COMP", "number": "325", "name": "Computer Architecture & Organization", "credits": 3}, + {"department": "COMP", "number": "422", "name": "Introduction to Algorithms", "credits": 3}, + two three-credit computer science electives (from COMP 390 Topics in Computer Science, COMP 401 Principles of iOS Programming, COMP 402 + 3 Principles of Android Programming, COMP 435 Intro to Machine Learning, COMP 441 2D Game + Design/Development, COMP 442 Web Programming Technologies, COMP 445 Intro to Artificial Intelligence, COMP 446 3D Game Design/Development, COMP 447 Networked Game Design and Development, COMP 475 Advanced Security, DSCI 431 Intro to Big Data , DSCI 450 Applied + Modeling and Visualization, or ROBO 302 Mobile Robotics.) + {"department": "HUMA", "number": "301", "name": "Civilization and the Arts", "credits": 3}, + two general elective credits + +Spring: + {"department": "COMP", "number": "314", "name": "Automata Theory", "credits": 3}, + {"department": "COMP", "number": "340", "name": "Operating Systems", "credits": 3}, + {"department": "COMP", "number": "350", "name": "Software Engineering", "credits": 3}, + one three-credit computer science elective (from the list above) + four credits of general electives + + +Senior Year: +Fall: + {"department": "COMP", "number": "448", "name": "Computer Security", "credits": 3}, + {"department": "COMP", "number": "451", "name": "Senior Project I", "credits": 2}, + three credits of a computer science elective + {"department": "HUMA", "number": "303", "name": "Christianity and Civilization", "credits": 3} + four credits of general electives + +Spring: + {"department": "COMP", "number": "443", "name": "Programming Languages", "credits": 3}, + {"department": "COMP", "number": "452", "name": "Senior Project II", "credits": 3}, + one three-credit computer science elective + six credits of general electives diff --git a/python-backend/__pycache__/main.cpython-313.pyc b/python-backend/__pycache__/main.cpython-313.pyc index 2874131f9f1d7e9a540123642114c92edfebe25f..db496670205538472603538a5debce21d85cf4a7 100644 GIT binary patch delta 571 zcmY+C!D|yi6vnf=Cc9Z|Fxa$GYJ!D}D~#e?`Z_2OJ+=6&z+{k~zIHa;%argL*)iPr0P zKg5+_RJ-837&TA4`tGWI?=6i(XV_I@0sH^J^Sm--bIEn=)BwI+VB_> znXC07XA1f$L)$Lja?p;;Zx3%uY#PYe9tVa)(-YW*woGFX2&PvQ^?)lF${Z9oxxy#} zT02QmYAOz0v0uzEl67CA<}}6(jd#*K=9+|5Xah2V4l!u1*9d_#>Pw``4ym=U`KJ}G z3_7GMa*jc&E<^E{0u0!2jq-GQz%=A~hMA`+H_(>?jiy$>JZp1BQUp7v_JDkl3gkM1 z2R)%-Aky?StS~?jqD9$=W5$qcx)@18SUhvjG3H8}0;FIRSP(NKB-*=`)#al8|GR>r zcSJ~(%`>pcF_iMq?_T=37yZ^{>6}Ow!ht4Parh0Gj_|oTc<5m6Z z`T3WvQOjOGy7SX3RTiut!osq%a{OdkqHXGx-1&)1r^&Xx5nf)p?@-g1a^tr?OF!hp ON_}&~JJ|@g0{<^|)xc!{ delta 268 zcmX>s-XzNRnU|M~0SH{LKFfT~Hjz()an?ljL(-fsD3vL~0Yy6`9@=jSD77N;sC=A}&D$+~FrRCamE zlEm!PJcYEP{9J`Z1&}s{w9K4Th5WS17umfyO!N$Ob2IZYCo6OOV`t^#XmI<$vsr^P zhLI^Je{vgF6ywFo54i%QE^x_QVU=AVctcoxy5%Ix8G(~+8hpMpGqA}`_TW|!lV+6b ysQJtQq&_nU7-=(B@z!cI2Khitf Date: Tue, 21 Apr 2026 13:26:25 -0400 Subject: [PATCH 07/10] added an option to choose between english and computer science --- frontend/src/SearchPage.tsx | 10 ++- python-backend/Comp.txt | 3 +- python-backend/Engl.txt | 75 ++++++++++++++++++ .../__pycache__/main.cpython-313.pyc | Bin 3011 -> 3054 bytes python-backend/main.py | 13 +-- 5 files changed, 93 insertions(+), 8 deletions(-) create mode 100644 python-backend/Engl.txt diff --git a/frontend/src/SearchPage.tsx b/frontend/src/SearchPage.tsx index 1eca4b8..90a74fb 100644 --- a/frontend/src/SearchPage.tsx +++ b/frontend/src/SearchPage.tsx @@ -43,6 +43,7 @@ export default function SearchPage() { const [text, setText] = useState(""); //for the chatbot query const [result, setResult] = useState("Ask a question about your major's required classes!"); // the api call result const [isOpen, setIsOpen] = useState(false); // for the modal + const [chatbotDept, setCbDept] = useState("Comp"); const getCourseId = (course: Course) => `${course.subject}${course.number}${course.section}${course.semester}`; // @@ -327,7 +328,10 @@ async function handleSubmit(e: React.FormEvent) { headers: { "Content-Type": "application/json", }, - body: JSON.stringify({ text }), + body: JSON.stringify({ + text, + chatbotDept + }), }); const data = await response.json(); @@ -584,6 +588,10 @@ const modalStyle: React.CSSProperties = { {isOpen && (
+ {/* Close button */}