openai
pandas
numpy
re
A tool that leverages graph algorithms and ChatGPT to diagnose and suggest fixes for command-line errors.
- Navigate to the Project Directory:
cd gpt-graph-combined
- Execute the Main Program:
python ask-suggestion.py ../input_data/cleaned_data_02.csv ../input_data/error_suggestion.csv
- Locate the Output in
../output_data/solutions.csv
.
To run the program, input files could be prepared by programs in two jupyter notebooks in the notebook
folder. cleaned_data_02.csv
data is processed by new_log_processor.ipynb
and error_suggestion.csv
is processed by new_error_graph.ipynb
.
- Version 1 of the repository is dedicated to error analysis via graph algorithms. Check out the original version here.
- new_log_processor.ipynb: Converts raw JSON logs into CSV or PKI format.
- new_error_graph.ipynb: Applies graph algorithms to Bash shell error logs, simulating workflows leading to errors and subsequent commands.
Each command is represented as a graph node with the following attributes:
- Program: The command name or script.
- Type of Error: The error encountered, if any.
- Frequency: The command's execution frequency.
- Full Command Dictionary: Details of the entire command.
- Children Command Dictionary: Commands that followed.
Two graphs can be constructed using this information:
- Graph 1: Captures previous commands to predict errors.
- Graph 2: Tracks subsequent commands to trace how users corrected their errors.
- output_data: Error logs in CSV or PKI format, processed by the Log Processor Guide.