mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Colab and any fix
This commit is contained in:
6
package-lock.json
generated
6
package-lock.json
generated
@@ -1,9 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "TavernAI",
|
"name": "TavernAI",
|
||||||
|
"version": "1.2.6",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
|
"name": "TavernAI",
|
||||||
|
"version": "1.2.6",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"express": "^4.18.2",
|
"express": "^4.18.2",
|
||||||
"multer": "^1.4.5-lts.1",
|
"multer": "^1.4.5-lts.1",
|
||||||
@@ -14,6 +17,9 @@
|
|||||||
"png-chunks-extract": "^1.0.0",
|
"png-chunks-extract": "^1.0.0",
|
||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
"sharp": "^0.31.3"
|
"sharp": "^0.31.3"
|
||||||
|
},
|
||||||
|
"bin": {
|
||||||
|
"TavernAI": "server.js"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/accepts": {
|
"node_modules/accepts": {
|
||||||
|
46
package.json
46
package.json
@@ -1,18 +1,32 @@
|
|||||||
{
|
{
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"express": "^4.18.2",
|
"express": "^4.18.2",
|
||||||
"multer": "^1.4.5-lts.1",
|
"multer": "^1.4.5-lts.1",
|
||||||
"node-rest-client": "^3.1.1",
|
"node-rest-client": "^3.1.1",
|
||||||
"open": "^8.4.0",
|
"open": "^8.4.0",
|
||||||
"png-chunk-text": "^1.0.0",
|
"png-chunk-text": "^1.0.0",
|
||||||
"png-chunks-encode": "^1.0.0",
|
"png-chunks-encode": "^1.0.0",
|
||||||
"png-chunks-extract": "^1.0.0",
|
"png-chunks-extract": "^1.0.0",
|
||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
"sharp": "^0.31.3"
|
"sharp": "^0.31.3"
|
||||||
},
|
},
|
||||||
"name": "TavernAI",
|
"name": "TavernAI",
|
||||||
"version": "1.2.6",
|
"version": "1.2.6",
|
||||||
"bin": {
|
"bin": {
|
||||||
"TavernAI": "server.js"
|
"TavernAI": "server.js"
|
||||||
}
|
},
|
||||||
|
"rules":{
|
||||||
|
"no-path-concat":"off",
|
||||||
|
"no-var":"off"
|
||||||
|
|
||||||
|
},
|
||||||
|
"pkg":{
|
||||||
|
"assets":[
|
||||||
|
"node_modules/sharp/build/Release/**/*",
|
||||||
|
"node_modules/sharp/vendor/lib/**/*",
|
||||||
|
"node_modules/open/xdg-open/",
|
||||||
|
"public",
|
||||||
|
"uploads"
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
@@ -589,6 +589,8 @@
|
|||||||
if(mesExamples.length > 0){
|
if(mesExamples.length > 0){
|
||||||
mesExamples = mesExamples.replace(/{{user}}/gi, name1);
|
mesExamples = mesExamples.replace(/{{user}}/gi, name1);
|
||||||
mesExamples = mesExamples.replace(/{{char}}/gi, name2);
|
mesExamples = mesExamples.replace(/{{char}}/gi, name2);
|
||||||
|
mesExamples = mesExamples.replace(/<USER>/gi, name1);
|
||||||
|
mesExamples = mesExamples.replace(/<BOT>/gi, name2);
|
||||||
//mesExamples = mesExamples.replaceAll('<START>', '[An example of how '+name2+' responds]');
|
//mesExamples = mesExamples.replaceAll('<START>', '[An example of how '+name2+' responds]');
|
||||||
let blocks = mesExamples.split(/<START>/gi);
|
let blocks = mesExamples.split(/<START>/gi);
|
||||||
mesExamplesArray = blocks.slice(1).map(block => `<START>\n${block.trim()}\n`);
|
mesExamplesArray = blocks.slice(1).map(block => `<START>\n${block.trim()}\n`);
|
||||||
@@ -2675,7 +2677,7 @@
|
|||||||
<div id="scenario_div">
|
<div id="scenario_div">
|
||||||
<h4>Scenario</h4>
|
<h4>Scenario</h4>
|
||||||
<h5>Circumstances and context of the dialogue</h5>
|
<h5>Circumstances and context of the dialogue</h5>
|
||||||
<input id="scenario_pole" name="scenario" class="text_pole" maxlength="999" size="40" value="" autocomplete="off" form="form_create">
|
<input id="scenario_pole" name="scenario" class="text_pole" maxlength="9999" size="40" value="" autocomplete="off" form="form_create">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="mes_example_div">
|
<div id="mes_example_div">
|
||||||
|
@@ -18,6 +18,9 @@
|
|||||||
<br><br><START><br>
|
<br><br><START><br>
|
||||||
{{user}}: Hello<br>
|
{{user}}: Hello<br>
|
||||||
{{char}}: *excitedly* Hello there, dear! Are you new to Axel? Don't worry, I, Aqua the goddess of water, am here to help you! Do you need any assistance? And may I say, I look simply radiant today! *strikes a pose and looks at you with puppy eyes*</p>
|
{{char}}: *excitedly* Hello there, dear! Are you new to Axel? Don't worry, I, Aqua the goddess of water, am here to help you! Do you need any assistance? And may I say, I look simply radiant today! *strikes a pose and looks at you with puppy eyes*</p>
|
||||||
|
<hr><br>A list of tags that are replaced when sending AI examples of dialogs:<br><br>
|
||||||
|
{{user}} and <USER> are replaced by username<br>
|
||||||
|
{{char}} and <BOT> are replaced by character name
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
@@ -249,8 +249,8 @@ app.post("/getchat", jsonParser, function(request, response){
|
|||||||
});
|
});
|
||||||
app.post("/getstatus", jsonParser, function(request, response_getstatus = response){
|
app.post("/getstatus", jsonParser, function(request, response_getstatus = response){
|
||||||
if(!request.body) return response_getstatus.sendStatus(400);
|
if(!request.body) return response_getstatus.sendStatus(400);
|
||||||
if(is_colab === true){
|
if(is_colab == true){
|
||||||
api_server = '127.0.0.1:5000';
|
api_server = String(process.env.colaburl).trim();
|
||||||
}else{
|
}else{
|
||||||
api_server = request.body.api_server;
|
api_server = request.body.api_server;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user