Memory used to save agent output and intermediate steps.

Hierarchy (view full)

  • Toolkit
    • OpenAIAgentTokenBufferMemory

Constructors

Properties

aiPrefix: string = "AI"
humanPrefix: string = "Human"
intermediateStepsKey: string = "intermediateSteps"
llm: ChatOpenAI
maxTokenLimit: number = 12000
memoryKey: string = "history"
outputKey: string = "output"
returnMessages: boolean = true

Accessors

Methods

  • Saves the context of the chat, including user input, AI output, and intermediate steps. Prunes the chat history if the total token count exceeds the maximum limit.

    Parameters

    • inputValues: InputValues

      Input values.

    • outputValues: OutputValues

      Output values.

    Returns Promise<void>

    Promise that resolves when the context has been saved.

Generated using TypeDoc