- Notifications
You must be signed in to change notification settings - Fork0
Python scripts to generate Fortran code by ChatGPT, compile it, correct errors, and run it -- broken by API changes. Tryhttps://github.com/Beliavsky/OpenAI-Fortran-agent instead
Beliavsky/ChatGPT-Fortran-generator
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Python script to generate Fortran codes by ChatGPT to perform tasks, compile them with gfortran, fix errors and warnings, and run them. ChatGPT is asked to code each task multiple times, because sometimes it produces code that fails to compile or gives wrong answers. Seeoutput_xfortran_chat.txt
for sample output frompython xfortran_chat.py
andoutput_xdebug_fortran.txt
andoutput_xdebug_fortran_chatgpt_4.txt
for sample output ofpython xdebug_fortran.py
.
Thedebug_fortran
function infortran.py
shows how you can get a Fortran code to compile by iteratively sending compiler error messagesto ChatGPT and asking for fixes.
gpt-4
is now an allowed model in the API, and in the script one can set the variablegpt_model
to it.
The scripts here no longer run, with error messages such as
You tried to access openai.ChatCompletion, but this is no longer supported in openai>=1.0.0 - see the README at https://github.com/openai/openai-python for the API.
I suggest tryinghttps://github.com/Beliavsky/OpenAI-Fortran-agent instead.
About
Python scripts to generate Fortran code by ChatGPT, compile it, correct errors, and run it -- broken by API changes. Tryhttps://github.com/Beliavsky/OpenAI-Fortran-agent instead
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.