select role from frontend
This commit is contained in:
parent
21710fccd2
commit
0cb506fe38
@ -8,7 +8,6 @@ import json
|
|||||||
|
|
||||||
import streamlit as st
|
import streamlit as st
|
||||||
|
|
||||||
|
|
||||||
class DP:
|
class DP:
|
||||||
|
|
||||||
def __init__(self, dst: DST, llm_rephrasing=True, character='default'): #TODO: a way to set llm_rephrasing status and a character
|
def __init__(self, dst: DST, llm_rephrasing=True, character='default'): #TODO: a way to set llm_rephrasing status and a character
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import streamlit as st
|
import streamlit as st
|
||||||
|
|
||||||
class NLG:
|
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_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?"
|
MESSAGE_HI = "Hi! What do you want to make today?"
|
||||||
|
@ -4,6 +4,11 @@
|
|||||||
"model": "gpt-3.5-turbo-0613",
|
"model": "gpt-3.5-turbo-0613",
|
||||||
"characters": {
|
"characters": {
|
||||||
"default": {
|
"default": {
|
||||||
|
"prompt": "",
|
||||||
|
"task_specification": ""
|
||||||
|
|
||||||
|
},
|
||||||
|
"helpful_chef": {
|
||||||
"prompt": "You're a master chef known for treating everyone like your equal. ",
|
"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."
|
"task_specification": " Give your answer as a natural sounding, full English sentence."
|
||||||
|
|
||||||
|
@ -111,8 +111,14 @@ def main() -> None:
|
|||||||
horizontal=True,
|
horizontal=True,
|
||||||
)
|
)
|
||||||
if role_kind == st.session_state.locale.radio_text1:
|
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)
|
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:
|
elif role_kind == st.session_state.locale.radio_text2:
|
||||||
c2.text_input(label=st.session_state.locale.select_placeholder3, key="role")
|
c2.text_input(label=st.session_state.locale.select_placeholder3, key="role")
|
||||||
|
|
||||||
|
@ -1,16 +1,6 @@
|
|||||||
AI_ROLE_OPTIONS_EN: list[str] = [
|
AI_ROLE_OPTIONS_EN: list[str] = [
|
||||||
"helpful assistant",
|
"default",
|
||||||
"code assistant",
|
"helpful_chef",
|
||||||
"code reviewer",
|
"ramsay",
|
||||||
"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",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user