mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Add OpenAI API usage
This commit is contained in:
@@ -2176,7 +2176,7 @@ app.post("/getstatus_openai", jsonParser, function (request, response_getstatus_
|
||||
});
|
||||
|
||||
// Shamelessly stolen from Agnai
|
||||
app.post("/openai_usage", jsonParser, async function (_, response) {
|
||||
app.post("/openai_usage", jsonParser, async function (request, response) {
|
||||
if (!request.body) return response.sendStatus(400);
|
||||
const key = request.body.key;
|
||||
const api_url = new URL(request.body.reverse_proxy || api_openai).toString();
|
||||
|
Reference in New Issue
Block a user