mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Merge branch 'main' of https://github.com/SillyLossy/TavernAI
This commit is contained in:
@ -1369,7 +1369,12 @@ function getExtensionPrompt(position = 0, depth = undefined, separator = "\n") {
|
|||||||
|
|
||||||
function baseChatReplace(value, name1, name2) {
|
function baseChatReplace(value, name1, name2) {
|
||||||
if (value !== undefined && value.length > 0) {
|
if (value !== undefined && value.length > 0) {
|
||||||
value = substituteParams(value, is_pygmalion ? "You" : name1, name2);
|
if (is_pygmalion) {
|
||||||
|
value = value.replace(/{{user}}:/gi, 'You:');
|
||||||
|
value = value.replace(/<USER>:/gi, 'You:');
|
||||||
|
}
|
||||||
|
|
||||||
|
value = substituteParams(value, name1, name2);
|
||||||
|
|
||||||
if (power_user.collapse_newlines) {
|
if (power_user.collapse_newlines) {
|
||||||
value = collapseNewlines(value);
|
value = collapseNewlines(value);
|
||||||
|
@ -527,6 +527,7 @@ code {
|
|||||||
grid-column-start: 4;
|
grid-column-start: 4;
|
||||||
flex-flow: column;
|
flex-flow: column;
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.swipe_right img,
|
.swipe_right img,
|
||||||
|
@ -136,8 +136,8 @@ Easy to follow guide with pretty pictures:
|
|||||||
5. Open a Command Prompt inside that folder by clicking in the 'Address Bar' at the top, typing `cmd`, and pressing Enter.
|
5. Open a Command Prompt inside that folder by clicking in the 'Address Bar' at the top, typing `cmd`, and pressing Enter.
|
||||||
6. Once the black box (Command Prompt) pops up, type ONE of the following into it and press Enter:
|
6. Once the black box (Command Prompt) pops up, type ONE of the following into it and press Enter:
|
||||||
|
|
||||||
* for Main Branch: `git clone <https://github.com/Cohee1207/SillyTavern> -b main`
|
* for Main Branch: `git clone https://github.com/Cohee1207/SillyTavern -b main`
|
||||||
* for Dev Branch: `git clone <https://github.com/Cohee1207/SillyTavern> -b dev`
|
* for Dev Branch: `git clone https://github.com/Cohee1207/SillyTavern -b dev`
|
||||||
|
|
||||||
7. Once everything is cloned, double click `Start.bat` to make NodeJS install its requirements.
|
7. Once everything is cloned, double click `Start.bat` to make NodeJS install its requirements.
|
||||||
8. The server will then start, and SillyTavern will popup in your browser.
|
8. The server will then start, and SillyTavern will popup in your browser.
|
||||||
|
@ -2437,7 +2437,13 @@ app.post("/openai_bias", jsonParser, async function (request, response) {
|
|||||||
// Shamelessly stolen from Agnai
|
// Shamelessly stolen from Agnai
|
||||||
app.post("/openai_usage", jsonParser, async function (request, response) {
|
app.post("/openai_usage", jsonParser, async function (request, response) {
|
||||||
if (!request.body) return response.sendStatus(400);
|
if (!request.body) return response.sendStatus(400);
|
||||||
const key = request.body.key;
|
const key = readSecret(SECRET_KEYS.OPENAI);
|
||||||
|
|
||||||
|
if (!key) {
|
||||||
|
console.warn('Get key usage failed: Missing OpenAI API key.');
|
||||||
|
return response.sendStatus(401);
|
||||||
|
}
|
||||||
|
|
||||||
const api_url = new URL(request.body.reverse_proxy || api_openai).toString();
|
const api_url = new URL(request.body.reverse_proxy || api_openai).toString();
|
||||||
|
|
||||||
const headers = {
|
const headers = {
|
||||||
|
Reference in New Issue
Block a user