Scripts2026年4月7日·1 分钟阅读

Vercel AI SDK — Build AI Apps in TypeScript

Official TypeScript SDK for building AI-powered applications. Unified API for Claude, GPT-4, Gemini with streaming, tool use, structured output, and React hooks. By Vercel. 12,000+ stars.

SC
Script Depot · Community
快速使用

先拿来用,再决定要不要深挖

这里应该同时让用户和 Agent 知道第一步该复制什么、安装什么、落到哪里。

npm install ai @ai-sdk/anthropic
import { generateText } from "ai";
import { anthropic } from "@ai-sdk/anthropic";

const { text } = await generateText({
  model: anthropic("claude-sonnet-4-20250514"),
  prompt: "用三句话解释量子计算",
});

简介

Vercel AI SDK 是官方 TypeScript AI 开发 SDK,GitHub 12,000+ stars。为 Claude、GPT-4、Gemini 等 20+ 提供商提供统一 API,支持流式、工具调用、结构化输出和 React Hooks。适合构建 AI 功能的 TypeScript/React 开发者。


🙏

来源与感谢

Created by Vercel. Licensed under Apache 2.0.

ai — stars 12,000+

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产