Skip to content

Commit a6bca71

Browse files
restore audio inspect_history (#8336)
1 parent 3e1185f commit a6bca71

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

dspy/utils/inspect_history.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ def pretty_print_history(history, n: int = 1):
4141
else:
4242
image_str = f"<image_url: {c['image_url']['url']}>"
4343
print(_blue(image_str.strip()))
44+
elif c["type"] == "input_audio":
45+
audio_format = c["input_audio"]["format"]
46+
len_audio = len(c["input_audio"]["data"])
47+
audio_str = f"<audio format='{audio_format}' base64-encoded, length={len_audio}>"
48+
print(_blue(audio_str.strip()))
4449
print("\n")
4550

4651
if isinstance(outputs[0], dict):

0 commit comments

Comments
 (0)