Spaces:
Sleeping
Sleeping
gpt4o debug
Browse files- app.py +3 -2
- llm_reasoner.py +1 -1
app.py
CHANGED
@@ -116,6 +116,7 @@ if st.button("Change Selection", key="change_selection_btn"):
|
|
116 |
st.session_state.pop("selected_models", None)
|
117 |
st.session_state.pop("retriever", None)
|
118 |
st.session_state.pop("reasoner", None)
|
|
|
119 |
st.rerun()
|
120 |
|
121 |
# Initialize chat history
|
@@ -226,9 +227,9 @@ if prompt := st.chat_input("Type here"):
|
|
226 |
message_placeholder = st.empty()
|
227 |
full_response = ""
|
228 |
if decision.lower() == 'support':
|
229 |
-
assistant_response = f'The claim is
|
230 |
elif decision.lower() == 'contradict':
|
231 |
-
assistant_response = f'The claim is
|
232 |
|
233 |
# Simulate stream of response with milliseconds delay
|
234 |
for chunk in assistant_response.split():
|
|
|
116 |
st.session_state.pop("selected_models", None)
|
117 |
st.session_state.pop("retriever", None)
|
118 |
st.session_state.pop("reasoner", None)
|
119 |
+
st.session_state.messages = [{"role": "assistant", "content": "Let's start verifying the claims here! 👇"}]
|
120 |
st.rerun()
|
121 |
|
122 |
# Initialize chat history
|
|
|
227 |
message_placeholder = st.empty()
|
228 |
full_response = ""
|
229 |
if decision.lower() == 'support':
|
230 |
+
assistant_response = f'The claim is CORRECT because {reasoning}'
|
231 |
elif decision.lower() == 'contradict':
|
232 |
+
assistant_response = f'The claim is INCORRECT because {reasoning}'
|
233 |
|
234 |
# Simulate stream of response with milliseconds delay
|
235 |
for chunk in assistant_response.split():
|
llm_reasoner.py
CHANGED
@@ -34,7 +34,7 @@ class LLMReasoner():
|
|
34 |
model=self.model_name,
|
35 |
messages=prompt,
|
36 |
temperature=self.temp,
|
37 |
-
|
38 |
top_p=self.top_p,
|
39 |
frequency_penalty=self.frequency_penalty,
|
40 |
presence_penalty=self.presence_penalty
|
|
|
34 |
model=self.model_name,
|
35 |
messages=prompt,
|
36 |
temperature=self.temp,
|
37 |
+
max_completion_tokens=self.max_tokens,
|
38 |
top_p=self.top_p,
|
39 |
frequency_penalty=self.frequency_penalty,
|
40 |
presence_penalty=self.presence_penalty
|