autograder-org / autoGrader-frontend

An automated assignment grading system that leverages LLMs and AI to enhance grading efficiency and reliability. It includes modules for data input, criteria definition, AI integration, consistency checks, and comprehensive reporting, aimed at improving educational outcomes.
https://autograder.dev
8 stars 5 forks source link

Initial Integration of Open AI for Rubric Generator chatbot #22

Closed divyajangid2496 closed 5 months ago

divyajangid2496 commented 6 months ago

Title

Integrated the OpenAI Api in the webapp. Migrated the existing streamlit app.

Description

Integrated the OpenAI Api in the webapp for Rubric Generator Chatbot

Code files changed

new file: packages/webapp/package-lock.json modified: packages/webapp/package.json new file: packages/webapp/src/app/api/openai/route.ts modified: packages/webapp/src/app/globals.css modified: packages/webapp/src/app/page.tsx

Screenshots

Screenshot 2024-05-20 at 11 48 28 PM

Tests

Tested manually

------------------------- 1st Revised PR -------------------------

Title

Refactored the previously integrated webapp

Description

Separated different components in the webapp to improve readability and code reusability

Code files changed

  1. added pages directory and segregated the different components of the webapp
  2. modified: packages/webapp/next.config.mjs
  3. modified: packages/webapp/src/app/globals.css
  4. modified: packages/webapp/src/app/page.tsx
  5. new file: packages/webapp/src/pages/rubric-generator/_app.tsx
  6. new file: packages/webapp/src/pages/rubric-generator/components/ChatInput.tsx
  7. new file: packages/webapp/src/pages/rubric-generator/components/ChatMessage.tsx
  8. new file: packages/webapp/src/pages/rubric-generator/components/MessageHandler.tsx
  9. new file: packages/webapp/src/pages/rubric-generator/home/index.tsx
  10. new file: packages/webapp/src/pages/rubric-generator/layout.tsx
  11. renamed: packages/webapp/src/app/api/openai/route.ts -> packages/webapp/src/pages/rubric-generator/services/openaiService.ts
  12. new file: packages/webapp/src/pages/rubric-generator/types/ChatMessage.ts
  13. new file: packages/webapp/src/styles/globals.css
  14. new file: packages/webapp/src/styles/home.css
Screenshot 2024-05-20 at 11 48 28 PM

Tests

Tested manually

------------------------- 2nd Revised PR -------------------------

Title

Added assignment generator chatbot which re-uses the code from rubric generator chatbot

Description

Refactored the design further and now, user can write any chatbot by simply reusing the chatbot module

Code files changed

15 files changed, 325 insertions(+), 170 deletions(-) rename packages/webapp/src/{pages/rubric-generator/components => components/chatbot}/ChatInput.tsx (100%) rename packages/webapp/src/{pages/rubric-generator/components => components/chatbot}/ChatMessage.tsx (84%) rename packages/webapp/src/{pages/rubric-generator/types => lib/chatbot}/ChatMessage.ts (100%) create mode 100644 packages/webapp/src/lib/chatbot/MessageHandler.tsx rename packages/webapp/src/pages/{rubric-generator => }/_app.tsx (79%) create mode 100644 packages/webapp/src/pages/api/openai.ts create mode 100644 packages/webapp/src/pages/assignment-generator/home/index.tsx delete mode 100644 packages/webapp/src/pages/rubric-generator/components/MessageHandler.tsx delete mode 100644 packages/webapp/src/pages/rubric-generator/services/openaiService.ts

Assignment Generator:

Screenshot 2024-05-30 at 9 55 47 PM

Rubric Generator:

Screenshot 2024-05-30 at 9 56 19 PM

Project Structure:

Screenshot 2024-05-30 at 9 57 17 PM

Tests

Tested manually

UI Beautification: Assignment Generator:

Screenshot 2024-06-06 at 12 53 15 PM

Rubric Generator:

Screenshot 2024-06-06 at 12 53 44 PM