adjusts user self-service link presentation
This commit is contained in:
@@ -6,6 +6,7 @@
|
|||||||
# MODEL_RATE_LIMIT=4
|
# MODEL_RATE_LIMIT=4
|
||||||
# MAX_OUTPUT_TOKENS_OPENAI=300
|
# MAX_OUTPUT_TOKENS_OPENAI=300
|
||||||
# MAX_OUTPUT_TOKENS_ANTHROPIC=900
|
# MAX_OUTPUT_TOKENS_ANTHROPIC=900
|
||||||
|
# SHOW_TOKEN_COSTS=true
|
||||||
# LOG_LEVEL=info
|
# LOG_LEVEL=info
|
||||||
# REJECT_DISALLOWED=false
|
# REJECT_DISALLOWED=false
|
||||||
# REJECT_MESSAGE="This content violates /aicg/'s acceptable use policy."
|
# REJECT_MESSAGE="This content violates /aicg/'s acceptable use policy."
|
||||||
|
|||||||
+6
-4
@@ -114,6 +114,7 @@ function cacheInfoPageHtml(baseUrl: string) {
|
|||||||
<hr />
|
<hr />
|
||||||
<h2>Service Info</h2>
|
<h2>Service Info</h2>
|
||||||
<pre>${JSON.stringify(info, null, 2)}</pre>
|
<pre>${JSON.stringify(info, null, 2)}</pre>
|
||||||
|
${getSelfServiceLinks()}
|
||||||
</body>
|
</body>
|
||||||
</html>`;
|
</html>`;
|
||||||
|
|
||||||
@@ -348,13 +349,14 @@ Logs are anonymous and do not contain IP addresses or timestamps. [You can see t
|
|||||||
if (customGreeting) {
|
if (customGreeting) {
|
||||||
infoBody += `\n## Server Greeting\n${customGreeting}`;
|
infoBody += `\n## Server Greeting\n${customGreeting}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config.gatekeeper === "user_token") {
|
|
||||||
infoBody += `\n\n---\n\n[User lookup](/user/lookup)`;
|
|
||||||
}
|
|
||||||
return converter.makeHtml(infoBody);
|
return converter.makeHtml(infoBody);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getSelfServiceLinks() {
|
||||||
|
if (config.gatekeeper !== "user_token") return "";
|
||||||
|
return `<footer style="font-size: 0.8em;"><hr /><a href="/user/lookup">Check your user token info</a></footer>`;
|
||||||
|
}
|
||||||
|
|
||||||
/** Returns queue time in seconds, or minutes + seconds if over 60 seconds. */
|
/** Returns queue time in seconds, or minutes + seconds if over 60 seconds. */
|
||||||
function getQueueInformation(partition: ModelFamily) {
|
function getQueueInformation(partition: ModelFamily) {
|
||||||
const waitMs = getEstimatedWaitTime(partition);
|
const waitMs = getEstimatedWaitTime(partition);
|
||||||
|
|||||||
Reference in New Issue
Block a user