Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -256,8 +256,7 @@ Provide a brief, focused analysis:"""
|
|
256 |
response = self.client.chat_completion(
|
257 |
messages=messages,
|
258 |
max_tokens=500,
|
259 |
-
temperature=0.3
|
260 |
-
chat_template_kwargs = {"enable_thinking": False}
|
261 |
)
|
262 |
|
263 |
return response.choices[0].message.content.strip()
|
@@ -375,8 +374,7 @@ class IntelligentAgent:
|
|
375 |
max_tokens=max_tokens,
|
376 |
temperature=temperature
|
377 |
)
|
378 |
-
|
379 |
-
return response.choices[0].message.content.strip()
|
380 |
except Exception as chat_error:
|
381 |
if self.debug:
|
382 |
print(f"Chat completion failed: {chat_error}, trying text generation...")
|
@@ -388,7 +386,7 @@ class IntelligentAgent:
|
|
388 |
temperature=temperature,
|
389 |
do_sample=temperature > 0
|
390 |
)
|
391 |
-
response = remove_thinking_tags(response)
|
392 |
return response.strip()
|
393 |
|
394 |
except Exception as e:
|
|
|
256 |
response = self.client.chat_completion(
|
257 |
messages=messages,
|
258 |
max_tokens=500,
|
259 |
+
temperature=0.3
|
|
|
260 |
)
|
261 |
|
262 |
return response.choices[0].message.content.strip()
|
|
|
374 |
max_tokens=max_tokens,
|
375 |
temperature=temperature
|
376 |
)
|
377 |
+
return remove_thinking_tags(response.choices[0].message.content.strip())
|
|
|
378 |
except Exception as chat_error:
|
379 |
if self.debug:
|
380 |
print(f"Chat completion failed: {chat_error}, trying text generation...")
|
|
|
386 |
temperature=temperature,
|
387 |
do_sample=temperature > 0
|
388 |
)
|
389 |
+
response = remove_thinking_tags(response.strip)
|
390 |
return response.strip()
|
391 |
|
392 |
except Exception as e:
|