diff --git a/README.md b/README.md index 99fe700..418d380 100644 --- a/README.md +++ b/README.md @@ -59,8 +59,8 @@ const cohere = new CohereClient({ }); for await (const chat of stream) { - if (chat.type === "text-generation") { - console.log(chat.text); + if (chat.eventType === "text-generation") { + process.stdout.write(chat.text); } } })(); @@ -102,4 +102,4 @@ This SDK is in beta, and while we will try to avoid it, there may be breaking ch While we value open-source contributions to this SDK, the code is generated programmatically. Additions made directly would have to be moved over to our generation code, otherwise they would be overwritten upon the next generated release. Feel free to open a PR as a proof of concept, but know that we will not be able to merge it as-is. We suggest opening an issue first to discuss with us! -On the other hand, contributions to the README are always very welcome! \ No newline at end of file +On the other hand, contributions to the README are always very welcome!