Merge branch 'main' into dev

This commit is contained in:
SillyLossy
2023-04-29 17:19:27 +03:00
7 changed files with 47 additions and 21 deletions

View File

@ -1,3 +1,4 @@
.git
node_modules
npm-debug.log
readme*

View File

@ -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 . ./
@ -26,7 +28,7 @@ RUN \
mv "./public/chats" "./public/chats.default" && \
mv "./public/User Avatars" "./public/User Avatars.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 ***" && \

View File

@ -6,10 +6,10 @@
"metadata": {},
"source": [
"**Links**<br>\n",
"Cohee's TavernAI fork Github https://github.com/Cohee1207/SillyTavern<br>\n",
"Cohee's TavernAI Extras Github https://github.com/Cohee1207/TavernAI-extras/<br>\n",
"TavernAI Discord https://discord.gg/zmK2gmr45t<br>\n",
"Questions? Hit me up on Discord: Cohee#1207"
"SillyTavern GitHub: https://github.com/Cohee1207/SillyTavern<br>\n",
"Extensions API GitHub: https://github.com/Cohee1207/TavernAI-extras/<br>\n",
"SillyTavern community Discord (support and discussion): https://discord.gg/RZdyAEUPvj<br>\n",
"Contact the maintainer directly: Cohee#1207"
]
},
{

2
faq.md
View File

@ -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?

View File

@ -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
<img width="400" alt="image" src="https://user-images.githubusercontent.com/18619528/228649245-8061c60f-63dc-488e-9325-f151b7a3ec2d.png">
<img width="400" alt="image" src="https://user-images.githubusercontent.com/18619528/228649856-fbdeef05-d727-4d5a-be80-266cbbc6b811.png">

View File

@ -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);

View File

@ -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)