Spaces:
Sleeping
Sleeping
John Graham Reynolds
commited on
Commit
·
a1495e2
1
Parent(s):
8c98bf8
instantiate chain in single line
Browse files
app.py
CHANGED
@@ -88,8 +88,7 @@ def clear_chat_history():
|
|
88 |
st.button('Clear Chat', on_click=clear_chat_history)
|
89 |
|
90 |
# build our chain outside the working body so that its only instantiated once - simply pass it the chat history for chat completion
|
91 |
-
|
92 |
-
chain = chain_builder.build_chain()
|
93 |
|
94 |
def last_role_is_user():
|
95 |
return len(st.session_state["messages"]) > 0 and st.session_state["messages"][-1]["role"] == "user"
|
|
|
88 |
st.button('Clear Chat', on_click=clear_chat_history)
|
89 |
|
90 |
# build our chain outside the working body so that its only instantiated once - simply pass it the chat history for chat completion
|
91 |
+
chain = ChainBuilder().build_chain()
|
|
|
92 |
|
93 |
def last_role_is_user():
|
94 |
return len(st.session_state["messages"]) > 0 and st.session_state["messages"][-1]["role"] == "user"
|