类型安全 AI JavaScript SDK
Java脚本和类型SDK 类型安全AI。 。 。 .
快速启动
安装 SDK( 20 号或更新号):
npm install @typesafe-ai/sdk
设定 TYPESAFE_API_KEY 然后创建和使用客户端 :
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);
从您的问题中推断出答案类型。 该软件包包括无害环境管理、通用JS和TypeScript声明.
文档
学习 TypeSafe 在其中可以做什么 类型安全文件。 。 。 . 见SDK的 客户端 财务报告和审定财务报表 类型 aPI 选项和默认值.