JavaScript
https://jsr.io/@prompt-pal/node-sdk
this JS library is compatible with any JS runtime. including NodeJS
, Deno
, React Native
and even browsers
deno add @prompt-pal/node-sdk
npm i @prompt-pal/node-sdk
pnpm add @prompt-pal/node-sdk
yarn add @prompt-pal/node-sdk
Example
please make sure you already have endpoint
and token
in promptpal.yaml
import PromptPal from "@prompt-pal/node-sdk";
const client = new PromptPal(endpoint, token);
const res = await client.execute<PPPrompts, PPPromptEchoVariables>(
PPPrompts.Echo,
{
text: "hello world",
}
);
console.log(res);