From 83667f4fa7f049380e67e10a5ca5d2de2aabe9d3 Mon Sep 17 00:00:00 2001 From: Travis Fischer Date: Fri, 2 Dec 2022 18:49:55 -0600 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- legacy/readme.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/legacy/readme.md b/legacy/readme.md index be7ce0d6..c9e2a857 100644 --- a/legacy/readme.md +++ b/legacy/readme.md @@ -43,7 +43,7 @@ async function example() { } ``` -Which outputs the following (as a markdown string): +Which outputs a similar reponse to the following (as a markdown string, including the `\`\`\`python` code prefix): ```python def bubble_sort(lst): @@ -67,7 +67,11 @@ def bubble_sort(lst): return lst ``` -Note that the default functionality is to parse ChatGPT responses as markdown using [html-to-md](https://github.com/stonehank/html-to-md). I've found the markdown quality to be excellent in my testing, but if you'd rather output plaintext, just pass `{ markdown: false }` to the `ChatGPTAPI` constructor. +Note that the default functionality is to parse ChatGPT responses as markdown using [html-to-md](https://github.com/stonehank/html-to-md). I've found the markdown quality to work really well in my testing, but if you'd rather output plaintext, you can use: + +```ts +const api = new ChatGPTAPI({ markdown: false }) +``` ## Docs