diff --git "a/Notebooks/CodeForge.ipynb" "b/Notebooks/CodeForge.ipynb" --- "a/Notebooks/CodeForge.ipynb" +++ "b/Notebooks/CodeForge.ipynb" @@ -2,7 +2,320 @@ "cells": [ { "cell_type": "code", - "execution_count": 134, + "execution_count": 1, + "id": "e02e1b00", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 1, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "import os\n", + "import cloudinary\n", + "import cloudinary.uploader\n", + "import requests\n", + "from io import BytesIO\n", + "from dotenv import load_dotenv\n", + "\n", + "load_dotenv()\n", + "\n", + "# Explicitly configure using your 3 credentials\n", + "cloudinary.config( \n", + " cloud_name = os.getenv('CLOUDINARY_CLOUD_NAME'), \n", + " api_key = os.getenv('CLOUDINARY_API_KEY'), \n", + " api_secret = os.getenv('CLOUDINARY_API_SECRET'),\n", + " secure = True\n", + ")\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "c11377c5", + "metadata": {}, + "outputs": [], + "source": [ + "import os\n", + "import cloudinary\n", + "import cloudinary.uploader\n", + "from dotenv import load_dotenv\n", + "\n", + "# 1. Load credentials from your .env file\n", + "load_dotenv()\n", + "\n", + "cloudinary.config( \n", + " cloud_name = os.getenv('CLOUDINARY_CLOUD_NAME'), \n", + " api_key = os.getenv('CLOUDINARY_API_KEY'), \n", + " api_secret = os.getenv('CLOUDINARY_API_SECRET'),\n", + " secure = True\n", + ")\n", + "\n", + "# 2. Set your variables\n", + "resume_path = r\"c:\\Users\\ATHARVA\\Downloads\\my codes\\python\\machine_learning\\Learning_Files\\ChirayuResume.pdf\"\n", + "thread_id = \"trial_thread_001\"\n", + "file_name = \"ChirayuResume\"\n", + "\n", + "# 3. Perform the upload\n", + "try:\n", + " response = cloudinary.uploader.upload(\n", + " resume_path,\n", + " folder = f\"threads/{thread_id}\",\n", + " public_id = file_name,\n", + " resource_type = \"image\" # Use \"image\" for PDFs to get previews in UI\n", + " )\n", + "\n", + " # 4. Create the URL from the response\n", + " pdf_url = response.get(\"secure_url\")\n", + " \n", + " print(f\"✅ Upload Successful!\")\n", + " print(f\"📂 Folder: threads/{thread_id}\")\n", + " print(f\"🔗 URL to push: {pdf_url}\")\n", + "\n", + "except Exception as e:\n", + " print(f\"❌ Upload failed: {e}\")\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "f986ff8f", + "metadata": {}, + "outputs": [], + "source": [ + "import requests\n", + "from io import BytesIO\n", + "\n", + "def get_pdf_for_ai(url):\n", + " # 1. Reach out to the URL\n", + " response = requests.get(url)\n", + " \n", + " if response.status_code == 200:\n", + " # 2. Convert the web response into a \"file-like\" object\n", + " pdf_stream = BytesIO(response.content)\n", + " print(\"✅ PDF loaded into memory for processing!\")\n", + " return pdf_stream\n", + " else:\n", + " print(f\"❌ Failed to fetch PDF. Status: {response.status_code}\")\n", + " return None\n", + "\n", + "# --- USE YOUR ACTUAL URL ---\n", + "resume_url = \"https://res.cloudinary.com/dvxnazx8e/image/upload/v1774166452/threads/trial_thread_001/ChirayuResume.pdf\"\n", + "pdf_data = get_pdf_for_ai(resume_url)\n" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "938186bf", + "metadata": {}, + "outputs": [], + "source": [ + "import cloudinary\n", + "from cloudinary import Search\n", + "\n", + "\n", + "def get_resume_url(thread_id: str) -> str:\n", + " \"\"\"\n", + " Searches Cloudinary for the resume PDF in the thread's folder\n", + " and returns the secure URL.\n", + " \"\"\"\n", + " result = Search() \\\n", + " .expression(f'folder:\"threads/{thread_id}/*\"') \\\n", + " .sort_by('public_id', 'desc') \\\n", + " .max_results(1) \\\n", + " .execute()\n", + "\n", + " resources = result.get(\"resources\", [])\n", + "\n", + " if not resources:\n", + " raise FileNotFoundError(f\"No resume found for thread_id: {thread_id}\")\n", + "\n", + " pdf_url = resources[0][\"secure_url\"]\n", + " print(f\"Found resume: {pdf_url}\")\n", + " return pdf_url" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "f4340cbb", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Found resume: https://res.cloudinary.com/dvxnazx8e/image/upload/v1774166452/threads/trial_thread_001/ChirayuResume.pdf\n", + "URL: https://res.cloudinary.com/dvxnazx8e/image/upload/v1774166452/threads/trial_thread_001/ChirayuResume.pdf\n", + "Pages loaded: 1\n", + "Preview:\n", + "Chirayu Jain\n", + "SOFTWARE DEVELOPER\n", + "+91-9462128878 | chirayujain93@gmail.com | LinkedIn | GitHub | CodeChef | Leetcode\n", + "EDUCATION\n", + "Indian Institute of Information Technology, Kota (CGPA-8.1)\n", + "Kota, Rajasthan\n", + "B.Tech in Electronics and Communication Engineering\n", + "2022 - Present\n", + "WORK EXPERIENCE\n", + "NAV India\n", + "Jan 2026 - Present\n", + "Technology Intern\n", + "Onsite – Jaipur, Rajasthan\n", + "• As part of the AI/ML team, built Flask API for the RTA investor verification team, implementing 2\n", + "confidence-scoring pipelines using OCR ext\n" + ] + } + ], + "source": [ + "import requests\n", + "import tempfile\n", + "import os\n", + "from langchain_community.document_loaders import PyMuPDFLoader\n", + "\n", + "thread_id = \"trial_thread_001\"\n", + "\n", + "try:\n", + " # Step 1 — Get URL from Cloudinary\n", + " url = get_resume_url(thread_id)\n", + " print(f\"URL: {url}\")\n", + "\n", + " # Step 2 — Fetch PDF bytes\n", + " response = requests.get(url)\n", + " response.raise_for_status()\n", + "\n", + " # Step 3 — Write to temp file\n", + " with tempfile.NamedTemporaryFile(delete=False, suffix=\".pdf\") as tmp:\n", + " tmp.write(response.content)\n", + " tmp_path = tmp.name\n", + "\n", + " # Step 4 — Load with PyMuPDF\n", + " loader = PyMuPDFLoader(tmp_path)\n", + " docs = loader.load()\n", + " resume_text = \"\\n\".join([doc.page_content for doc in docs])\n", + "\n", + " # Step 5 — Cleanup\n", + " os.remove(tmp_path)\n", + "\n", + " print(f\"Pages loaded: {len(docs)}\")\n", + " print(f\"Preview:\\n{resume_text[:500]}\")\n", + "\n", + "except FileNotFoundError as e:\n", + " print(f\"Not found: {e}\")\n", + "except Exception as e:\n", + " print(f\"Error: {e}\")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "b010e49b", + "metadata": {}, + "outputs": [], + "source": [ + "from langchain_community.document_loaders import PyMuPDFLoader" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "4559e021", + "metadata": {}, + "outputs": [], + "source": [ + "loader = PyMuPDFLoader()\n", + "docs = loader.load()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "7164448e", + "metadata": {}, + "outputs": [], + "source": [ + "resumepath=r\"c:\\Users\\ATHARVA\\Downloads\\my codes\\python\\machine_learning\\Learning_Files\\ChirayuResume.pdf\"" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "6d1029c0", + "metadata": {}, + "outputs": [], + "source": [ + "import cloudinary.uploader\n", + "import os\n", + "\n", + "# Your resume path (using 'r' for raw string to handle backslashes correctly)\n", + "resume_path = r\"c:\\Users\\ATHARVA\\Downloads\\my codes\\python\\machine_learning\\Learning_Files\\ChirayuResume.pdf\"\n", + "\n", + "# Extract filename without extension for the public_id\n", + "file_name = os.path.basename(resume_path).split('.')[0] \n", + "thread_id = \"trial_thread_001\"\n", + "\n", + "# Upload directly using the file path\n", + "upload_result = cloudinary.uploader.upload(\n", + " resume_path, \n", + " folder=f\"threads/{thread_id}\",\n", + " public_id=file_name,\n", + " resource_type=\"auto\" # Handles the PDF correctly\n", + ")\n", + "\n", + "print(f\"Upload Successful! URL: {upload_result['secure_url']}\")\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "928b7237", + "metadata": {}, + "outputs": [], + "source": [ + "import os\n", + "import requests\n", + "import cloudinary\n", + "from io import BytesIO\n", + "\n", + "# --- 1. CONFIGURATION (Do this once) ---\n", + "# This tells the library your API Key/Secret. \n", + "# In a real app, put this in your .env file!\n", + "os.environ[\"CLOUDINARY_URL\"] = \"cloudinary://866996699612973:9Tp3hGjI9npawSIrN4Mu4hFRwLQ@dtscmobmv\"\n", + "\n", + "def get_pdf_content(file_url):\n", + " \"\"\"\n", + " This function expects an HTTPS url, NOT the cloudinary:// credentials.\n", + " \"\"\"\n", + " # Ensure the URL is a real web link\n", + " if not file_url.startswith(\"http\"):\n", + " raise ValueError(\"The URL must start with http or https!\")\n", + "\n", + " response = requests.get(file_url)\n", + " if response.status_code == 200:\n", + " return BytesIO(response.content)\n", + " else:\n", + " print(f\"Error: Could not download file. Status: {response.status_code}\")\n", + " return None\n", + "\n", + "# --- 2. TESTING ---\n", + "# This is what the MERN devs will send you:\n", + "test_resume_url = \"https://res.cloudinary.com\"\n", + "\n", + "# This will now work!\n", + "pdf_file = get_pdf_content(test_resume_url)\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, "id": "b75a238a", "metadata": {}, "outputs": [], @@ -59,7 +372,7 @@ }, { "cell_type": "code", - "execution_count": 42, + "execution_count": null, "id": "7da5b1c6", "metadata": {}, "outputs": [], @@ -203,7 +516,7 @@ }, { "cell_type": "code", - "execution_count": 43, + "execution_count": null, "id": "4b2441cd", "metadata": {}, "outputs": [], @@ -316,7 +629,7 @@ }, { "cell_type": "code", - "execution_count": 44, + "execution_count": null, "id": "4f1341e0", "metadata": {}, "outputs": [], @@ -376,7 +689,7 @@ }, { "cell_type": "code", - "execution_count": 45, + "execution_count": null, "id": "18663bb3", "metadata": {}, "outputs": [], @@ -413,7 +726,7 @@ }, { "cell_type": "code", - "execution_count": 158, + "execution_count": null, "id": "14dab004", "metadata": {}, "outputs": [], @@ -443,7 +756,7 @@ }, { "cell_type": "code", - "execution_count": 163, + "execution_count": null, "id": "472dae2f", "metadata": {}, "outputs": [], @@ -473,7 +786,7 @@ }, { "cell_type": "code", - "execution_count": 164, + "execution_count": null, "id": "0d5e3b17", "metadata": {}, "outputs": [], @@ -505,7 +818,7 @@ }, { "cell_type": "code", - "execution_count": 165, + "execution_count": null, "id": "0ccc026b", "metadata": {}, "outputs": [], @@ -526,34 +839,10 @@ }, { "cell_type": "code", - "execution_count": 50, + "execution_count": null, "id": "c8827093", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Index ready: {'_response_info': {'raw_headers': {'connection': 'keep-alive',\n", - " 'content-length': '187',\n", - " 'content-type': 'application/json',\n", - " 'date': 'Sat, 21 Mar 2026 20:13:46 GMT',\n", - " 'grpc-status': '0',\n", - " 'server': 'envoy',\n", - " 'x-envoy-upstream-service-time': '67',\n", - " 'x-pinecone-request-latency-ms': '66',\n", - " 'x-pinecone-response-duration-ms': '69'}},\n", - " 'dimension': 384,\n", - " 'index_fullness': 0.0,\n", - " 'memoryFullness': 0.0,\n", - " 'metric': 'dotproduct',\n", - " 'namespaces': {'__default__': {'vector_count': 33}},\n", - " 'storageFullness': 0.0,\n", - " 'total_vector_count': 33,\n", - " 'vector_type': 'dense'}\n" - ] - } - ], + "outputs": [], "source": [ "\n", "\n", @@ -590,7 +879,7 @@ }, { "cell_type": "code", - "execution_count": 51, + "execution_count": null, "id": "7561b3a1", "metadata": {}, "outputs": [], @@ -616,7 +905,7 @@ }, { "cell_type": "code", - "execution_count": 52, + "execution_count": null, "id": "f0845a99", "metadata": {}, "outputs": [], @@ -626,63 +915,20 @@ }, { "cell_type": "code", - "execution_count": 53, + "execution_count": null, "id": "c8e6d2a5", "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "dcedae00e39246819acfab4728d68e9c", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Loading weights: 0%| | 0/103 [00:00" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], + "outputs": [], "source": [ "display(graph)" ] }, { "cell_type": "code", - "execution_count": 173, + "execution_count": null, "id": "0edf8d59", "metadata": {}, "outputs": [], @@ -1458,7 +1693,7 @@ }, { "cell_type": "code", - "execution_count": 177, + "execution_count": null, "id": "da3df5a4", "metadata": {}, "outputs": [], @@ -1497,54 +1732,12 @@ " print(f\"✅ UI Payload successfully exported to {filename}\")" ] }, - { - "cell_type": "code", - "execution_count": 182, - "id": "4577f33b", - "metadata": {}, - "outputs": [], - "source": [ - "from langchain_core.callbacks import BaseCallbackHandler\n", - "\n", - "class ExportHook(BaseCallbackHandler):\n", - " def __init__(self, filename=\"k_output.json\"):\n", - " self.filename = filename\n", - "\n", - " def on_chain_end(self, outputs: dict, *, run_id, parent_run_id=None, **kwargs):\n", - " \"\"\"\n", - " parent_run_id is None ONLY for the top-level graph execution.\n", - " This ensures it runs exactly once when the entire graph finishes.\n", - " \"\"\"\n", - " # 1. Only run for the root graph (no parent)\n", - " if parent_run_id is not None:\n", - " return\n", - "\n", - " # 2. Safety check: ensure 'outputs' is actually a dictionary\n", - " if not isinstance(outputs, dict):\n", - " return\n", - "\n", - " print(f\"📦 Exporting final graph payload...\")\n", - " export_ui_payload(outputs, filename=self.filename)\n", - "\n", - "# Usage remains the same\n", - "\n" - ] - }, { "cell_type": "code", "execution_count": null, "id": "a95b4db7", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "DEBUGGER: Sending 525 characters to JD Agent...\n", - "DEBUGGER SUCCESS: Extracted Backend Developer\n" - ] - } - ], + "outputs": [], "source": [ "initial_input = {\n", " \"candidate_name\": \"Chirayu Jain\",\n", @@ -1573,75 +1766,10 @@ }, { "cell_type": "code", - "execution_count": 127, + "execution_count": null, "id": "5afbce5b", "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "{'candidate_name': 'Chirayu Jain',\n", - " 'resume_text': 'Chirayu Jain\\nSOFTWARE DEVELOPER\\n+91-9462128878 | chirayujain93@gmail.com | LinkedIn | GitHub | CodeChef | Leetcode\\nEDUCATION\\nIndian Institute of Information Technology, Kota (CGPA-8.1)\\nKota, Rajasthan\\nB.Tech in Electronics and Communication Engineering\\n2022 - Present\\nWORK EXPERIENCE\\nNAV India\\nJan 2026 - Present\\nTechnology Intern\\nOnsite – Jaipur, Rajasthan\\n• As part of the AI/ML team, built Flask API for the RTA investor verification team, implementing 2\\nconfidence-scoring pipelines using OCR extraction (PyMuPDF, Docling) to parse PDF/forms and\\nextract 3 key KYC investor attributes, reducing verification time from 20–30 minutes to 2–3 minutes.\\n• Developed a scalable document intelligence pipeline with parallel CPU processing using Docling OCR,\\nsemantic chunking, and LLM-based extraction to process 60+ page financial documents and identify\\ninvestor/investee details, reducing extraction time by 35%.\\n• Implementing Cron-based background workers to generate automated weekly email analytics reports\\ntracking API accuracy and confidence match-mismatch scores, improving scoring precision and reducing\\noverall document processing latency by 40%.\\nVestbox\\nApril 2025 - May 2025\\nSoftware Development intern\\nRemote\\n• Developed Groceazy app in Flutter (MVVM), integrating 10+ modules for grocery service , order management\\nand Applied clean code practices (SOLID, modular design) for scalability.\\n• Implemented secure user authentication and role-based access, ensuring smooth login and data protection.\\n• Built image-to-item price matcher using APIs across 5+ platforms, enabling best-price suggestions.\\nPROJECTS\\nHostel Bites – IIITK Canteen App | Flutter, Dart, Firebase, Cloud Firestore, Mapbox API\\n• Developed a Flutter app for hostel residents to order food, increasing canteen efficiency by 35%.\\n• Implemented role-based access for students, staff, and admin, increasing operational efficiency by 40%.\\n• Integrated Firebase Auth, Firestore, Storage, and Mapbox API for secure logins, and live order tracking.\\n• GitHub: Live link\\nJobShield - Fake Job Detector | Flutter, Dart, Python, Flask, SQLite\\n• Developed a Flask+Python fake job detection API with a custom NLP model, with 95% classification accuracy.\\n• Built a responsive web interface using Flutter (Web), integrated with the backend, enabling seamless real-time\\ndetection for 500+ job postings.\\n• Github: Live Link\\nTECHNICAL SKILLS\\nLanguages: C/C++ , Java , Python , JavaScript, Dart\\nFrontend: Flutter, HTML/CSS, ReactJS\\nBackend: Firebase, REST APIs, Flask, Django, NodeJS, ExpressJS\\nDatabase Management: MySQL, MongoDB, SQLite\\nTools and Frameworks: GitHub, Android Studio, Visual Studio Code, MATLAB, Cursor, Github Copilot\\nLibraries: Provider, Bloc, Scikit-learn, tensorflow\\nACHIEVEMENTS & CERTIFICATIONS\\n• Ranked 81 in Inter IIIT Coding Contest Optigo, competing against top-tier programmers - View credential.\\n• Obtained Certification in Graph Algorithms from AlgoUniversity - View credential.\\n• Achieved a 4-star CodeChef rating and earned the Knight(Max. 1888) badge on LeetCode.\\n• Developed an e-waste facility locator application for SIH’23, successfully advancing to the regionals.',\n", - " 'file_path': 'c:\\\\Users\\\\ATHARVA\\\\Downloads\\\\my codes\\\\python\\\\machine_learning\\\\Learning_Files\\\\ChirayuResume.pdf',\n", - " 'job_description': 'Job Title: Backend Developer\\n\\nCompany name: CodeForge\\nWe are hiring a Backend Developer to build scalable APIs and backend systems.\\n\\nResponsibilities:\\n- Develop REST APIs using FastAPI\\n- Design and manage PostgreSQL databases\\n- Implement authentication and authorization systems\\n- Optimize performance and scalability\\n\\nRequirements:\\n- Strong knowledge of Python\\n- Experience with FastAPI or Django\\n- Good understanding of SQL and database design\\n- Familiarity with Docker\\n\\nConstraints:\\n- Location: Pune only\\n- Full-time role ',\n", - " 'messages': [AIMessage(content='', additional_kwargs={'tool_calls': [{'id': 'functions.search_courses:0', 'function': {'arguments': '{\"category\":\"Backend\",\"level\":\"beginner\",\"query\":\"FastAPI\"}', 'name': 'search_courses'}, 'type': 'function'}]}, response_metadata={'token_usage': {'completion_tokens': 32, 'prompt_tokens': 1640, 'total_tokens': 1672, 'completion_time': 0.079339676, 'completion_tokens_details': None, 'prompt_time': 0.038547803, 'prompt_tokens_details': {'cached_tokens': 1280}, 'queue_time': 0.281301725, 'total_time': 0.117887479}, 'model_name': 'moonshotai/kimi-k2-instruct-0905', 'system_fingerprint': 'fp_00c37775b7', 'service_tier': 'on_demand', 'finish_reason': 'tool_calls', 'logprobs': None, 'model_provider': 'groq'}, id='lc_run--019d1214-3656-7230-9aa7-a78c866d9fd4-0', tool_calls=[{'name': 'search_courses', 'args': {'category': 'Backend', 'level': 'beginner', 'query': 'FastAPI'}, 'id': 'functions.search_courses:0', 'type': 'tool_call'}], invalid_tool_calls=[], usage_metadata={'input_tokens': 1640, 'output_tokens': 32, 'total_tokens': 1672, 'input_token_details': {'cache_read': 1280}}),\n", - " ToolMessage(content=\"ID: CS-FAST-101\\nTitle: None\\nDescription: Title: REST API Development with FastAPI. Description: Build production-ready REST APIs using FastAPI, covering routing, request validation with Pydantic, and basic authentication.. Outcomes: Create REST endpoints with path and query params, Validate request/response with Pydantic models, Implement JWT-based authentication\\nPrerequisites: ['CS-PY-101']\\nDuration: 6 hours\\n---\", name='search_courses', id='3b97803f-8036-43b8-a31d-2f1b50d72c14', tool_call_id='functions.search_courses:0'),\n", - " AIMessage(content='', additional_kwargs={'tool_calls': [{'id': 'functions.search_courses:1', 'function': {'arguments': '{\"category\":\"Database\",\"level\":\"beginner\",\"query\":\"PostgreSQL\"}', 'name': 'search_courses'}, 'type': 'function'}]}, response_metadata={'token_usage': {'completion_tokens': 32, 'prompt_tokens': 1781, 'total_tokens': 1813, 'completion_time': 0.078526168, 'completion_tokens_details': None, 'prompt_time': 0.050791493, 'prompt_tokens_details': {'cached_tokens': 1280}, 'queue_time': 0.287734077, 'total_time': 0.129317661}, 'model_name': 'moonshotai/kimi-k2-instruct-0905', 'system_fingerprint': 'fp_05df423bab', 'service_tier': 'on_demand', 'finish_reason': 'tool_calls', 'logprobs': None, 'model_provider': 'groq'}, id='lc_run--019d1214-3fa2-76b0-9dc8-1d2c0b01ff61-0', tool_calls=[{'name': 'search_courses', 'args': {'category': 'Database', 'level': 'beginner', 'query': 'PostgreSQL'}, 'id': 'functions.search_courses:1', 'type': 'tool_call'}], invalid_tool_calls=[], usage_metadata={'input_tokens': 1781, 'output_tokens': 32, 'total_tokens': 1813, 'input_token_details': {'cache_read': 1280}}),\n", - " ToolMessage(content='ID: CS-DB-101\\nTitle: None\\nDescription: Title: SQL Fundamentals for Backend Developers. Description: Foundational course covering relational database concepts, CRUD operations, and basic JOINs using SQLite and PostgreSQL.. Outcomes: Write basic SELECT queries with filters, Understand Primary and Foreign Keys, Perform data insertion, updates, and deletions\\nPrerequisites: []\\nDuration: 4 hours\\n---', name='search_courses', id='64af5ac2-b743-4c32-a73b-4fd8dc35a130', tool_call_id='functions.search_courses:1'),\n", - " AIMessage(content='', additional_kwargs={'tool_calls': [{'id': 'functions.search_courses:2', 'function': {'arguments': '{\"category\":\"DevOps\",\"level\":\"beginner\",\"query\":\"Docker\"}', 'name': 'search_courses'}, 'type': 'function'}]}, response_metadata={'token_usage': {'completion_tokens': 32, 'prompt_tokens': 1914, 'total_tokens': 1946, 'completion_time': 0.081289553, 'completion_tokens_details': None, 'prompt_time': 0.038772376, 'prompt_tokens_details': {'cached_tokens': 1792}, 'queue_time': 0.287688574, 'total_time': 0.120061929}, 'model_name': 'moonshotai/kimi-k2-instruct-0905', 'system_fingerprint': 'fp_05df423bab', 'service_tier': 'on_demand', 'finish_reason': 'tool_calls', 'logprobs': None, 'model_provider': 'groq'}, id='lc_run--019d1214-4326-7e41-a4b4-a509a4c5dd26-0', tool_calls=[{'name': 'search_courses', 'args': {'category': 'DevOps', 'level': 'beginner', 'query': 'Docker'}, 'id': 'functions.search_courses:2', 'type': 'tool_call'}], invalid_tool_calls=[], usage_metadata={'input_tokens': 1914, 'output_tokens': 32, 'total_tokens': 1946, 'input_token_details': {'cache_read': 1792}}),\n", - " ToolMessage(content='ID: CS-DOCKER-101\\nTitle: None\\nDescription: Title: Docker & Containerization Fundamentals. Description: Learn containerization fundamentals — writing Dockerfiles, managing images, volumes, and running multi-container apps with Docker Compose.. Outcomes: Write efficient multi-stage Dockerfiles, Manage container lifecycle and networking, Orchestrate multi-service apps with Docker Compose\\nPrerequisites: []\\nDuration: 5 hours\\n---\\nID: CS-LINUX-101\\nTitle: None\\nDescription: Title: Linux & Shell Scripting for Developers. Description: Practical Linux skills for developers covering file system navigation, permissions, process management, and bash scripting.. Outcomes: Navigate and manage the Linux file system, Write bash scripts for automation, Manage processes, cron jobs, and system services\\nPrerequisites: []\\nDuration: 5 hours\\n---', name='search_courses', id='39673178-0b41-453c-80ea-5d360a741d29', tool_call_id='functions.search_courses:2'),\n", - " AIMessage(content='', additional_kwargs={'tool_calls': [{'id': 'functions.get_course_by_id:3', 'function': {'arguments': '{\"course_id\":\"CS-PY-101\"}', 'name': 'get_course_by_id'}, 'type': 'function'}]}, response_metadata={'token_usage': {'completion_tokens': 24, 'prompt_tokens': 2133, 'total_tokens': 2157, 'completion_time': 0.067035318, 'completion_tokens_details': None, 'prompt_time': 0.101946396, 'prompt_tokens_details': {'cached_tokens': 1536}, 'queue_time': 0.280975424, 'total_time': 0.168981714}, 'model_name': 'moonshotai/kimi-k2-instruct-0905', 'system_fingerprint': 'fp_00c37775b7', 'service_tier': 'on_demand', 'finish_reason': 'tool_calls', 'logprobs': None, 'model_provider': 'groq'}, id='lc_run--019d1214-46a1-7213-82bc-083edbd92ffb-0', tool_calls=[{'name': 'get_course_by_id', 'args': {'course_id': 'CS-PY-101'}, 'id': 'functions.get_course_by_id:3', 'type': 'tool_call'}], invalid_tool_calls=[], usage_metadata={'input_tokens': 2133, 'output_tokens': 24, 'total_tokens': 2157, 'input_token_details': {'cache_read': 1536}}),\n", - " ToolMessage(content='{\\n \"course_id\": \"CS-PY-101\",\\n \"title\": \"Python Programming Fundamentals\",\\n \"level\": \"beginner\",\\n \"category\": \"Programming\",\\n \"description\": \"A comprehensive introduction to Python covering primitive and complex data types, control flow structures, function design, object-oriented programming principles, exception handling, and file I/O. Students build a strong syntactic and conceptual foundation before moving to applied domains.\",\\n \"learning_outcomes\": [\\n \"Write clean Python functions and classes\",\\n \"Understand list, dict, and set operations\",\\n \"Handle exceptions and file I/O\"\\n ],\\n \"prerequisites\": [],\\n \"estimated_duration_hours\": 6,\\n \"tags\": [\\n \"Python\",\\n \"Programming\",\\n \"OOP\"\\n ]\\n}', name='get_course_by_id', id='c811ad56-358d-4556-a77f-def55fa2c7eb', tool_call_id='functions.get_course_by_id:3'),\n", - " AIMessage(content='', additional_kwargs={'tool_calls': [{'id': 'functions.search_courses:4', 'function': {'arguments': '{\"category\":\"Backend\",\"level\":\"beginner\",\"query\":\"professional skills\"}', 'name': 'search_courses'}, 'type': 'function'}]}, response_metadata={'token_usage': {'completion_tokens': 32, 'prompt_tokens': 2339, 'total_tokens': 2371, 'completion_time': 0.095311384, 'completion_tokens_details': None, 'prompt_time': 0.071666636, 'prompt_tokens_details': {'cached_tokens': 1792}, 'queue_time': 0.287408461, 'total_time': 0.16697802}, 'model_name': 'moonshotai/kimi-k2-instruct-0905', 'system_fingerprint': 'fp_05df423bab', 'service_tier': 'on_demand', 'finish_reason': 'tool_calls', 'logprobs': None, 'model_provider': 'groq'}, id='lc_run--019d1214-4896-79b0-994f-43c80e89e639-0', tool_calls=[{'name': 'search_courses', 'args': {'category': 'Backend', 'level': 'beginner', 'query': 'professional skills'}, 'id': 'functions.search_courses:4', 'type': 'tool_call'}], invalid_tool_calls=[], usage_metadata={'input_tokens': 2339, 'output_tokens': 32, 'total_tokens': 2371, 'input_token_details': {'cache_read': 1792}}),\n", - " ToolMessage(content=\"ID: CS-FAST-101\\nTitle: None\\nDescription: Title: REST API Development with FastAPI. Description: Build production-ready REST APIs using FastAPI, covering routing, request validation with Pydantic, and basic authentication.. Outcomes: Create REST endpoints with path and query params, Validate request/response with Pydantic models, Implement JWT-based authentication\\nPrerequisites: ['CS-PY-101']\\nDuration: 6 hours\\n---\", name='search_courses', id='021c4097-6b82-4a44-8694-9c6610baa1ec', tool_call_id='functions.search_courses:4'),\n", - " AIMessage(content='', additional_kwargs={'tool_calls': [{'id': 'functions.search_courses:5', 'function': {'arguments': '{\"category\":\"Backend\",\"level\":\"beginner\",\"query\":\"agile professional skills\"}', 'name': 'search_courses'}, 'type': 'function'}]}, response_metadata={'token_usage': {'completion_tokens': 34, 'prompt_tokens': 2480, 'total_tokens': 2514, 'completion_time': 0.093498688, 'completion_tokens_details': None, 'prompt_time': 0.028057542, 'prompt_tokens_details': {'cached_tokens': 2304}, 'queue_time': 0.284874636, 'total_time': 0.12155623}, 'model_name': 'moonshotai/kimi-k2-instruct-0905', 'system_fingerprint': 'fp_05df423bab', 'service_tier': 'on_demand', 'finish_reason': 'tool_calls', 'logprobs': None, 'model_provider': 'groq'}, id='lc_run--019d1214-4bd5-7262-bb3f-898f9b25b128-0', tool_calls=[{'name': 'search_courses', 'args': {'category': 'Backend', 'level': 'beginner', 'query': 'agile professional skills'}, 'id': 'functions.search_courses:5', 'type': 'tool_call'}], invalid_tool_calls=[], usage_metadata={'input_tokens': 2480, 'output_tokens': 34, 'total_tokens': 2514, 'input_token_details': {'cache_read': 2304}}),\n", - " ToolMessage(content=\"ID: CS-FAST-101\\nTitle: None\\nDescription: Title: REST API Development with FastAPI. Description: Build production-ready REST APIs using FastAPI, covering routing, request validation with Pydantic, and basic authentication.. Outcomes: Create REST endpoints with path and query params, Validate request/response with Pydantic models, Implement JWT-based authentication\\nPrerequisites: ['CS-PY-101']\\nDuration: 6 hours\\n---\", name='search_courses', id='48de42c6-381f-4dd2-a6ce-6d820c64975a', tool_call_id='functions.search_courses:5'),\n", - " AIMessage(content='', additional_kwargs={'tool_calls': [{'id': 'functions.search_courses:6', 'function': {'arguments': '{\"category\":\"Backend\",\"level\":\"beginner\",\"query\":\"soft skills\"}', 'name': 'search_courses'}, 'type': 'function'}]}, response_metadata={'token_usage': {'completion_tokens': 32, 'prompt_tokens': 2623, 'total_tokens': 2655, 'completion_time': 0.092443261, 'completion_tokens_details': None, 'prompt_time': 0.07918841, 'prompt_tokens_details': {'cached_tokens': 2304}, 'queue_time': 0.284959911, 'total_time': 0.171631671}, 'model_name': 'moonshotai/kimi-k2-instruct-0905', 'system_fingerprint': 'fp_05df423bab', 'service_tier': 'on_demand', 'finish_reason': 'tool_calls', 'logprobs': None, 'model_provider': 'groq'}, id='lc_run--019d1214-4f15-7942-9c7e-9a48b17e1d04-0', tool_calls=[{'name': 'search_courses', 'args': {'category': 'Backend', 'level': 'beginner', 'query': 'soft skills'}, 'id': 'functions.search_courses:6', 'type': 'tool_call'}], invalid_tool_calls=[], usage_metadata={'input_tokens': 2623, 'output_tokens': 32, 'total_tokens': 2655, 'input_token_details': {'cache_read': 2304}}),\n", - " ToolMessage(content=\"ID: CS-FAST-101\\nTitle: None\\nDescription: Title: REST API Development with FastAPI. Description: Build production-ready REST APIs using FastAPI, covering routing, request validation with Pydantic, and basic authentication.. Outcomes: Create REST endpoints with path and query params, Validate request/response with Pydantic models, Implement JWT-based authentication\\nPrerequisites: ['CS-PY-101']\\nDuration: 6 hours\\n---\", name='search_courses', id='e5585d48-0791-4a21-8e87-42f0bde91e2f', tool_call_id='functions.search_courses:6'),\n", - " AIMessage(content='', additional_kwargs={'tool_calls': [{'id': 'functions.search_courses:7', 'function': {'arguments': '{\"category\":\"Backend\",\"level\":\"beginner\",\"query\":\"SOFT-AGILE\"}', 'name': 'search_courses'}, 'type': 'function'}]}, response_metadata={'token_usage': {'completion_tokens': 35, 'prompt_tokens': 2764, 'total_tokens': 2799, 'completion_time': 0.102256011, 'completion_tokens_details': None, 'prompt_time': 0.153939367, 'prompt_tokens_details': {'cached_tokens': 2048}, 'queue_time': 0.282748693, 'total_time': 0.256195378}, 'model_name': 'moonshotai/kimi-k2-instruct-0905', 'system_fingerprint': 'fp_00c37775b7', 'service_tier': 'on_demand', 'finish_reason': 'tool_calls', 'logprobs': None, 'model_provider': 'groq'}, id='lc_run--019d1214-52a0-7a52-9cbf-57ddf6335d6d-0', tool_calls=[{'name': 'search_courses', 'args': {'category': 'Backend', 'level': 'beginner', 'query': 'SOFT-AGILE'}, 'id': 'functions.search_courses:7', 'type': 'tool_call'}], invalid_tool_calls=[], usage_metadata={'input_tokens': 2764, 'output_tokens': 35, 'total_tokens': 2799, 'input_token_details': {'cache_read': 2048}}),\n", - " ToolMessage(content=\"ID: CS-FAST-101\\nTitle: None\\nDescription: Title: REST API Development with FastAPI. Description: Build production-ready REST APIs using FastAPI, covering routing, request validation with Pydantic, and basic authentication.. Outcomes: Create REST endpoints with path and query params, Validate request/response with Pydantic models, Implement JWT-based authentication\\nPrerequisites: ['CS-PY-101']\\nDuration: 6 hours\\n---\", name='search_courses', id='75dc79e6-2341-4884-aa47-6ee66f1655ce', tool_call_id='functions.search_courses:7'),\n", - " AIMessage(content='', additional_kwargs={'tool_calls': [{'id': 'functions.search_courses:8', 'function': {'arguments': '{\"category\":\"Backend\",\"level\":\"beginner\",\"query\":\"professional\"}', 'name': 'search_courses'}, 'type': 'function'}]}, response_metadata={'token_usage': {'completion_tokens': 31, 'prompt_tokens': 2908, 'total_tokens': 2939, 'completion_time': 0.091088768, 'completion_tokens_details': None, 'prompt_time': 0.170027002, 'prompt_tokens_details': {'cached_tokens': 1280}, 'queue_time': 0.281245115, 'total_time': 0.26111577}, 'model_name': 'moonshotai/kimi-k2-instruct-0905', 'system_fingerprint': 'fp_241bc7119c', 'service_tier': 'on_demand', 'finish_reason': 'tool_calls', 'logprobs': None, 'model_provider': 'groq'}, id='lc_run--019d1214-5637-7533-8d4d-73bd8a9e4a8d-0', tool_calls=[{'name': 'search_courses', 'args': {'category': 'Backend', 'level': 'beginner', 'query': 'professional'}, 'id': 'functions.search_courses:8', 'type': 'tool_call'}], invalid_tool_calls=[], usage_metadata={'input_tokens': 2908, 'output_tokens': 31, 'total_tokens': 2939, 'input_token_details': {'cache_read': 1280}}),\n", - " ToolMessage(content=\"ID: CS-FAST-101\\nTitle: None\\nDescription: Title: REST API Development with FastAPI. Description: Build production-ready REST APIs using FastAPI, covering routing, request validation with Pydantic, and basic authentication.. Outcomes: Create REST endpoints with path and query params, Validate request/response with Pydantic models, Implement JWT-based authentication\\nPrerequisites: ['CS-PY-101']\\nDuration: 6 hours\\n---\", name='search_courses', id='0013afed-d715-4e7c-bfaf-79f242fcb16b', tool_call_id='functions.search_courses:8'),\n", - " AIMessage(content='', additional_kwargs={'tool_calls': [{'id': 'functions.submit_final_roadmap:9', 'function': {'arguments': '{\"candidate_name\":\"Candidate\",\"onboarding_summary\":\"The candidate has solid Python/Django experience but lacks exposure to FastAPI, PostgreSQL, and Docker—core requirements for this backend role. As a fresher, foundational training is prioritized to build missing competencies quickly and effectively.\",\"roadmap\":[{\"course_id\":\"CS-PY-101\",\"is_foundation\":true,\"reasoning\":\"Prerequisite for FastAPI course; ensures strong Python foundation before API development.\",\"sequence_order\":1,\"title\":\"Python Programming Fundamentals\"},{\"course_id\":\"CS-FAST-101\",\"is_foundation\":true,\"reasoning\":\"High-priority gap: JD requires FastAPI; candidate has no prior experience with this framework.\",\"sequence_order\":2,\"title\":\"REST API Development with FastAPI\"},{\"course_id\":\"CS-DB-101\",\"is_foundation\":true,\"reasoning\":\"High-priority gap: JD requires PostgreSQL; candidate only has MySQL/SQLite experience.\",\"sequence_order\":3,\"title\":\"SQL Fundamentals for Backend Developers\"},{\"course_id\":\"CS-DOCKER-101\",\"is_foundation\":false,\"reasoning\":\"Medium-priority gap: JD requires Docker; candidate has no containerization experience.\",\"sequence_order\":4,\"title\":\"Docker \\\\u0026 Containerization Fundamentals\"}],\"target_role\":\"Backend Developer\"}', 'name': 'submit_final_roadmap'}, 'type': 'function'}]}, response_metadata={'token_usage': {'completion_tokens': 317, 'prompt_tokens': 3048, 'total_tokens': 3365, 'completion_time': 0.865973233, 'completion_tokens_details': None, 'prompt_time': 0.098265353, 'prompt_tokens_details': {'cached_tokens': 2560}, 'queue_time': 0.280870105, 'total_time': 0.964238586}, 'model_name': 'moonshotai/kimi-k2-instruct-0905', 'system_fingerprint': 'fp_00c37775b7', 'service_tier': 'on_demand', 'finish_reason': 'tool_calls', 'logprobs': None, 'model_provider': 'groq'}, id='lc_run--019d1214-59d4-76e1-98c6-61e42b9047b9-0', tool_calls=[{'name': 'submit_final_roadmap', 'args': {'candidate_name': 'Candidate', 'onboarding_summary': 'The candidate has solid Python/Django experience but lacks exposure to FastAPI, PostgreSQL, and Docker—core requirements for this backend role. As a fresher, foundational training is prioritized to build missing competencies quickly and effectively.', 'roadmap': [{'course_id': 'CS-PY-101', 'is_foundation': True, 'reasoning': 'Prerequisite for FastAPI course; ensures strong Python foundation before API development.', 'sequence_order': 1, 'title': 'Python Programming Fundamentals'}, {'course_id': 'CS-FAST-101', 'is_foundation': True, 'reasoning': 'High-priority gap: JD requires FastAPI; candidate has no prior experience with this framework.', 'sequence_order': 2, 'title': 'REST API Development with FastAPI'}, {'course_id': 'CS-DB-101', 'is_foundation': True, 'reasoning': 'High-priority gap: JD requires PostgreSQL; candidate only has MySQL/SQLite experience.', 'sequence_order': 3, 'title': 'SQL Fundamentals for Backend Developers'}, {'course_id': 'CS-DOCKER-101', 'is_foundation': False, 'reasoning': 'Medium-priority gap: JD requires Docker; candidate has no containerization experience.', 'sequence_order': 4, 'title': 'Docker & Containerization Fundamentals'}], 'target_role': 'Backend Developer'}, 'id': 'functions.submit_final_roadmap:9', 'type': 'tool_call'}], invalid_tool_calls=[], usage_metadata={'input_tokens': 3048, 'output_tokens': 317, 'total_tokens': 3365, 'input_token_details': {'cache_read': 2560}}),\n", - " ToolMessage(content='{\"candidate_name\": \"Candidate\", \"target_role\": \"Backend Developer\", \"onboarding_summary\": \"The candidate has solid Python/Django experience but lacks exposure to FastAPI, PostgreSQL, and Docker—core requirements for this backend role. As a fresher, foundational training is prioritized to build missing competencies quickly and effectively.\", \"roadmap\": [{\"course_id\": \"CS-PY-101\", \"title\": \"Python Programming Fundamentals\", \"reasoning\": \"Prerequisite for FastAPI course; ensures strong Python foundation before API development.\", \"is_foundation\": true, \"sequence_order\": 1}, {\"course_id\": \"CS-FAST-101\", \"title\": \"REST API Development with FastAPI\", \"reasoning\": \"High-priority gap: JD requires FastAPI; candidate has no prior experience with this framework.\", \"is_foundation\": true, \"sequence_order\": 2}, {\"course_id\": \"CS-DB-101\", \"title\": \"SQL Fundamentals for Backend Developers\", \"reasoning\": \"High-priority gap: JD requires PostgreSQL; candidate only has MySQL/SQLite experience.\", \"is_foundation\": true, \"sequence_order\": 3}, {\"course_id\": \"CS-DOCKER-101\", \"title\": \"Docker & Containerization Fundamentals\", \"reasoning\": \"Medium-priority gap: JD requires Docker; candidate has no containerization experience.\", \"is_foundation\": false, \"sequence_order\": 4}]}', name='submit_final_roadmap', id='27e25caf-4dc9-480c-abcd-245d7dd322a1', tool_call_id='functions.submit_final_roadmap:9'),\n", - " AIMessage(content='', additional_kwargs={'tool_calls': [{'id': 'functions.submit_mermaid_visualization:10', 'function': {'arguments': '{\"mermaid_code\":\"flowchart TD\\\\n A([Start — Candidate\\'s current skills]):::start\\\\n subgraph W1[\\\\\"Week 1 — Core foundations\\\\\"]\\\\n B[CS-PY-101\\\\nPython Programming Fundamentals]:::foundation\\\\n C[CS-FAST-101\\\\nREST API Development with FastAPI]:::gap\\\\n end\\\\n subgraph W2[\\\\\"Week 2 — Data \\\\u0026 deployment\\\\\"]\\\\n D[CS-DB-101\\\\nSQL Fundamentals for Backend Developers]:::gap\\\\n E[CS-DOCKER-101\\\\nDocker \\\\u0026 Containerization Fundamentals]:::gap\\\\n end\\\\n Z([Role-ready — Backend Developer]):::done\\\\n A --\\\\u003e B\\\\n B --\\\\u003e C\\\\n C --\\\\u003e D\\\\n D --\\\\u003e E\\\\n E --\\\\u003e Z\\\\n classDef gap fill:#EEEDFE,stroke:#534AB7,color:#26215C\\\\n classDef foundation fill:#E1F5EE,stroke:#0F6E56,color:#085041\\\\n classDef start fill:#1D9E75,stroke:#0F6E56,color:#E1F5EE\\\\n classDef done fill:#534AB7,stroke:#3C3489,color:#EEEDFE\"}', 'name': 'submit_mermaid_visualization'}, 'type': 'function'}]}, response_metadata={'token_usage': {'completion_tokens': 281, 'prompt_tokens': 3695, 'total_tokens': 3976, 'completion_time': 0.591981415, 'completion_tokens_details': None, 'prompt_time': 0.13173194, 'prompt_tokens_details': {'cached_tokens': 2816}, 'queue_time': 0.279077701, 'total_time': 0.723713355}, 'model_name': 'moonshotai/kimi-k2-instruct-0905', 'system_fingerprint': 'fp_241bc7119c', 'service_tier': 'on_demand', 'finish_reason': 'tool_calls', 'logprobs': None, 'model_provider': 'groq'}, id='lc_run--019d1214-5f0b-7961-97e0-127ed75ed0dc-0', tool_calls=[{'name': 'submit_mermaid_visualization', 'args': {'mermaid_code': 'flowchart TD\\n A([Start — Candidate\\'s current skills]):::start\\n subgraph W1[\"Week 1 — Core foundations\"]\\n B[CS-PY-101\\nPython Programming Fundamentals]:::foundation\\n C[CS-FAST-101\\nREST API Development with FastAPI]:::gap\\n end\\n subgraph W2[\"Week 2 — Data & deployment\"]\\n D[CS-DB-101\\nSQL Fundamentals for Backend Developers]:::gap\\n E[CS-DOCKER-101\\nDocker & Containerization Fundamentals]:::gap\\n end\\n Z([Role-ready — Backend Developer]):::done\\n A --> B\\n B --> C\\n C --> D\\n D --> E\\n E --> Z\\n classDef gap fill:#EEEDFE,stroke:#534AB7,color:#26215C\\n classDef foundation fill:#E1F5EE,stroke:#0F6E56,color:#085041\\n classDef start fill:#1D9E75,stroke:#0F6E56,color:#E1F5EE\\n classDef done fill:#534AB7,stroke:#3C3489,color:#EEEDFE'}, 'id': 'functions.submit_mermaid_visualization:10', 'type': 'tool_call'}], invalid_tool_calls=[], usage_metadata={'input_tokens': 3695, 'output_tokens': 281, 'total_tokens': 3976, 'input_token_details': {'cache_read': 2816}}),\n", - " ToolMessage(content='Mermaid visualization stored successfully.', name='submit_mermaid_visualization', id='fede2020-92df-406c-a533-94aaba4301c0', tool_call_id='functions.submit_mermaid_visualization:10'),\n", - " AIMessage(content='', additional_kwargs={}, response_metadata={'token_usage': {'completion_tokens': 1, 'prompt_tokens': 4001, 'total_tokens': 4002, 'completion_time': 0.017057827, 'completion_tokens_details': None, 'prompt_time': 0.01031025, 'prompt_tokens_details': {'cached_tokens': 3840}, 'queue_time': None, 'total_time': 0.027368077}, 'model_name': 'moonshotai/kimi-k2-instruct-0905', 'system_fingerprint': 'fp_241bc7119c', 'service_tier': 'on_demand', 'finish_reason': 'stop', 'logprobs': None, 'model_provider': 'groq'}, id='lc_run--019d1214-6352-7e00-875a-f255a90094ea-0', tool_calls=[], invalid_tool_calls=[], usage_metadata={'input_tokens': 4001, 'output_tokens': 1, 'total_tokens': 4002, 'input_token_details': {'cache_read': 3840}})],\n", - " 'skill_gap_analysis_data': SkillGapAnalysis(job_title='Backend Developer', candidate_name=None, analyzed_gaps=[SkillGap(skill_name='FastAPI', gap_type='missing_foundation', priority='high', reasoning=\"JD requires FastAPI; candidate's resume shows no experience with FastAPI in skills, experience, or projects.\", target_competency='Develop high-performance asynchronous APIs using FastAPI'), SkillGap(skill_name='PostgreSQL', gap_type='missing_foundation', priority='high', reasoning='JD requires PostgreSQL; candidate has MySQL and SQLite experience but no record of using PostgreSQL.', target_competency='Design, query, and maintain PostgreSQL databases for backend services'), SkillGap(skill_name='Docker', gap_type='missing_foundation', priority='medium', reasoning=\"JD requires Docker for containerization; candidate's resume does not list Docker experience.\", target_competency='Containerize and deploy backend applications using Docker')], is_fresher_adaptation_needed=True, executive_summary=\"The candidate possesses solid Python and Django experience but lacks exposure to key backend infrastructure required for this role. As a fresher, foundational training is needed for FastAPI, PostgreSQL, and Docker to meet the job's core competencies.\"),\n", - " 'resume_data': ResumeExtract(job_title='Software Developer', total_experience_months=7, skills=[Skill(name='C/C++', category='Other'), Skill(name='Java', category='Backend'), Skill(name='Python', category='Backend'), Skill(name='JavaScript', category='Frontend'), Skill(name='Dart', category='Frontend'), Skill(name='Flutter', category='Frontend'), Skill(name='HTML/CSS', category='Frontend'), Skill(name='ReactJS', category='Frontend'), Skill(name='Firebase', category='Backend'), Skill(name='REST APIs', category='Backend'), Skill(name='Flask', category='Backend'), Skill(name='Django', category='Backend'), Skill(name='NodeJS', category='Backend'), Skill(name='ExpressJS', category='Backend'), Skill(name='MySQL', category='Other'), Skill(name='MongoDB', category='Other'), Skill(name='SQLite', category='Other'), Skill(name='GitHub', category='Other'), Skill(name='Android Studio', category='Other'), Skill(name='Visual Studio Code', category='Other'), Skill(name='MATLAB', category='Other'), Skill(name='Cursor', category='Other'), Skill(name='Github Copilot', category='Other'), Skill(name='Provider', category='Other'), Skill(name='Bloc', category='Other'), Skill(name='Scikit-learn', category='ML'), Skill(name='tensorflow', category='ML')], experience=[ExperienceItem(job_title='Technology Intern', experience_type='internship', duration_months=5, technologies=['Flask', 'PyMuPDF', 'Docling', 'OCR', 'LLM', 'Cron'], responsibilities=['Built Flask API for RTA investor verification with confidence-scoring pipelines', 'Developed scalable document intelligence pipeline for 60+ page financial docs', 'Implementing Cron-based workers for weekly email analytics reports']), ExperienceItem(job_title='Software Development Intern', experience_type='internship', duration_months=2, technologies=['Flutter', 'Dart', 'MVVM'], responsibilities=['Developed Groceazy grocery app with 10+ modules', 'Implemented secure user auth and role-based access', 'Built image-to-item price matcher across 5+ platforms'])], projects=[ProjectItem(name='Hostel Bites – IIITK Canteen App', technologies=['Flutter', 'Dart', 'Firebase', 'Cloud Firestore', 'Mapbox API'], what_was_built='Flutter app for hostel food ordering with live tracking and role-based access'), ProjectItem(name='JobShield - Fake Job Detector', technologies=['Flutter', 'Dart', 'Python', 'Flask', 'SQLite'], what_was_built='Fake job detection API with 95% accuracy and Flutter web interface')], certifications=[CertificationItem(name='Certification in Graph Algorithms', issuer='AlgoUniversity', topics_covered=['Graph Algorithms'])], achievements=[AchievementItem(title='Ranked 81 in Inter IIIT Coding Contest Optigo', domain='Competitive Programming'), AchievementItem(title='4-star CodeChef rating and Knight badge on LeetCode', domain='Competitive Programming'), AchievementItem(title='Advanced to regionals in SIH’23 with e-waste facility locator app', domain='Hackathon')], is_fresher=True),\n", - " 'extraction_error': None,\n", - " 'JobDescriptionExtract_data': JobDescriptionExtract(job_title='Backend Developer', company_name='CodeForge', location='Pune', employment_type='Full-time role', duration_months=None, is_fresher_allowed=None, skills_required=[SkillRequirement(name='Python', level=None), SkillRequirement(name='FastAPI', level=None), SkillRequirement(name='Django', level=None), SkillRequirement(name='SQL', level=None), SkillRequirement(name='PostgreSQL', level=None), SkillRequirement(name='Docker', level=None)], tools_technologies=None, responsibilities=[ResponsibilityItem(description='Develop REST APIs using FastAPI'), ResponsibilityItem(description='Design and manage PostgreSQL databases'), ResponsibilityItem(description='Implement authentication and authorization systems'), ResponsibilityItem(description='Optimize performance and scalability')], requirements=[RequirementItem(description='Strong knowledge of Python'), RequirementItem(description='Experience with FastAPI or Django'), RequirementItem(description='Good understanding of SQL and database design'), RequirementItem(description='Familiarity with Docker')], constraints=[ConstraintItem(type='location', value='Pune only'), ConstraintItem(type='employment type', value='Full-time role')]),\n", - " 'mermaid_code': 'flowchart TD\\n A([Start — Candidate\\'s current skills]):::start\\n subgraph W1[\"Week 1 — Core foundations\"]\\n B[CS-PY-101\\nPython Programming Fundamentals]:::foundation\\n C[CS-FAST-101\\nREST API Development with FastAPI]:::gap\\n end\\n subgraph W2[\"Week 2 — Data & deployment\"]\\n D[CS-DB-101\\nSQL Fundamentals for Backend Developers]:::gap\\n E[CS-DOCKER-101\\nDocker & Containerization Fundamentals]:::gap\\n end\\n Z([Role-ready — Backend Developer]):::done\\n A --> B\\n B --> C\\n C --> D\\n D --> E\\n E --> Z\\n classDef gap fill:#EEEDFE,stroke:#534AB7,color:#26215C\\n classDef foundation fill:#E1F5EE,stroke:#0F6E56,color:#085041\\n classDef start fill:#1D9E75,stroke:#0F6E56,color:#E1F5EE\\n classDef done fill:#534AB7,stroke:#3C3489,color:#EEEDFE',\n", - " 'final_roadmap': {'candidate_name': 'Candidate',\n", - " 'onboarding_summary': 'The candidate has solid Python/Django experience but lacks exposure to FastAPI, PostgreSQL, and Docker—core requirements for this backend role. As a fresher, foundational training is prioritized to build missing competencies quickly and effectively.',\n", - " 'roadmap': [{'course_id': 'CS-PY-101',\n", - " 'is_foundation': True,\n", - " 'reasoning': 'Prerequisite for FastAPI course; ensures strong Python foundation before API development.',\n", - " 'sequence_order': 1,\n", - " 'title': 'Python Programming Fundamentals'},\n", - " {'course_id': 'CS-FAST-101',\n", - " 'is_foundation': True,\n", - " 'reasoning': 'High-priority gap: JD requires FastAPI; candidate has no prior experience with this framework.',\n", - " 'sequence_order': 2,\n", - " 'title': 'REST API Development with FastAPI'},\n", - " {'course_id': 'CS-DB-101',\n", - " 'is_foundation': True,\n", - " 'reasoning': 'High-priority gap: JD requires PostgreSQL; candidate only has MySQL/SQLite experience.',\n", - " 'sequence_order': 3,\n", - " 'title': 'SQL Fundamentals for Backend Developers'},\n", - " {'course_id': 'CS-DOCKER-101',\n", - " 'is_foundation': False,\n", - " 'reasoning': 'Medium-priority gap: JD requires Docker; candidate has no containerization experience.',\n", - " 'sequence_order': 4,\n", - " 'title': 'Docker & Containerization Fundamentals'}],\n", - " 'target_role': 'Backend Developer'}}" - ] - }, - "execution_count": 127, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "final_state" ] @@ -1664,7 +1792,7 @@ }, { "cell_type": "code", - "execution_count": 128, + "execution_count": null, "id": "40a999a5", "metadata": {}, "outputs": [], @@ -1674,50 +1802,17 @@ }, { "cell_type": "code", - "execution_count": 129, + "execution_count": null, "id": "13d64ecc", "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "{'candidate_name': 'Candidate',\n", - " 'onboarding_summary': 'The candidate has solid Python/Django experience but lacks exposure to FastAPI, PostgreSQL, and Docker—core requirements for this backend role. As a fresher, foundational training is prioritized to build missing competencies quickly and effectively.',\n", - " 'roadmap': [{'course_id': 'CS-PY-101',\n", - " 'is_foundation': True,\n", - " 'reasoning': 'Prerequisite for FastAPI course; ensures strong Python foundation before API development.',\n", - " 'sequence_order': 1,\n", - " 'title': 'Python Programming Fundamentals'},\n", - " {'course_id': 'CS-FAST-101',\n", - " 'is_foundation': True,\n", - " 'reasoning': 'High-priority gap: JD requires FastAPI; candidate has no prior experience with this framework.',\n", - " 'sequence_order': 2,\n", - " 'title': 'REST API Development with FastAPI'},\n", - " {'course_id': 'CS-DB-101',\n", - " 'is_foundation': True,\n", - " 'reasoning': 'High-priority gap: JD requires PostgreSQL; candidate only has MySQL/SQLite experience.',\n", - " 'sequence_order': 3,\n", - " 'title': 'SQL Fundamentals for Backend Developers'},\n", - " {'course_id': 'CS-DOCKER-101',\n", - " 'is_foundation': False,\n", - " 'reasoning': 'Medium-priority gap: JD requires Docker; candidate has no containerization experience.',\n", - " 'sequence_order': 4,\n", - " 'title': 'Docker & Containerization Fundamentals'}],\n", - " 'target_role': 'Backend Developer'}" - ] - }, - "execution_count": 129, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "skill_gap_data" ] }, { "cell_type": "code", - "execution_count": 130, + "execution_count": null, "id": "25a6b5b4", "metadata": {}, "outputs": [], @@ -1758,18 +1853,10 @@ }, { "cell_type": "code", - "execution_count": 131, + "execution_count": null, "id": "26c10157", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "✅ UI Payload successfully exported to ai_output.json\n" - ] - } - ], + "outputs": [], "source": [ "export_ui_payload(final_state)" ]