Commit 82a52323 authored by Travis Fischer's avatar Travis Fischer

🚳

parent 0c3b37e9
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
- [Intro](#intro) - [Intro](#intro)
- [Auth](#auth) - [Auth](#auth)
- [Usage](#usage) - [Usage](#usage)
- [Example](#example)
- [Docs](#docs) - [Docs](#docs)
- [Todo](#todo) - [Todo](#todo)
- [Related](#related) - [Related](#related)
...@@ -43,7 +44,7 @@ async function example() { ...@@ -43,7 +44,7 @@ async function example() {
} }
``` ```
Which outputs a similar reponse to the following (as a markdown string, including the _\`\`\`python_ code block prefix): Which outputs a similar reponse to this (as a markdown string, including the _\`\`\`python_ code block prefix):
```python ```python
def bubble_sort(lst): def bubble_sort(lst):
...@@ -67,12 +68,20 @@ def bubble_sort(lst): ...@@ -67,12 +68,20 @@ def bubble_sort(lst):
return 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 work really well in my testing, but if you'd rather output plaintext, you can use: 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 parsing to work really well during my testing, but if you'd rather output plaintext, you can use:
```ts ```ts
const api = new ChatGPTAPI({ markdown: false }) const api = new ChatGPTAPI({ markdown: false })
``` ```
## Example
A full example is included for testing purposes:
```
npx tsx src/example.ts
```
## Docs ## Docs
See the [auto-generated docs](./docs/classes/ChatGPTAPI.md) for more info on methods parameters. See the [auto-generated docs](./docs/classes/ChatGPTAPI.md) for more info on methods parameters.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment