跳到内容

dspy.inspect_history

dspy.inspect_history(n: int = 1)

所有语言模型共享的全局历史记录。

源代码位于 dspy/clients/base_lm.py
def inspect_history(n: int = 1):
    """The global history shared across all LMs."""
    return _inspect_history(GLOBAL_HISTORY, n)