Autonomous Collaborative between GPT and MATLAB
Versión 1.0.0 (2,15 KB) por
Dyson Freeman
A small step toward to the dream of "GPT-in-the-loop".
Only a single file here.
HOW TO USE:
You should FIRST take your own OPENAI's API key, copy it into a txt file, rename the file to "API-key.txt". The '.txt' file and the '.m' file should be placed in the same directory.
------------------------------------------------------------------------------------
VIDEO:
------------------------------------------------------------------------------------
The system only requires human operators to give the final goal, and the GPT will generate MATLAB code based on the requirements and automatically interact with MATLAB to check and modify code errors according to the feedback, until giving the correct answer (if lucky). However, there are two points to note:
- First, this is only an initial attempt of the grand architecture of "GPT-in-the-loop" system in my mind. Therefore, the entire interaction process is still in its infancy. For slightly more complex instructions, there is a high chance of getting stuck in a "loop of correcting errors" and cannot produce the correct answer.
- Second, since OpenAI does not provide contextual meaning, this solution can only be implemented through reference, leading to substantial token consumption. Please use it as needed and regularly monitor the account balance.
Citar como
Dyson Freeman (2024). Autonomous Collaborative between GPT and MATLAB (https://www.mathworks.com/matlabcentral/fileexchange/128093-autonomous-collaborative-between-gpt-and-matlab), MATLAB Central File Exchange. Recuperado .
Compatibilidad con la versión de MATLAB
Se creó con
R2022b
Compatible con cualquier versión desde R2022b
Compatibilidad con las plataformas
Windows macOS LinuxEtiquetas
Agradecimientos
Inspirado por: Generate MATLAB Code Using ChatGPT API, Generate unit-tested ChatGPT MATLAB codes
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Descubra Live Editor
Cree scripts con código, salida y texto formateado en un documento ejecutable.
Versión | Publicado | Notas de la versión | |
---|---|---|---|
1.0.0 |