Metadata-Version: 2.1
Name: codara-model-trainer
Version: 0.1
Summary: OpenAI Model Trainer and Formatter
Description-Content-Type: text/markdown


# FineTuningDataCreator Package

## Overview
The `FineTuningDataCreator` is a Python package designed to assist in creating datasets for fine-tuning machine learning models, particularly language models. It simplifies the process of gathering and formatting training data in a JSON Lines (JSONL) format.

## Features
- Easy creation of training data sets in JSONL format.
- Methods to set system instructions, training prompts, and generative responses.
- Automatically handles file creation and appending data in the correct format.

## Installation
No specific installation is required apart from having Python installed. The script uses standard Python libraries `os` and `json`.

## Usage
1. Import the package:
   ```python
   from fine_tuning_data_creator import FineTuningDataCreator
   ```

2. Create an instance of `FineTuningDataCreator`:
   ```python
   data_creator = FineTuningDataCreator()
   ```

3. Set system content, training prompts, and generative responses as needed:
   ```python
   data_creator.agent_instructions("System instructions here")
   data_creator.training_prompt("User prompt here")
   gpt_response = openai_api_call("User prompt here")
   data_creator.generative_response(gpt_response)
   ```

4. Create the data set:
   ```python
   data_creator.create_data_set()
   ```

The data will be saved in the `model-training/fine-tune-data-set.jsonl` file.

## Structure of Data
The data is structured in JSON Lines format, where each line is a valid JSON object. An example of the data structure:
```json
{
  "messages": [
    {"role": "system", "content": "System instructions here"},
    {"role": "user", "content": "User prompt here"},
    {"role": "assistant", "content": "Model response here"}
  ]
}
```
