mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-23 22:04:59 +00:00
refactor
This commit is contained in:
parent
fcaf4e15c8
commit
b139dbf475
2 changed files with 14 additions and 16 deletions
|
@ -4,6 +4,8 @@ import os
|
|||
import sys
|
||||
import re
|
||||
import traceback
|
||||
import time
|
||||
from openai.error import RateLimitError
|
||||
|
||||
from rich.console import Console
|
||||
from rich.prompt import Confirm, Prompt
|
||||
|
@ -265,26 +267,10 @@ class Coder:
|
|||
self.cur_messages = []
|
||||
return True
|
||||
|
||||
def show_messages(self, messages, title):
|
||||
print(title.upper(), "*" * 50)
|
||||
|
||||
for msg in messages:
|
||||
print()
|
||||
print("-" * 50)
|
||||
role = msg["role"].upper()
|
||||
content = msg["content"].splitlines()
|
||||
for line in content:
|
||||
print(role, line)
|
||||
|
||||
def send(self, messages, model=None, silent=False):
|
||||
# self.show_messages(messages, "all")
|
||||
|
||||
if not model:
|
||||
model = self.main_model
|
||||
|
||||
import time
|
||||
from openai.error import RateLimitError
|
||||
|
||||
self.resp = ""
|
||||
interrupted = False
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue