UNPKG

textsynth

Version:
26 lines (23 loc) 614 B
```js (async () => { const synthResponse = await textsynth.complete({ engine: 'gptj_6B', prompt: '//write "hello world" to console in javascript\n', max_tokens: 10, temperature: 1, top_k: 40, top_p: 1, stream: false, stop: ["###"] }); console.log(synthResponse.data); })(); (async () => { const synthResponse = await textsynth.logprob({ engine: 'gptj_6B', context: "The quick brown fox jumps over the lazy", continuation: "dog" }); console.log(synthResponse.data); })(); ```