Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -36,11 +36,18 @@ with st.sidebar:
|
|
| 36 |
json={"messages": [{"role": "user", "content": "ping"}], "stream": False},
|
| 37 |
timeout=60,
|
| 38 |
)
|
|
|
|
|
|
|
|
|
|
| 39 |
r.raise_for_status()
|
| 40 |
st.success(f"HTTP {r.status_code} 路 {r.headers.get('Content-Type','')}")
|
| 41 |
except Exception as e:
|
| 42 |
st.error(str(e))
|
| 43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
st.markdown("---")
|
| 45 |
if st.button("Clear chat", key="clear_chat_btn"):
|
| 46 |
st.session_state.messages = []
|
|
|
|
| 36 |
json={"messages": [{"role": "user", "content": "ping"}], "stream": False},
|
| 37 |
timeout=60,
|
| 38 |
)
|
| 39 |
+
print("=== RAW BODY START ===")
|
| 40 |
+
print(r.text[:2000]) # first 2000 chars
|
| 41 |
+
print("=== RAW BODY END ===")
|
| 42 |
r.raise_for_status()
|
| 43 |
st.success(f"HTTP {r.status_code} 路 {r.headers.get('Content-Type','')}")
|
| 44 |
except Exception as e:
|
| 45 |
st.error(str(e))
|
| 46 |
|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
|
| 51 |
st.markdown("---")
|
| 52 |
if st.button("Clear chat", key="clear_chat_btn"):
|
| 53 |
st.session_state.messages = []
|