Self Learning¶
- class oscopilot.agents.self_learning.SelfLearning(agent, learner, tool_manager, config, text_extractor=None)[source]¶
Bases:
objectA class designed to facilitate self-learning for software-related topics by automatically generating and engaging with courses based on provided software and package information.
- config¶
Configuration settings for the learning process.
- Type:
dict
- agent¶
An external agent or tool that interacts with the learning content or environment.
- Type:
object
- learner¶
A learner object that is responsible for designing the course.
- Type:
object
- tool_manager¶
Manages the tools required for course creation and learning.
- Type:
object
- text_extractor¶
An optional component responsible for extracting text from files.
- Type:
object, optional
- course¶
A dictionary to store course details.
- Type:
dict
- continuous_learning(software_name, package_name, demo_file_path=None)[source]¶
Implements a continuous learning process that updates and applies new courses based on a designed curriculum.
- Parameters:
software_name (str) – Name of the software being learned.
package_name (str) – Name of the package within the software.
demo_file_path (str, optional) – Path to a demo file used for extracting text content. Defaults to None.
- Returns:
This method does not return anything but updates internal states and possibly external resources.
- Return type:
None
- course_design(software_name, package_name, demo_file_path, file_content=None)[source]¶
Designs a course based on the provided software and package name, using content extracted from a demo file.
- Parameters:
software_name (str) – The name of the software for which the course is designed.
package_name (str) – The package name related to the software.
demo_file_path (str) – Path to the demo file used as content for the course.
file_content (str, optional) – Content of the demo file to be included in the course.
- Returns:
The designed course as a dictionary.
- Return type:
dict
- learn_course(course)[source]¶
Triggers the learning of the designed course using the configured agent.
- Parameters:
course (dict) – The course dictionary containing lesson details to be learned.
- Returns:
None.
- self_learning(software_name, package_name, demo_file_path)[source]¶
Initiates the self-learning process by designing a course and triggering the learning mechanism.
- Parameters:
software_name (str) – The name of the software for which the course is being designed.
package_name (str) – The name of the software package related to the course.
demo_file_path (str) – The file path of a demo or example file that is relevant to the course content.
- Returns:
None.