Spaces:
Paused
Paused
| // main.js | |
| const CharacterAI = require("node_characterai"); | |
| const characterAI = new CharacterAI(); | |
| (async () => { | |
| const input = process.argv[2] || "Default message"; | |
| await characterAI.authenticateWithToken("529e24b4173b29dbc3054fef02a380e1e5b41949"); | |
| const characterId = "smtV3Vyez6ODkwS8BErmBAdgGNj-1XWU73wIFVOY1hQ"; | |
| const chat = await characterAI.createOrContinueChat(characterId); | |
| const response = await chat.sendAndAwaitResponse(input, true); | |
| console.log(response); // This will be captured by Python's subprocess | |
| })(); | |