DebugLLM runs multiple contextual attempts, executes local functions, benefits from structured output formats and live-checks solutions for compilability.
Modular built, expandable and located in debugLLM.
Depending on component to use, adding your custom key might be cruical:
debugLLMVsCodePlugin\src\llm\openAiConnector.ts: fill-in for API-config.debugLLMVsCodePlugin\src\llm\openAssistConnector.ts: fill-in for API-config.debugLLM\environment.py: fill-in for all kind of configs, e.g. your project path.
- Point
INPUT_PATHindebugLLM/environment.pyto your Python file. - Run
main.py. - Check
debugLLM/output.
- run
export OPENAI_API_KEY= <YOUR_OPEN_AI_KEY>in the command line - Run
iterativeDebugger.py - check
code_fix_metrics.csvfor output
Initializes OpenAI client, creates assistant-, thread- and run-object. Request to agent is sent in run_llm-function. While tool-outouts are being ran through in collect_tool_outputs, the actual execution is outsourced to execute_tool_call. In case the run-status is complete, process_solution checks for output validity, otherwise the process repeats. Explanation gets printed to terminal and solved script saved into OUTPUT_PATH defined in environment.py.
The output-format is binded to the SolvedPythonScript class and referenced from assist.py.
Provides functions to create assistant-, file-, thread- and run-object.
SolvedPythonScript serves as required output-format for the agent.
Collection of all system-wide constants, such as agent instruction prompt and API-keys.
All custom functions accessable to the agent. Function-call works via call_func.
Currently get_script pulls scripts from the file-system, check_syntax verifies syntax-validty at runtime and get_project_index maps the entire project by its files, functions and params.
Generic multi-purpose functions, such as save_script, load_script and get_script_overview to index a single script. get_all_files runs DFS and returns all files within a folder (including subfolders). Both functions are used for get_project_index in api_tools.py.
Uploads training data stored in TRAINING_PATH (defined in environment.py), starts and lists fine-tuning jobs.
Useful for checking validity of training-material before uploading for actual fine-tuning.
This Python script provides a framework to evaluate and fix buggy code using a Language Learning Model (LLM) and measure performance. The key functionalities of the script include:
https://platform.openai.com/docs/guides/function-calling
- Write function in api_tools.py
- Add tool in create_assistant, found in main.py
https://platform.openai.com/docs/guides/structured-outputs
- Open main.py
- Change object structure of SolvedPythonScript