@phaseo/sdkとして公開されています。
インストール
使い慣れたパッケージマネージャーでSDKをインストールします。必要条件
- Node.js 18以降
- TypeScript 4.5以降(型定義を利用する場合)
Documentation Index
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
Phaseo TypeScript SDKのインストールと設定方法です。
@phaseo/sdkとして公開されています。
npm install @phaseo/sdk
pnpm add @phaseo/sdk
yarn add @phaseo/sdk
export PHASEO_API_KEY="phaseo_v1_sk_<kid>_<secret>"
import Phaseo from "@phaseo/sdk";
// Initialize the client
const client = new Phaseo({
apiKey: process.env.PHASEO_API_KEY!,
});
// Make your first request
const response = await client.generateText({
model: "openai/gpt-4o-mini",
messages: [{ role: "user", content: "Hello!" }],
});
console.log(response.choices[0].message.content);