Skip to content

wooseopkim/aify

Repository files navigation

aify

This dead simple library lets humans mock machines that mock humans. Forget about the bundle size, it's freaking AI tech.

Demo

You can chat with this fake AI here.

API

  1. createStream
import { createStream } from 'aify';

const config = { delay: 1000, interval: 200 };
const reader = createStream('Hello, world!', config).getReader();
while (true) {
    const { done, value } = await reader.read();
    if (done) {
        break;
    }
    console.log(value);
}
  1. createGenerator

This is a wrapper over createStream.

import { createGenerator } from 'aify';

for await (const chunk of createGenerator('Hello, world!')) {
    console.log(chunk);
}

About

Lets you mimic the machines that mimic you!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published