LearningModule

class oscopilot.modules.learner.self_learner.SelfLearner(prompt, tool_manager)[source]

Bases: BaseModule

This class represents a self-learning module that designs educational courses based on given parameters. It inherits from BaseModule, utilizing its initialization and utility methods.

prompt

A dictionary containing system and user prompts for generating course designs.

Type:

dict

tool_manager

An instance of a tool manager to handle external tool interactions.

Type:

object

course

A dictionary to store course details that are generated based on user and system inputs.

Type:

dict

design_course(software_name, package_name, demo_file_path, file_content=None, prior_course=None)[source]

Designs a course based on specified software and content parameters and stores it in the course attribute.

Parameters:
  • software_name (str) – The name of the software around which the course is centered.

  • package_name (str) – The name of the software package relevant to the course.

  • demo_file_path (str) – Path to the demo file that will be used in the course.

  • file_content (str) – The content of the file that will be demonstrated or used in the course.

  • prior_course (str) – The course that has been completed.

Returns:

A dictionary containing the designed course details.

Return type:

dict

Uses system and user prompts to create a conversation with a language model or similar system, to generate a course based around the provided parameters. The response is then parsed into JSON format and saved.