jakiestfu / stability-ts

DreamStudio Client written in TypeScript
156 stars 33 forks source link

Typo in the README.md #6

Closed anthonywong555 closed 1 year ago

anthonywong555 commented 1 year ago

In the README.md it has the following piece of code:

import { generate } from 'stability-ts'

const api = generate({
  prompt: 'A Stunning House',
  token: process.env.DREAMSTUDIO_API_KEY,
})

api.on('image', ({ buffer, filePath }) => {
  console.log('Image', buffer, filePath)
})

api.on('end', () => {
  console.log('Generating Complete')
})

It's suppose to be

import { generate } from 'stability-ts'

const api = generate({
  prompt: 'A Stunning House',
  apiKey: process.env.DREAMSTUDIO_API_KEY,
})

api.on('image', ({ buffer, filePath }) => {
  console.log('Image', buffer, filePath)
})

api.on('end', () => {
  console.log('Generating Complete')
})

Just replace the token with apiKey.

jakiestfu commented 1 year ago

Thank you, @anthonywong555! Fixed here: https://github.com/jakiestfu/stability-ts/commit/39f33f21dcdfea5b79d1c6adb1b0c3edddcb0c19