0.2.46 • Published 22 days ago
freeplay v0.2.46
Freeplay Node SDK
The official Node SDK for easily accessing the Freeplay API.
Installation
npm install freeplay
Compatibility
- Node.js v10+
Usage
// Import the SDK
import * as freeplay from "freeplay";
// Initialize the client
const fpclient = new freeplay.Freeplay({
freeplayApiKey: FREEPLAY_API_KEY,
baseUrl: `https://${FREEPLAY_CUSTOMER_NAME}.freeplay.ai/api`,
providerConfig: {
openai: {
apiKey: OPENAI_API_KEY
}
}
})
// Examples
const completion = await fpclient.getCompletion({
projectId: FREEPLAY_PROJECT_ID,
templateName: "template",
variables: {
["input_variable_name"]: "input_variable_value"
}
})
See the Freeplay Docs for more usage examples and the API reference.
License
This SDK is released under the MIT License.
0.2.46
22 days ago
0.2.45
1 month ago
0.2.44
1 month ago
0.2.43
2 months ago
0.2.42
2 months ago
0.2.41
2 months ago
0.2.40
2 months ago
0.2.39
2 months ago
0.2.38
2 months ago
0.2.37
3 months ago
0.2.36
3 months ago
0.2.35
3 months ago
0.2.34
3 months ago
0.2.32
4 months ago
0.2.31
4 months ago
0.2.30
4 months ago
0.2.29
5 months ago
0.2.28
5 months ago
0.2.27
5 months ago
0.2.25
5 months ago
0.2.23
5 months ago
0.2.22
5 months ago
0.2.21
6 months ago
0.2.20
6 months ago
0.2.19
6 months ago
0.2.18
6 months ago
0.2.17
6 months ago
0.2.2-3.alpha.0
5 months ago
0.2.2-3.alpha.1
5 months ago
0.2.15
7 months ago
0.2.14
7 months ago
0.2.12
7 months ago
0.2.11
8 months ago
0.2.7
8 months ago
0.2.6
8 months ago
0.2.8
8 months ago
0.2.1
9 months ago
0.2.0
9 months ago
0.2.3
9 months ago
0.2.2
9 months ago
0.2.5
9 months ago
0.2.4
9 months ago
0.0.5
9 months ago
0.0.4
9 months ago
0.0.3
10 months ago
0.0.2
10 months ago
0.0.1
10 months ago