Class that represents a toolkit for working with SQL databases. It initializes SQL tools based on the provided SQL database.

Example

const model = new ChatOpenAI({});
const toolkit = new SqlToolkit(sqlDb, model);
const executor = createSqlAgent(model, toolkit);
const result = await executor.invoke({ input: 'List the total sales per country. Which country's customers spent the most?' });
console.log(`Got output ${result.output}`);

Hierarchy

  • BaseToolkit
    • SqlToolkit

Constructors

Properties

Constructors

Properties

dialect: string = "sqlite"
tools: ToolInterface[]

Generated using TypeDoc