mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-28 16:25:00 +00:00
copy
This commit is contained in:
parent
0b29ffaa65
commit
a6a53d8861
3 changed files with 20 additions and 12 deletions
|
@ -121,14 +121,13 @@ import os
|
|||
import openai
|
||||
from aider.coders import Coder
|
||||
|
||||
# Make an openai client
|
||||
client = openai.OpenAI(api_key=os.environ["OPENAI_API_KEY"])
|
||||
|
||||
# This is a list of files to add to the chat
|
||||
fnames = ["foo.py"]
|
||||
|
||||
model = models.Model("gpt-4-turbo", weak_model="gpt-3.5-turbo")
|
||||
|
||||
# Create a coder object
|
||||
coder = Coder.create(client=client, fnames=fnames)
|
||||
coder = Coder.create(main_model=model, fnames=fnames)
|
||||
|
||||
# This will execute one instruction on those files and then return
|
||||
coder.run("make a script that prints hello world")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue