mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-23 13:54:59 +00:00
comment
This commit is contained in:
parent
9ab3af1bc1
commit
2bcf7bbaa5
1 changed files with 1 additions and 9 deletions
10
coder.py
10
coder.py
|
@ -1,15 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
"""
|
||||
This is a Python script that uses OpenAI's GPT-3 to modify code based on user requests. The script imports the necessary libraries and sets up the OpenAI API key. It then defines a Coder class that contains methods for sending requests to the OpenAI API and updating files based on the API's responses.
|
||||
|
||||
The Coder class has several methods, including system, file, request, quoted_file, run_davinci, run_edit, run, send, update_files, and update_file. These methods are used to interact with the OpenAI API and modify code based on user requests.
|
||||
|
||||
The script begins by defining a prompt for ChatGPT that explains its role. It then creates an instance of the Coder class and sets the system prompt to the prompt defined earlier.
|
||||
|
||||
The script then calls the run method of the Coder class, which prompts the user for input and sends that input to the OpenAI API. The API responds with modified code, which is then used to update the coder.py file.
|
||||
|
||||
Overall, this script is a powerful tool for modifying code based on user requests using OpenAI's GPT-3 API.
|
||||
This is a Python script that uses OpenAI's GPT-3 to modify code based on user requests. The script imports the necessary libraries and sets up the OpenAI API key.
|
||||
"""
|
||||
|
||||
import os
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue