From 27caf1ff0681b1d7406ccb8913252c943b8000cc Mon Sep 17 00:00:00 2001 From: nai-degen Date: Tue, 16 May 2023 01:19:13 -0500 Subject: [PATCH] adds temporary disclaimer about streaming issues on Render --- src/info-page.ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/info-page.ts b/src/info-page.ts index de3c7ab..cd965ac 100644 --- a/src/info-page.ts +++ b/src/info-page.ts @@ -117,6 +117,8 @@ function buildInfoPageHeader(converter: showdown.Converter, title: string) { ? fs.readFileSync("greeting.md", "utf8") : null; + // TODO: use some templating engine instead of this mess + let infoBody = ` # ${title}`; if (config.promptLogging) { @@ -133,7 +135,17 @@ Logs are anonymous and do not contain IP addresses or timestamps. [You can see t infoBody += `\n### Estimated Wait Time: ${friendlyWaitTime} Queueing is enabled. If the AI is busy, your prompt will processed when a slot frees up. -**Enable Streaming in your preferred client or you may experience \`504 Gateway Timeout\` errors.**`; +${ + process.env.RENDER + ? "" + : "**Enable Streaming in your preferred client or you may experience `504 Gateway Timeout` errors.*" +}`; + } + + if (process.env.RENDER) { + // Render has some strange issue where event-streams just hang for a while + // and then close the connection. + infoBody += `\n**Streaming mode may have issues on this proxy due to the hosting provider. Non-streaming mode should work fine even for long prompts.**`; } if (customGreeting) {