langchain.js
    Preparing search index...

    Class used to generate prompts for the AutoGPT model. It takes into account the AI's name, role, tools, token counter, and send token limit. The class also handles the formatting of messages and the construction of the full prompt.

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Properties

    aiName: string
    aiRole: string
    sendTokenLimit: number
    tokenCounter: (text: string) => Promise<number>
    tools: any[]

    Methods

    • Returns "autogpt"

    • Constructs the full prompt based on the provided goals.

      Parameters

      • goals: string[]

        An array of goals.

      Returns string

      The full prompt as a string.

    • Formats the messages based on the provided parameters.

      Parameters

      • __namedParameters: {
            goals: string[];
            memory: VectorStoreRetrieverInterface;
            messages: BaseMessage[];
            user_input: string;
        }

      Returns Promise<BaseMessage[]>

      An array of formatted messages.

    • This method is not implemented in the AutoGPTPrompt class and will throw an error if called.

      Parameters

      • _values: PartialValues

        Partial values.

      Returns Promise<BaseChatPromptTemplate>

      Throws an error.

    • Returns SerializedBasePromptTemplate