• dataConnectTools connects Genkit to your Data Connect operations by creating tools from your connector's queries and mutations. This plugin is driven by the generated JSON file from the llmTools option. You can generate this file using the llmTools option in connector.yaml, for example:

    connectorId: tools
    generate:
    llmTools:
    outputFile: ../../tools.json

    Once you have the tools file, you can use this function to register the tools as a Genkit plugin:

    const app = initializeFirebase({...});

    const ai = genkit({
    plugins: [..., dataConnectTool({
    name: 'myTools',
    configFile: 'tools.json',
    sdk: app,
    })]
    })

    IMPORTANT: This plugin relies on the client SDKs for Firebase and does not have administrative access to Data Connect. To authenticate this plugin requires a firebaseApp instance on context with appropriate privileges or the use of the firebaseContext() context provider.

    Parameters

    Returns GenkitPlugin

    A Genkit plugin.