langchain.js
    Preparing search index...

    Type Alias CreateOpenAIToolsAgentParams

    Params used by the createOpenAIToolsAgent function.

    type CreateOpenAIToolsAgentParams = {
        llm: Toolkit<
            Toolkit & {
                tools?: Toolkit[]
                | OpenAIClient.ChatCompletionTool[]
                | any[];
            },
        >;
        prompt: Toolkit;
        streamRunnable?: boolean;
        tools: Toolkit[]
        | Toolkit[];
    }
    Index

    Properties

    llm: Toolkit<
        Toolkit & {
            tools?: Toolkit[]
            | OpenAIClient.ChatCompletionTool[]
            | any[];
        },
    >

    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: Toolkit

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

    streamRunnable?: boolean

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

    tools: Toolkit[] | Toolkit[]

    Tools this agent has access to.