Type alias CreateOpenAIToolsAgentParams

CreateOpenAIToolsAgentParams: {
    llm: BaseChatModel<BaseChatModelCallOptions & {
        tool_choice?: OpenAIClient.ChatCompletionToolChoiceOption;
        tools?: StructuredToolInterface[] | OpenAIClient.ChatCompletionTool[];
    }>;
    prompt: ChatPromptTemplate;
    tools: StructuredToolInterface[];
}

Params used by the createOpenAIToolsAgent function.

Type declaration

  • llm: BaseChatModel<BaseChatModelCallOptions & {
        tool_choice?: OpenAIClient.ChatCompletionToolChoiceOption;
        tools?: StructuredToolInterface[] | OpenAIClient.ChatCompletionTool[];
    }>

    LLM to use as the agent. Should work with OpenAI tool 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 of agent_scratchpad.

  • tools: StructuredToolInterface[]

    Tools this agent has access to.

Generated using TypeDoc