SDK
TypeScript client for the hosted API.
Install
terminal.sh
BASH
| 1 | npm install promptimizer |
example.ts
TYPESCRIPT
| 1 | import { Promptimizer } from "promptimizer"; |
| 2 | |
| 3 | const client = new Promptimizer({ |
| 4 | apiKey: process.env.PROMPTIMIZER_API_KEY, |
| 5 | }); |
| 6 | |
| 7 | const res = await client.chat.completions.create({ |
| 8 | messages: [{ role: "user", content: "What is 17 * 24?" }], |
| 9 | }); |