Skip to content

This tool provides AI-powered and graph-based correction suggestions on command-line errors.

Notifications You must be signed in to change notification settings

GuningShen/error-suggestion

Repository files navigation

Error Suggestion

📦 Required Dependencies

  • openai
  • pandas
  • numpy
  • re

🚀 New: Graph-ChatGPT-Combined Error Suggestion Tool

A tool that leverages graph algorithms and ChatGPT to diagnose and suggest fixes for command-line errors.

Steps to Run the Program

  1. Navigate to the Project Directory:
    cd gpt-graph-combined
  2. Execute the Main Program:
    python ask-suggestion.py ../input_data/cleaned_data_02.csv ../input_data/error_suggestion.csv
  3. Locate the Output in ../output_data/solutions.csv.

Data preparation

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.


🖥 Original: Graph-Based Analysis

🔍 Repository Focus

  • Version 1 of the repository is dedicated to error analysis via graph algorithms. Check out the original version here.

Analysis Code

🧮 Graph Algorithm Explanation

Node Attributes

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.

Graph Construction

Two graphs can be constructed using this information:

  1. Graph 1: Captures previous commands to predict errors.
  2. Graph 2: Tracks subsequent commands to trace how users corrected their errors.

error graph

Graph Analysis

🗃 Data

  • output_data: Error logs in CSV or PKI format, processed by the Log Processor Guide.

About

This tool provides AI-powered and graph-based correction suggestions on command-line errors.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published