shroominic / codebox-js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

codebox-js

Version code-check Downloads License

CodeBoxAPI is the simplest cloud infrastructure for your LLM Apps and Services. It allows you to run python code in an isolated/sandboxed environment. Additionally, it provides simple fileIO (and vector database support coming soon).

Installation

You can install CodeBox-JS with npm:

npm install codeboxapi

Usage

export CODEBOX_API_KEY=sk-***************
import CodeBox from 'codeboxapi';

// startup and automatically shutdown a new codebox
const codebox = new CodeBox();

await codebox.start();

// run some code
await codebox.run("a = 'Hello'");
await codebox.run("b = 'World!'");
await codebox.run("result = a + ', ' + b");
let result = await codebox.run("print(result)");

console.log(result);
// Hello, World!

await codebox.stop();

Where to get your api-key?

Checkout the pricing page of CodeBoxAPI. By subscribing to a plan, you will receive an account with an api-key. Bear in mind, we don't have many automations set up right now, so you'll need to write an email for things like refunds, sub cancellations, or upgrades.

Docs

Checkout the documentation for more details!

Contributing

Feel free to contribute to this project. You can open an issue or submit a pull request.

License

MIT

Contact

You can contact me at team@codeboxapi.com

About


Languages

Language:JavaScript 93.0%Language:TypeScript 7.0%