Star 历史趋势
数据来源: GitHub API · 生成自 Stargazers.cn
README.md

TypeSafe AI JavaScript SDK

JavaScript and TypeScript SDK for TypeSafe AI.

Quickstart

Install the SDK (Node.js 20 or newer):

npm install @typesafe-ai/sdk

Set TYPESAFE_API_KEY in your environment, then create and use the client:

import { choice, TypeSafeClient } from "@typesafe-ai/sdk";

const client = new TypeSafeClient();
const response = await client.systemOne({
  state: { document: "I was charged twice. Please fix this ASAP." },
  questions: {
    category: choice("What is this ticket about?", {
      billing: null,
      technical: null,
      other: null,
    }),
  },
});

console.log(response.answers.category.choice);

Answer types are inferred from your questions. The package includes ESM, CommonJS, and TypeScript declarations.

Documentation

Learn what TypeSafe can do in the TypeSafe docs. See the SDK's client and types for API options and defaults.

关于 About

The official TypeScript/JavaScript library for the TypeSafe API

语言 Languages

TypeScript96.6%
JavaScript3.4%

提交活跃度 Commit Activity

代码提交热力图
过去 52 周的开发活跃度
5
Total Commits
峰值: 4次/周
Less
More

核心贡献者 Contributors