A runnable sequence representing the chain.
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
Create a SQL query chain that can create SQL queries for the given database. Returns a Runnable.