Type alias CreateOpenAIFunctionsAgentParams

CreateOpenAIFunctionsAgentParams: {
    llm: BaseChatModel<BaseFunctionCallOptions>;
    prompt: ChatPromptTemplate;
    tools: StructuredToolInterface[];
    streamRunnable?: boolean;
}

Params used by the createOpenAIFunctionsAgent function.

Type declaration

  • llm: BaseChatModel<BaseFunctionCallOptions>

    LLM to use as the agent. Should work with OpenAI function calling, so must either be an OpenAI model that supports that or a wrapper of a different model that adds in equivalent support.

  • prompt: ChatPromptTemplate

    The prompt to use, must have an input key for agent_scratchpad.

  • tools: StructuredToolInterface[]

    Tools this agent has access to.

  • Optional streamRunnable?: boolean

    Whether to invoke the underlying model in streaming mode, allowing streaming of intermediate steps. Defaults to true.

Generated using TypeDoc