Skip to content

Commit

Permalink
Update royal_game_6_experimental_layout.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Dr-Hutchinson committed Jun 22, 2023
1 parent 901b7b1 commit ab66b2b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions royal_game_6_experimental_layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,8 +364,8 @@ def self_grading_chatbot():
token_count = []
st.write(st.session_state.token_count)

if 'responses' not in st.session_state:
st.session_state['responses'] = ["Hello, I'm Clio! Enter /start to begin the assignment!"]
#if 'responses' not in st.session_state:
# st.session_state['responses'] = ["Hello, I'm Clio! Enter /start to begin the assignment!"]

if 'requests' not in st.session_state:
st.session_state['requests'] = []
Expand All @@ -383,7 +383,7 @@ def self_grading_chatbot():
st.session_state['answer'] = None

if 'conversation' not in st.session_state:
st.session_state['conversation'] = []
st.session_state['conversation'] = ["Hello, I'm Clio! Enter /start to begin the assignment!"]

llm = ChatOpenAI(model_name="gpt-3.5-turbo-16k", openai_api_key=st.secrets["openai_api_key"])

Expand Down Expand Up @@ -778,8 +778,9 @@ def count_tokens(chain, query):
st.write("Please input /start to begin the chat.")

with response_container:
for speaker, message in st.session_state['conversation']:
message(message, is_user=(speaker == 'User'))
if st.session_state['conversation']:
for speaker, message in st.session_state['conversation']:
message(message, is_user=(speaker == 'User'))

#with response_container:
#with response_container:
Expand Down

0 comments on commit ab66b2b

Please sign in to comment.