diff --git a/Chat.go b/Chat.go index 227b87c..c55dc81 100644 --- a/Chat.go +++ b/Chat.go @@ -302,6 +302,51 @@ func generateWelcomeChatHTML() string { return htmlString } +func generateHelpChatHandler(c *fiber.Ctx) error { + return c.SendString(generateHelpChatHTML()) +} + +func generateHelpChatHTML() string { + out, err := explainLLMconvChatTmpl.Execute(pongo2.Context{}) + if err != nil { + fmt.Println("Error executing explain LLM and Conversation template") + panic(err) + } + htmlString := "
JADE require at least one API key to work. Add one in the settings at the bottom right of the page.
diff --git a/dockerfile b/dockerfile index 6b78613..2962a33 100644 --- a/dockerfile +++ b/dockerfile @@ -20,7 +20,7 @@ RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o /go/main . ############################ # STEP 2 build a small image ############################ -FROM alpine:latest +FROM gcr.io/distroless/static WORKDIR / diff --git a/main.go b/main.go index 90ce066..cc0427f 100644 --- a/main.go +++ b/main.go @@ -26,6 +26,7 @@ var ( conversationPopoverTmpl *pongo2.Template welcomeChatTmpl *pongo2.Template chatInputTmpl *pongo2.Template + explainLLMconvChatTmpl *pongo2.Template clients = make(map[chan SSE]bool) mu sync.Mutex ) @@ -60,6 +61,7 @@ func main() { messageEditTmpl = pongo2.Must(pongo2.FromFile("views/partials/message-edit-form.html")) welcomeChatTmpl = pongo2.Must(pongo2.FromFile("views/partials/welcome-chat.html")) chatInputTmpl = pongo2.Must(pongo2.FromFile("views/partials/chat-input.html")) + explainLLMconvChatTmpl = pongo2.Must(pongo2.FromFile("views/partials/explain-llm-conv-chat.html")) // Import HTML using django engine/template engine := django.New("./views", ".html") @@ -93,6 +95,7 @@ func main() { app.Get("/userMessage", GetUserMessageHandler) app.Post("/editMessage", EditMessageHandler) app.Post("/archiveDefaultConversation", ArchiveDefaultConversationHandler) + app.Get("/help", generateHelpChatHandler) // Settings routes app.Post("/addKeys", addKeys) diff --git a/views/partials/explain-llm-conv-chat.html b/views/partials/explain-llm-conv-chat.html new file mode 100644 index 0000000..0bfb61f --- /dev/null +++ b/views/partials/explain-llm-conv-chat.html @@ -0,0 +1 @@ +Explain LLM and Conversation
\ No newline at end of file diff --git a/views/partials/popover-settings.html b/views/partials/popover-settings.html index 3d8782b..608395c 100644 --- a/views/partials/popover-settings.html +++ b/views/partials/popover-settings.html @@ -117,6 +117,13 @@ Terms and conditions + + + + + Help + diff --git a/views/partials/welcome-chat.html b/views/partials/welcome-chat.html index a06d7d4..72483a0 100644 --- a/views/partials/welcome-chat.html +++ b/views/partials/welcome-chat.html @@ -1,10 +1,20 @@ -Welcome to JADE, a chatbot that makes requests to various third-party APIs to provide information and - services. +So you like chatGPT and want more GPT-4o but don't want to pay 20$/month?.
-No fancy stuff, easy to use, pay as you use, multi-models, work on low 3g...
+JADE allows you to pay by the token. So if you use it a little, you pay near nothing.
-To start using JADE, please login.
+To start using JADE, please sign in.
- Log in - \ No newline at end of file + Sign in + + +You can find more informations about JADE bellow:
+JADE start with a free tier that allow you to use ask 500 messages a month. You can then upgrade for $0.95/month.
\ No newline at end of file