diff --git a/.dockerignore b/.dockerignore
index 70fd3b4da..482a98310 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -1,3 +1,4 @@
+.git
node_modules
npm-debug.log
readme*
diff --git a/Dockerfile b/Dockerfile
index c19440a65..9fca2b46d 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -3,8 +3,10 @@ FROM node:19.1.0-alpine3.16
# Arguments
ARG APP_HOME=/home/node/app
+# Install system dependencies
+RUN apk add gcompat tini
+
# Ensure proper handling of kernel signals
-RUN apk add tini
ENTRYPOINT [ "tini", "--" ]
# Create app directory
@@ -14,7 +16,7 @@ WORKDIR ${APP_HOME}
COPY package*.json ./
RUN \
echo "*** Install npm packages ***" && \
- npm install
+ npm install && npm cache clean --force
# Bundle app source
COPY . ./
@@ -25,8 +27,8 @@ RUN \
mv "./public/characters" "./public/characters.default" && \
mv "./public/chats" "./public/chats.default" && \
mv "./public/User Avatars" "./public/User Avatars.default" && \
- mv "./public/settings.json" "./public/settings.json.default" && \
-
+ mv "./public/settings.json" "./public/settings.json.default" && \
+ \
echo "*** Create symbolic links to config directory ***" && \
ln -s "${APP_HOME}/config/characters" "${APP_HOME}/public/characters" && \
ln -s "${APP_HOME}/config/chats" "${APP_HOME}/public/chats" && \
@@ -38,7 +40,6 @@ RUN \
echo "*** Cleanup ***" && \
mv "./docker/docker-entrypoint.sh" "./" && \
rm -rf "./docker" && \
- rm -rf "./.git" && \
echo "*** Make docker-entrypoint.sh executable ***" && \
chmod +x "./docker-entrypoint.sh" && \
echo "*** Convert line endings to Unix format ***" && \
diff --git a/colab/GPU.ipynb b/colab/GPU.ipynb
index 80adbbc97..b36cfb58c 100644
--- a/colab/GPU.ipynb
+++ b/colab/GPU.ipynb
@@ -6,10 +6,10 @@
"metadata": {},
"source": [
"**Links**
\n",
- "Cohee's TavernAI fork Github https://github.com/Cohee1207/SillyTavern
\n",
- "Cohee's TavernAI Extras Github https://github.com/Cohee1207/TavernAI-extras/
\n",
- "TavernAI Discord https://discord.gg/zmK2gmr45t
\n",
- "Questions? Hit me up on Discord: Cohee#1207"
+ "SillyTavern GitHub: https://github.com/Cohee1207/SillyTavern
\n",
+ "Extensions API GitHub: https://github.com/Cohee1207/TavernAI-extras/
\n",
+ "SillyTavern community Discord (support and discussion): https://discord.gg/RZdyAEUPvj
\n",
+ "Contact the maintainer directly: Cohee#1207"
]
},
{
diff --git a/faq.md b/faq.md
index 83b5b159f..113fb74b7 100644
--- a/faq.md
+++ b/faq.md
@@ -132,7 +132,7 @@ When using Poe, be careful, it's implemented in a hacky way. If you don't get an
iPhones and iPads are not capable of running the whole Tavern app, but since it's just a web interface, you can run it on another computer on your home wifi, and then access in your mobile browser. Refer to https://github.com/Cohee1207/SillyTavern#remote-connections
-For Android users, in addition to the above, you can run the whole Tavern directly on your phone, without needing a PC, using the Termux app. Refer to https://rentry.org/TAI_Termux .
+For Android users, in addition to the above, you can run the whole Tavern directly on your phone, without needing a PC, using the Termux app. Refer to https://rentry.org/STAI-Termux .
## Q: How can I download pre-made characters to chat with?
diff --git a/readme.md b/readme.md
index abfab2062..9b0200914 100644
--- a/readme.md
+++ b/readme.md
@@ -27,10 +27,25 @@ https://colab.research.google.com/github/Cohee1207/SillyTavern/blob/main/colab/G
> **This fork can be run natively on Android phones using Termux. Please refer to this guide by ArroganceComplex#2659:**
-https://rentry.org/TAI_Termux
+https://rentry.org/STAI-Termux
**.webp character cards import/export is not supported in Termux. Use either JSON or PNG formats instead.**
+## Questions or suggestions?
+
+### We now have a community Discord server!
+
+Get support, share favorite characters and prompts:
+
+### [Join](https://discord.gg/RZdyAEUPvj)
+
+***
+
+Get in touch with the developers directly:
+* Discord: Cohee#1207 or RossAscends#1779
+* Reddit: /u/RossAscends or /u/sillylossy
+* [Post a GitHub issue](https://github.com/Cohee1207/SillyTavern/issues)
+
## This version includes
* A heavily modified TavernAI 1.2.8 (more than 50% of code rewritten or optimized)
* Swipes
@@ -100,7 +115,7 @@ https://rentry.org/TAI_Termux
*NOTE: This branch is intended for local install purposes, and has not been thoroughly tested on a colab or other cloud notebook service.*
### Windows
- 1. install [NodeJS](https://nodejs.org/en)
+ 1. install [NodeJS](https://nodejs.org/en) (latest LTS version is recommended)
2. download the zip from this GitHub repo
3. unzip it into a folder of your choice
4. run start.bat via double-clicking or in a command line.
@@ -166,11 +181,6 @@ Try enabling the No Blur Effect (Fast UI) mode on the User settings panel.
2. Send bug reports without providing any context
3. Ask the questions that were already answered numerous times
-## Questions or suggestions?
-Contact us on:
-* Discord: Cohee#1207 or RossAscends#1779
-* Reddit: /u/RossAscends or /u/sillylossy
-
## Screenshots
diff --git a/server.js b/server.js
index 8b8c24964..e7d339ac4 100644
--- a/server.js
+++ b/server.js
@@ -798,11 +798,13 @@ async function charaWrite(img_url, data, target_img, response = undefined, mes =
fs.writeFileSync(charactersPath + target_img + '.png', new Buffer.from(encode(chunks)));
if (response !== undefined) response.send(mes);
+ return true;
} catch (err) {
console.log(err);
- if (response !== undefined) response.send(err);
+ if (response !== undefined) response.status(500).send(err);
+ return false;
}
}
@@ -2458,7 +2460,12 @@ async function convertWebp() {
await webp.dwebp(source, dest, "-o");
console.log(`Write... ${dest}`);
- await charaWrite(dest, data, path.parse(dest).name);
+ const success = await charaWrite(dest, data, path.parse(dest).name);
+
+ if (!success) {
+ console.log(`Failure on ${source} -> ${dest}`);
+ continue;
+ }
console.log(`Remove... ${source}`);
fs.rmSync(source);
diff --git a/tools/charaverter/main.mjs b/tools/charaverter/main.mjs
index c3fda1729..da7f3123d 100644
--- a/tools/charaverter/main.mjs
+++ b/tools/charaverter/main.mjs
@@ -71,11 +71,13 @@ async function charaWrite(img_url, data, target_img, response = undefined, mes =
fs.writeFileSync(target_img, new Buffer.from(encode(chunks)));
if (response !== undefined) response.send(mes);
+ return true;
} catch (err) {
console.log(err);
- if (response !== undefined) response.send(err);
+ if (response !== undefined) response.status(500).send(err);
+ return false;
}
}
@@ -102,7 +104,12 @@ async function charaWrite(img_url, data, target_img, response = undefined, mes =
await webp.dwebp(source, dest, "-o")
console.log(`Write... ${dest}`)
- await charaWrite(dest, data, dest)
+ const success = await charaWrite(dest, data, path.parse(dest).name);
+
+ if (!success) {
+ console.log(`Failure on ${source} -> ${dest}`);
+ continue;
+ }
console.log(`Remove... ${source}`)
fs.rmSync(source)