Spaces:
Running
Running
nacho commited on
Commit ·
a74d5c4
1
Parent(s): 63773f7
fix: 支持点击“专家模式”或“DeepThink”等新版按钮开启深思
Browse files- deepseek_browser.py +5 -1
deepseek_browser.py
CHANGED
|
@@ -287,7 +287,11 @@ class DeepSeekBrowser:
|
|
| 287 |
async def switch_model(self, model: str):
|
| 288 |
try:
|
| 289 |
if 'reasoner' in model or 'thinking' in model or 'pro' in model:
|
| 290 |
-
thinking_btn = self.page.locator(
|
|
|
|
|
|
|
|
|
|
|
|
|
| 291 |
if await thinking_btn.count() > 0:
|
| 292 |
await thinking_btn.click()
|
| 293 |
await asyncio.sleep(0.5)
|
|
|
|
| 287 |
async def switch_model(self, model: str):
|
| 288 |
try:
|
| 289 |
if 'reasoner' in model or 'thinking' in model or 'pro' in model:
|
| 290 |
+
thinking_btn = self.page.locator(
|
| 291 |
+
'button:has-text("深度思考"), div:has-text("深度思考"), '
|
| 292 |
+
'button:has-text("专家模式"), div:has-text("专家模式"), '
|
| 293 |
+
'button:has-text("DeepThink"), button:has-text("R1")'
|
| 294 |
+
).first
|
| 295 |
if await thinking_btn.count() > 0:
|
| 296 |
await thinking_btn.click()
|
| 297 |
await asyncio.sleep(0.5)
|