Genkit JS API reference
    Preparing search index...
    interface DataConnectToolsOptions {
        config?: ToolsConfig;
        configFile: string;
        firebaseApp?: FirebaseApp | FirebaseOptions;
        name: string;
        onError?:
            | "return"
            | "throw"
            | ((tool: DataConnectTool, error: Error) => any);
    }
    Index

    Properties

    config?: ToolsConfig

    Pass in tool definitions as generated from Data Connect's llmTools generator.

    configFile: string

    Path to the file output by the llmTools generator.

    firebaseApp?: FirebaseApp | FirebaseOptions

    Your Firebase client SDK config or a FirebaseApp or a FirebaseServerApp. If not provided the plugin will attempt to use context.firebaseApp for an in-context app or will fall back the default app.

    name: string

    Provide a name for the plugin. All tools will have this prefix, e.g. myname/myTool

    onError?: "return" | "throw" | ((tool: DataConnectTool, error: Error) => any)

    How to handle errors coming from Data Connect tools:

    • return: (default) return the error to the model to allow it to decide how to proceed
    • throw: throw an error, halting execution

    You may also supply a custom error handler. Whatever is returned from the handler will be returned to the LLM. If you throw an exception from the handler, execution will be halted with an error.