mirror of
https://github.com/aljazceru/gpt-engineer.git
synced 2025-12-17 12:45:26 +01:00
make pre commit pass in the whole codebase (#149)
This commit is contained in:
@@ -8,10 +8,12 @@ class AI:
|
||||
try:
|
||||
openai.Model.retrieve("gpt-4")
|
||||
except openai.error.InvalidRequestError:
|
||||
print("Model gpt-4 not available for provided api key reverting "
|
||||
"to gpt-3.5.turbo. Sign up for the gpt-4 wait list here: "
|
||||
"https://openai.com/waitlist/gpt-4-api")
|
||||
self.kwargs['model'] = "gpt-3.5-turbo"
|
||||
print(
|
||||
"Model gpt-4 not available for provided api key reverting "
|
||||
"to gpt-3.5.turbo. Sign up for the gpt-4 wait list here: "
|
||||
"https://openai.com/waitlist/gpt-4-api"
|
||||
)
|
||||
self.kwargs["model"] = "gpt-3.5-turbo"
|
||||
|
||||
def start(self, system, user):
|
||||
messages = [
|
||||
@@ -26,10 +28,10 @@ class AI:
|
||||
|
||||
def fuser(self, msg):
|
||||
return {"role": "user", "content": msg}
|
||||
|
||||
def fassistant(self, msg):
|
||||
return {"role": "assistant", "content": msg}
|
||||
|
||||
|
||||
def next(self, messages: list[dict[str, str]], prompt=None):
|
||||
if prompt:
|
||||
messages = messages + [{"role": "user", "content": prompt}]
|
||||
|
||||
Reference in New Issue
Block a user