select role from frontend

This commit is contained in:
Adrian Charkiewicz 2023-06-17 17:54:27 +02:00
parent 21710fccd2
commit 0cb506fe38
5 changed files with 15 additions and 16 deletions

View File

@ -8,7 +8,6 @@ import json
import streamlit as st
class DP:
def __init__(self, dst: DST, llm_rephrasing=True, character='default'): #TODO: a way to set llm_rephrasing status and a character

View File

@ -1,5 +1,4 @@
import streamlit as st
class NLG:
MESSAGE_PROMPT = "Hello! I'm AMUseBot, a virtual cooking assistant. Please tell me the name of the dish that you'd like to prepare today."
MESSAGE_HI = "Hi! What do you want to make today?"

View File

@ -4,6 +4,11 @@
"model": "gpt-3.5-turbo-0613",
"characters": {
"default": {
"prompt": "",
"task_specification": ""
},
"helpful_chef": {
"prompt": "You're a master chef known for treating everyone like your equal. ",
"task_specification": " Give your answer as a natural sounding, full English sentence."

View File

@ -111,8 +111,14 @@ def main() -> None:
horizontal=True,
)
if role_kind == st.session_state.locale.radio_text1:
c2.selectbox(label=st.session_state.locale.select_placeholder2, key="role",
character_type = c2.selectbox(label=st.session_state.locale.select_placeholder2, key="role",
options=st.session_state.locale.ai_role_options)
st.session_state.dp.character = character_type
if character_type == 'default':
st.session_state.dp.llm_rephrasing = False
else:
st.session_state.dp.llm_rephrasing = True
elif role_kind == st.session_state.locale.radio_text2:
c2.text_input(label=st.session_state.locale.select_placeholder3, key="role")

View File

@ -1,16 +1,6 @@
AI_ROLE_OPTIONS_EN: list[str] = [
"helpful assistant",
"code assistant",
"code reviewer",
"text improver",
"cinema expert",
"sport expert",
"online games expert",
"food recipes expert",
"English grammar expert",
"friendly and helpful teaching assistant",
"laconic assistant",
"helpful, pattern-following assistant",
"translate corporate jargon into plain English",
"default",
"helpful_chef",
"ramsay",
]