mirror of
https://github.com/Aider-AI/aider.git
synced 2025-08-19 01:50:15 +00:00
19 lines
486 B
Python
19 lines
486 B
Python
from .dump import dump # noqa: F401
|
|
|
|
|
|
def show_messages(messages, title=None, functions=None):
|
|
if title:
|
|
print(title.upper(), "*" * 50)
|
|
|
|
for msg in messages:
|
|
role = msg["role"].upper()
|
|
content = msg.get("content")
|
|
if content:
|
|
for line in content.splitlines():
|
|
print(role, line)
|
|
content = msg.get("function_call")
|
|
if content:
|
|
print(role, content)
|
|
|
|
if functions:
|
|
dump(functions)
|