Type alias CreateOpenAIFnRunnableConfig<RunInput, RunOutput>

CreateOpenAIFnRunnableConfig<RunInput, RunOutput>: {
    functions: Toolkit[];
    llm: Toolkit<Toolkit, Toolkit, Toolkit>;
    prompt: Toolkit<Toolkit<Extract<keyof RunInput, string>>>;
    enforceSingleFunctionUsage?: boolean;
    outputParser?: Toolkit<RunOutput>;
}

Configuration params for the createOpenAIFnRunnable method.

Type Parameters

  • RunInput extends Record<string, any>

  • RunOutput

Type declaration

  • functions: Toolkit[]
  • llm: Toolkit<Toolkit, Toolkit, Toolkit>

    Language model to use, assumed to support the OpenAI function-calling API.

  • prompt: Toolkit<Toolkit<Extract<keyof RunInput, string>>>

    BasePromptTemplate to pass to the model.

  • Optional enforceSingleFunctionUsage?: boolean

    Only used if a single function is passed in. If true, then the model will be forced to use the given function. If false, then the model will be given the option to use the given function or not.

  • Optional outputParser?: Toolkit<RunOutput>

    BaseLLMOutputParser to use for parsing model outputs. By default will be inferred from the function types.

Generated using TypeDoc