diff --git a/README.md b/README.md index 6142489..9aaa1f6 100644 --- a/README.md +++ b/README.md @@ -7,11 +7,14 @@ An API endpoint that wraps using the Lilypad cli. Run `node src/index.js` to create a local endpoint using the js wrapper with either `src/run.js` or `src/stream.js`, then send a post request containing json with your funded `WEB3_PRIVATE_KEY` key set, see the quick start for more on [getting started](https://docs.lilypad.tech/lilypad/lilypad-milky-way-testnet/quick-start) +In `inputs`, each input must be preceeded by the `-i` flag, including tunables. For example: +`"inputs": "-i Prompt='an astronaut floating against a white background' -i Steps=50"` + The endpoint can then be tested using curl ``` curl -X POST http://localhost:3000 \ -H "Content-Type: application/json" \ --d '{"pk": "'"$WEB3_PRIVATE_KEY"'", "module": "github.com/lilypad-tech/lilypad-module-lilysay:0.1.0", "inputs": "Message=test"}' +-d '{"pk": "'"$WEB3_PRIVATE_KEY"'", "module": "github.com/lilypad-tech/lilypad-module-lilysay:0.1.0", "inputs": "-i Message=test"}' ``` ```js @@ -21,7 +24,7 @@ const { run } = require("./") run( "private-key", "module name" - 'payload (key=value)' + '-i payload (key=value)' ).then((res) => { console.log(res) }) @@ -34,7 +37,7 @@ const { stream } = require("./") stream( "private-key", "module name" - 'payload (key=value)' + '-i payload (key=value)' { stream: true }, ).then(() => { console.log("Result in ./output/result")