• Create a SQL query chain that can create SQL queries for the given database. Returns a Runnable.

    Parameters

    Returns Promise<RunnableSequence<Record<string, unknown>, string>>

    A runnable sequence representing the chain.

    Example: ```typescript const datasource = new DataSource({ type: "sqlite", database: "../../../../Chinook.db", }); const db = await SqlDatabase.fromDataSourceParams({ appDataSource: datasource, }); const llm = new ChatOpenAI({ temperature: 0 }); const chain = await createSqlQueryChain({ llm, db, dialect: "sqlite", }); ```

Generated using TypeDoc