Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -65,10 +65,11 @@ if st.button("Send") and user_input:
|
|
65 |
# β
Use a minimal prompt format (no system message)
|
66 |
formatted_messages = [{"role": "user", "content": user_input}]
|
67 |
|
68 |
-
# β
Speed improvements:
|
69 |
response_data = st.session_state["model"].create_chat_completion(
|
70 |
messages=formatted_messages,
|
71 |
-
max_tokens=
|
|
|
72 |
stream=False # β
No streaming for debugging
|
73 |
)
|
74 |
|
|
|
65 |
# β
Use a minimal prompt format (no system message)
|
66 |
formatted_messages = [{"role": "user", "content": user_input}]
|
67 |
|
68 |
+
# β
Speed improvements: Increase max_tokens for full responses & ensure proper stopping
|
69 |
response_data = st.session_state["model"].create_chat_completion(
|
70 |
messages=formatted_messages,
|
71 |
+
max_tokens=128, temperature=0.5, top_p=0.8,
|
72 |
+
stop=["\n", "<|endoftext|>"], # β
Ensures responses end properly
|
73 |
stream=False # β
No streaming for debugging
|
74 |
)
|
75 |
|