
Security News
RubyGems Adds Cooldown Feature to Bundler for Newly Published Gems
RubyGems and Bundler 4.0.13 introduced an opt-in cooldown feature that delays newly published gems during dependency resolution.
Give any Vercel AI SDK project the ability to interact with PostgreSQL, SQlite or MySQL databases in one line.
Tools for Vercel AI SDK that lets your AI query PostgreSQL, MySQL or SQLite databases in one line.
npm install ai-sql
import * as ai from "ai";
import { createOpenAI } from "@ai-sdk/openai";
import { postgres } from "ai-sql"; // or mysql, sqlite
const openai = createOpenAI({
compatibility: "strict",
});
const { text } = await ai.generateText({
model: openai("gpt-4-turbo"),
prompt: "",
tools: {
database: await postgres(process.env.POSTGRES_URL!),
},
maxSteps: 3,
});
For more examples, see the example directory.
import { Schema, Database, sqlTool } from "ai-sql";
export class MyDbTool implements Database {
async initialize() {
// do setup here
}
async describe(): Promise<Schema> {
// describe the schema
return {
// database type
database: "my database",
// stringified schema representation
description: `
create table messages (
id integer primary key,
text string not null,
);
`,
};
}
async query(query: string) {
// return result rows here
return [];
}
}
const tools = {
database: await sqlTool(new MyDbTool()),
};
FAQs
Give any Vercel AI SDK project the ability to interact with PostgreSQL, SQlite or MySQL databases in one line.
We found that ai-sql demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
RubyGems and Bundler 4.0.13 introduced an opt-in cooldown feature that delays newly published gems during dependency resolution.

Security News
pnpm 11.5 now recognizes npm staged publish approvals in release metadata, preventing those releases from being mistaken for lower-trust package publishes.

Security News
Federal audit finds NIST lacked a plan to clear the NVD backlog, wasted funds on duplicate work, and delayed use of CISA data.