Skip to content

Added OpenAI API Integration for Parsing Course Outlines

Rohan Ravindran requested to merge feature/create-ai-api-request into main

Closes #16 (closed)

This PR adds functionality to parse tasks from plain text course outlines using the OpenAI GPT-3.5 API.

The following was added:

  • Setup OpenAI account and generated API token (added 5$ balance)
  • Generated system and user prompts as per #2 (closed)
  • Configured dotenv library for API token management
  • Used the Ktor library for creating a POST request to the OpenAI API Chat Completions endpoint
  • Processed API JSON response to extract task details, outputting a list of Task objects
  • Included error handling checks for API token presence, response status, and date formatting issues
Edited by Rohan Ravindran

Merge request reports