From 5089995d2d448c748a2ac017f2eb5c3438116494 Mon Sep 17 00:00:00 2001 From: Coloride <108619637+realcoloride@users.noreply.github.com> Date: Sat, 20 Apr 2024 15:56:20 +0200 Subject: [PATCH] Concurrency example https://github.com/realcoloride/node_characterai/issues/157#issuecomment-2005709711 --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 684d7c3..00aff0c 100644 --- a/README.md +++ b/README.md @@ -140,7 +140,8 @@ await chat.sendAndAwaitResponse({ |😮 **Why are chromium processes opening?**|This is because as of currently, the simple fetching is broken and I use puppeteer (a chromium browser control library) to go around cloudflare's restrictions.| |👥 **`authenticateAsGuest()` doesn't work**|See issue [#14](https://github.com/realcoloride/node_characterai/issues/14).| |🦒 **Hit the max amount of messages?**|Sadly, guest accounts only have a limited amount of messages before they get limited and forced to login. See below for more info 👇| -|🪐 **How to use an account to mass use the library?**|You can use **conversations**, a feature introduced in `1.0.0`, to assign to users and channels. **To reproduce a conversation, use OOC (out of character) to make the AI think you're with multiple people.** __See an example here:__ ![chrome_RDbmXXtFNl](https://user-images.githubusercontent.com/108619637/224778145-284dd89e-7960-499c-b0f0-0deca419c578.png)![chrome_BgF8crPvqC](https://user-images.githubusercontent.com/108619637/224778153-c2a42a26-c5f7-4148-9644-34353482833e.png) (Disclaimer: on some characters, their personality will make them ignore any OOC request).| +|🪐 **How to use an account to mass use the library?**|You can use **conversations**, a feature introduced in `1.0.0`, to assign to users and channels. **To reproduce a conversation, use OOC (out of character) to make the AI think you're with multiple people.** __See an example here:__ ![chrome_RDbmXXtFNl](https://user-images.githubusercontent.com/108619637/224778145-284dd89e-7960-499c-b0f0-0deca419c578.png)![chrome_BgF8crPvqC](https://user-images.githubusercontent.com/108619637/224778153-c2a42a26-c5f7-4148-9644-34353482833e.png) (Disclaimer: on some characters, their personality will make them ignore any OOC request). | +|🏃 **How do I avoid concurrency and crashes when using more than one request at a time?**|Check the solution found by @SeoulSKY [here](https://github.com/realcoloride/node_characterai/issues/157#issuecomment-2005709711) using `async-mutex`.| |📣 **Is this official?**|No, this project is made by a fan of the website and is unofficial. *To support the developers, please check out [their website](https://beta.character.ai)*.| |😲 **Did something awesome with `node_characterai`?**|Please let me know!| |✉️ **Want to contact me?**|See my profile|