From 4eeb2ccf88fc54273d72476aebe98e36d7b0a425 Mon Sep 17 00:00:00 2001 From: J S <49557684+svilupp@users.noreply.github.com> Date: Sat, 18 May 2024 11:40:49 +0100 Subject: [PATCH] fix config view grid box --- CHANGELOG.md | 1 + src/view.jl | 44 ++++++++++++++++++++++++++------------------ 2 files changed, 27 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dd6a8d2..6a703c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ Prompt Builder tab Configuration - Changed default OpenAI model to GPT-4 Omni +- Improve grid layout and wider prompt textboxes ### Fixed - Fixed a piracy warning in Aqua diff --git a/src/view.jl b/src/view.jl index ef6b9b0..2e8dbaf 100644 --- a/src/view.jl +++ b/src/view.jl @@ -9,7 +9,7 @@ function tab_chat() tab_chat_messages(), separator(@iif("!!conv_displayed.length")), tab_chat_input() - ] + ] |> htmldiv end function tab_meta() [ @@ -19,7 +19,7 @@ function tab_meta() tab_meta_messages(), separator(@iif("!!meta_displayed.length")), tab_meta_input() - ] + ] |> htmldiv end function tab_builder() [ @@ -30,7 +30,7 @@ function tab_builder() tab_builder_settings(), tab_builder_messages(), tab_builder_input() - ] + ] |> htmldiv end function tab_history() [ @@ -57,7 +57,7 @@ function tab_history() btn("Fork the conversation", @click(:history_fork), class = "btn btn-secondary") ]) - ] + ] |> htmldiv end function tab_templates() [ @@ -74,25 +74,33 @@ function tab_templates() system = "{{item.system_preview}}", user = "{{item.user_preview}}") ] ) - ] + ] |> htmldiv end function tab_config() [h3("Configuration"), - row(class = "col-6", select(:model, options = :model_options, label = "Model")), - row(class = "col-6 pb-5", - textfield("Add a new model", :model_input, hint = "Confirm with ENTER", - @on("keyup.enter", "model_submit = !model_submit"))), - row([textfield("Default System Prompt", :system_prompt, - hint = "Will be sent to the AI model as the first instruction.") - ]), + row(class = "", + [ + cell(class = "col-5", + select(:model, options = :model_options, label = "Model")), + cell(class = "pl-6 col-6", + textfield( + "Add a new model", :model_input, hint = "Confirm with ENTER", + @on("keyup.enter", "model_submit = !model_submit"))) + ]), + row(class = "", + cell([textfield("Default System Prompt", :system_prompt, + hint = "Will be sent to the AI model as the first instruction.") + ])), separator(), + row(class = "pt-6", + cell(class = "col-5", + select( + :model_stt, options = :model_options_stt, label = "Speech-to-Text Model"))), row(class = "", - select( - :model_stt, options = :model_options_stt, label = "Speech-to-Text Model")), - row([textfield("Speech-to-Text Prompt", :stt_prompt, - hint = "Provided often mispelled words or showcase the desired writing style.") - ]) ## TODO: stats - tokens + cost - ] + cell([textfield("Speech-to-Text Prompt", :stt_prompt, + hint = "Provided often mispelled words or showcase the desired writing style.") + ])) ## TODO: stats - tokens + cost + ] |> htmldiv end ## Page Container