Spaces:
Sleeping
Sleeping
Fix indentation error in else block
Browse files- src/streamlit_app.py +10 -10
src/streamlit_app.py
CHANGED
|
@@ -288,15 +288,15 @@ if st.session_state.current_voice:
|
|
| 288 |
]
|
| 289 |
)
|
| 290 |
else:
|
| 291 |
-
|
| 292 |
-
|
| 293 |
-
|
| 294 |
-
|
| 295 |
-
|
| 296 |
-
|
| 297 |
-
|
| 298 |
-
|
| 299 |
-
|
| 300 |
|
| 301 |
ai_response = message.content[0].text
|
| 302 |
st.markdown(ai_response)
|
|
@@ -344,7 +344,7 @@ if st.session_state.current_voice:
|
|
| 344 |
if st.session_state.in_reflection:
|
| 345 |
if st.button("Start New Conversation", use_container_width=True):
|
| 346 |
st.session_state.in_reflection = False
|
| 347 |
-
|
| 348 |
st.session_state.somatic_journal = []
|
| 349 |
st.session_state.current_voice = None
|
| 350 |
st.rerun()
|
|
|
|
| 288 |
]
|
| 289 |
)
|
| 290 |
else:
|
| 291 |
+
message = c.messages.create(
|
| 292 |
+
model="claude-3-opus-20240229",
|
| 293 |
+
max_tokens=1000,
|
| 294 |
+
system=st.session_state.system_message,
|
| 295 |
+
messages=[
|
| 296 |
+
{"role": msg["role"], "content": msg["content"]}
|
| 297 |
+
for msg in st.session_state.messages
|
| 298 |
+
]
|
| 299 |
+
)
|
| 300 |
|
| 301 |
ai_response = message.content[0].text
|
| 302 |
st.markdown(ai_response)
|
|
|
|
| 344 |
if st.session_state.in_reflection:
|
| 345 |
if st.button("Start New Conversation", use_container_width=True):
|
| 346 |
st.session_state.in_reflection = False
|
| 347 |
+
st.session_state.messages = []
|
| 348 |
st.session_state.somatic_journal = []
|
| 349 |
st.session_state.current_voice = None
|
| 350 |
st.rerun()
|