diff --git a/src/components/Chatbot.js b/src/components/Chatbot.js index 6204440..4650eec 100644 --- a/src/components/Chatbot.js +++ b/src/components/Chatbot.js @@ -3,6 +3,7 @@ import axios from "axios"; import "./Chatbot.css"; const Chatbot = ({ context }) => { + const [messages, setMessages] = useState([ { role: "assistant", @@ -22,11 +23,11 @@ const Chatbot = ({ context }) => { Your role is to not only provide career suggestions but to analyze them based on salary potential, job stability, education costs, and market trends. Use the following user-specific data: - - Career Suggestions: ${context.data.careerSuggestions?.map((c) => c.title).join(", ") || "No suggestions available."} - - Selected Career: ${context.data.selectedCareer?.title || "None"} - - Schools: ${context.data.schools?.map((s) => s["INSTNM"]).join(", ") || "No schools available."} + - Career Suggestions: ${context.careerSuggestions?.map((c) => c.title).join(", ") || "No suggestions available."} + - Selected Career: ${context.selectedCareer?.title || "None"} + - Schools: ${context.schools?.map((s) => s["INSTNM"]).join(", ") || "No schools available."} - Median Salary: ${ - context.data.salaryData?.find((s) => s.percentile === "Median")?.value || "Unavailable" + context.salaryData?.find((s) => s.percentile === "Median")?.value || "Unavailable" } - ROI (Return on Investment): If available, use education costs vs. salary potential to guide users. diff --git a/src/components/Dashboard.js b/src/components/Dashboard.js index 0bf01dd..ac5a71f 100644 --- a/src/components/Dashboard.js +++ b/src/components/Dashboard.js @@ -272,6 +272,20 @@ async (career) => { ], }; + console.log("Passing context to Chatbot:", { + careerSuggestions, + riaSecScores, + selectedCareer, + schools, + salaryData, + economicProjections, + tuitionData, + userState, + areaTitle, + userZipcode, + results, + }); + return (
Loading Chatbot...
+ )} +