DSPy: The framework for programming—not prompting—language models
Python
restore audio inspect_history (#8336)
arnavsinghvi11a6bca7194b51
diff --git a/dspy/utils/inspect_history.py b/dspy/utils/inspect_history.pyindex 10333c4eb..556913a74 100644--- a/dspy/utils/inspect_history.py+++ b/dspy/utils/inspect_history.py@@ -41,6 +41,11 @@ def pretty_print_history(history, n: int = 1):else:image_str = f"<image_url: {c['image_url']['url']}>"print(_blue(image_str.strip()))+ elif c["type"] == "input_audio":+ audio_format = c["input_audio"]["format"]+ len_audio = len(c["input_audio"]["data"])+ audio_str = f"<audio format='{audio_format}' base64-encoded, length={len_audio}>"+ print(_blue(audio_str.strip()))print("\n")if isinstance(outputs[0], dict):