1.7.1 • Published 1 year ago
gpt-free v1.7.1
GPT-Free
GPT-3, but free
Example usage
import { Client } from "gpt-free";
const client = new Client();
const conversation = client.model("chat");
const response = conversation.ask("Hello! Write me an essay on the impact of AI.");
// example chunked usage
response.onChunk(chunk => {
process.stdout.write(chunk);
});
response.onEnd(() => {
console.log("\nDone!");
});
// example promise usage
response.then(result => {
console.log(result);
});