Repository
Current version released
3 years ago
Versions
- v3.0.4Latest
- v3.0.3
- v3.0.1
- v3.0.1
- v3.0.0
- v3.0.0-beta.6
- v3.0.0-beta.2
- v3.0.0-beta.2
- v3.0.0-beta.1
- v3.0.0-beta.0
- v3.0.0-alpha.6
- v3.0.0-alpha.5
- v3.0.0-alpha.4
- v3.0.0-alpha.2
- v3.0.0-alpha.1
- v2.1.3
- v2.1.2
- v2.1.1
- v2.1.0
- v2.0.0
- v2.0.0-alpha.7
- v2.0.0-alpha.6
- v2.0.0-alpha.4
- v2.0.0-alpha.3
- v2.0.0-alpha.2
- v2.0.0-alpha.1
- v2.0.0-alpha.1
- v0.1.22
- v2.0.0-alpha.0
- v1.0.0-alpha.0
- v0.1.21
- v0.1.16
- v0.1.15
- v0.1.14
- v0.1.13
- v0.1.12
- v0.1.10
- v0.1.9
- v0.1.8
- v0.1.7
- v0.1.6
- v0.1.5
- v0.1.4
- v0.1.3
- v0.1.2
- v0.1.2
- v0.0.21
- v0.0.20
- v0.0.19
- v0.0.18
- v0.0.17
- v0.0.15
- v0.0.14
- v0.0.13
- v0.0.13
- v0.0.12
- v0.0.11
- v0.0.10
- v0.0.9
- v0.0.8
- v0.0.7
- v0.0.6
- v0.0.5
- v0.0.4
- v0.0.3
- v0.0.2
- v0.0.1
- v0.0.1
- v0.0.0
AIWrapper
AIWrapper is a neat AI wrapper for JavaScript & TypeScript
Generate text, images, and voice across platforms - browser and servers. NodeJS, Deno, Bun, React, Svelte, and more. It’s framework independent.
Features
- Simple and intuitive API
- Supports text, image, and voice generation
- Count tokens and costs
- Cross-platform: Use it with JavaScript or TypeScript in various environments
Installation
NPM
npm install aiwrapperYarn
yarn add aiwrapperDeno
import * as aiwrapper from "https://deno.land/x/aiwrapper";Quick Start
Generate Text
import { Lang } from "aiwrapper";
const lang = Lang.openai({ apiKey });
const answer = await lang.ask("Say hi!");
console.log(answer);Generate Image
import { Img } from "aiwrapper";
const img = Img.openai({ apiKey });
const image = await img.ask('A portrait of a cute cat');
console.log(image);Generate Voice
import { Voice } from "aiwrapper";
const voice = Voice.openai({ apiKey });
const audio = voice.ask('Hello, world!');
console.log(audio.length);