AutoBE
    Preparing search index...

    Class Agentica

    Agentica AI chatbot agent.

    Agentica is a facade class for the super AI chatbot agent which performs LLM (Large Language Model) function calling from the user's conversation, and manages the prompt histories.

    To understand and compose the Agentica class exactly, reference below types concentrating on the documentation comments please. Especially, you have to be careful about the IAgenticaProps type which is used in the constructor function.

    Samchon

    Index

    Constructors

    • Initializer constructor.

      Parameters

      • props: IAgenticaProps

        Properties to construct the agent

      Returns Agentica

    Methods

    • Conversate with the AI chatbot.

      User talks to the AI chatbot with the given content.

      When the user's conversation implies the AI chatbot to execute a function calling, the returned chat prompts will contain the function calling information like AgenticaExecuteHistory.

      Parameters

      • content: string | AgenticaUserMessageContent | AgenticaUserMessageContent[]

        The content to talk

      • Optionaloptions: { abortSignal?: AbortSignal }

        Options

        • OptionalabortSignal?: AbortSignal

          Abort signal

      Returns Promise<AgenticaHistory[]>

      List of newly created chat prompts

      AbortError

    • Get configuration.

      Returns IAgenticaConfig | undefined

    • Get controllers.

      Get list of controllers, which are the collection of functions that the "Super AI Chatbot" can execute.

      Returns readonly IAgenticaController[]

    • Get the chatbot's histories.

      Get list of chat histories that the chatbot has been conversated.

      Returns AgenticaHistory[]

      List of chat histories

    • Get operations.

      Get list of operations, which has capsuled the pair of controller and function from the controllers.

      Returns readonly AgenticaOperation[]

      List of operations

    • Get token usage of the AI chatbot.

      Entire token usage of the AI chatbot during the conversating with the user by conversate method callings.

      Returns AgenticaTokenUsage

      Cost of the AI chatbot

    • Get LLM vendor.

      Returns IAgenticaVendor

    • Erase an event listener.

      Erase an event listener to stop calling the callback function.

      Type Parameters

      • Type extends
            | "call"
            | "assistantMessage"
            | "userMessage"
            | "jsonParseError"
            | "response"
            | "request"
            | "select"
            | "execute"
            | "describe"
            | "validate"
            | "initialize"
            | "cancel"

      Parameters

      • type: Type

        Type of event

      • listener: (event: Mapper[Type]) => void | Promise<void>

        Callback function to erase

      Returns this

    • Add an event listener.

      Add an event listener to be called whenever the event is emitted.

      Type Parameters

      • Type extends
            | "call"
            | "assistantMessage"
            | "userMessage"
            | "jsonParseError"
            | "response"
            | "request"
            | "select"
            | "execute"
            | "describe"
            | "validate"
            | "initialize"
            | "cancel"

      Parameters

      • type: Type

        Type of event

      • listener: (event: Mapper[Type]) => void | Promise<void>

        Callback function to be called whenever the event is emitted

      Returns this