webscout 7.7__py3-none-any.whl → 7.8__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of webscout might be problematic. Click here for more details.
- webscout/AIutel.py +2 -1
- webscout/Bard.py +14 -11
- webscout/DWEBS.py +431 -415
- webscout/Extra/autocoder/__init__.py +9 -9
- webscout/Extra/autocoder/autocoder_utiles.py +332 -194
- webscout/Extra/autocoder/rawdog.py +68 -9
- webscout/Extra/gguf.py +682 -682
- webscout/Provider/AI21.py +1 -1
- webscout/Provider/AISEARCH/DeepFind.py +2 -2
- webscout/Provider/AISEARCH/ISou.py +2 -2
- webscout/Provider/AISEARCH/felo_search.py +6 -6
- webscout/Provider/AISEARCH/genspark_search.py +1 -1
- webscout/Provider/Aitopia.py +292 -0
- webscout/Provider/AllenAI.py +1 -1
- webscout/Provider/Andi.py +3 -3
- webscout/Provider/C4ai.py +1 -1
- webscout/Provider/ChatGPTES.py +3 -5
- webscout/Provider/ChatGPTGratis.py +4 -4
- webscout/Provider/Chatify.py +2 -2
- webscout/Provider/Cloudflare.py +3 -2
- webscout/Provider/DARKAI.py +3 -2
- webscout/Provider/DeepSeek.py +2 -2
- webscout/Provider/Deepinfra.py +1 -1
- webscout/Provider/EDITEE.py +1 -1
- webscout/Provider/ElectronHub.py +178 -96
- webscout/Provider/ExaChat.py +310 -0
- webscout/Provider/Free2GPT.py +2 -2
- webscout/Provider/Gemini.py +5 -19
- webscout/Provider/GithubChat.py +1 -1
- webscout/Provider/Glider.py +4 -4
- webscout/Provider/Groq.py +3 -3
- webscout/Provider/HF_space/qwen_qwen2.py +1 -1
- webscout/Provider/HeckAI.py +1 -1
- webscout/Provider/HuggingFaceChat.py +1 -1
- webscout/Provider/Hunyuan.py +1 -1
- webscout/Provider/Jadve.py +3 -3
- webscout/Provider/Koboldai.py +3 -3
- webscout/Provider/LambdaChat.py +1 -1
- webscout/Provider/Llama.py +3 -5
- webscout/Provider/Llama3.py +4 -12
- webscout/Provider/Marcus.py +3 -3
- webscout/Provider/OLLAMA.py +8 -8
- webscout/Provider/Openai.py +7 -3
- webscout/Provider/PI.py +1 -1
- webscout/Provider/Perplexitylabs.py +1 -1
- webscout/Provider/Phind.py +1 -1
- webscout/Provider/PizzaGPT.py +1 -1
- webscout/Provider/QwenLM.py +4 -7
- webscout/Provider/TTI/FreeAIPlayground/async_freeaiplayground.py +3 -1
- webscout/Provider/TTI/FreeAIPlayground/sync_freeaiplayground.py +3 -3
- webscout/Provider/TTI/ImgSys/__init__.py +23 -0
- webscout/Provider/TTI/ImgSys/async_imgsys.py +202 -0
- webscout/Provider/TTI/ImgSys/sync_imgsys.py +195 -0
- webscout/Provider/TTI/__init__.py +3 -1
- webscout/Provider/TTI/artbit/async_artbit.py +1 -1
- webscout/Provider/TTI/artbit/sync_artbit.py +1 -1
- webscout/Provider/TTI/huggingface/async_huggingface.py +1 -1
- webscout/Provider/TTI/huggingface/sync_huggingface.py +1 -1
- webscout/Provider/TTI/piclumen/__init__.py +22 -22
- webscout/Provider/TTI/piclumen/sync_piclumen.py +232 -232
- webscout/Provider/TTI/pixelmuse/__init__.py +4 -0
- webscout/Provider/TTI/pixelmuse/async_pixelmuse.py +249 -0
- webscout/Provider/TTI/pixelmuse/sync_pixelmuse.py +182 -0
- webscout/Provider/TTI/talkai/sync_talkai.py +1 -1
- webscout/Provider/TTS/utils.py +1 -1
- webscout/Provider/TeachAnything.py +1 -1
- webscout/Provider/TextPollinationsAI.py +4 -4
- webscout/Provider/TwoAI.py +1 -2
- webscout/Provider/Venice.py +4 -2
- webscout/Provider/VercelAI.py +234 -0
- webscout/Provider/WebSim.py +3 -2
- webscout/Provider/WiseCat.py +10 -12
- webscout/Provider/Youchat.py +1 -1
- webscout/Provider/__init__.py +10 -0
- webscout/Provider/ai4chat.py +1 -1
- webscout/Provider/aimathgpt.py +2 -6
- webscout/Provider/akashgpt.py +1 -1
- webscout/Provider/askmyai.py +4 -4
- webscout/Provider/asksteve.py +203 -0
- webscout/Provider/bagoodex.py +2 -2
- webscout/Provider/cerebras.py +1 -1
- webscout/Provider/chatglm.py +4 -4
- webscout/Provider/cleeai.py +1 -0
- webscout/Provider/copilot.py +427 -415
- webscout/Provider/elmo.py +1 -1
- webscout/Provider/flowith.py +1 -1
- webscout/Provider/freeaichat.py +57 -31
- webscout/Provider/gaurish.py +3 -5
- webscout/Provider/geminiprorealtime.py +1 -1
- webscout/Provider/granite.py +4 -4
- webscout/Provider/hermes.py +5 -5
- webscout/Provider/julius.py +1 -1
- webscout/Provider/koala.py +1 -1
- webscout/Provider/lepton.py +1 -1
- webscout/Provider/llama3mitril.py +4 -4
- webscout/Provider/llamatutor.py +1 -1
- webscout/Provider/llmchat.py +3 -3
- webscout/Provider/meta.py +1 -1
- webscout/Provider/multichat.py +10 -10
- webscout/Provider/promptrefine.py +1 -1
- webscout/Provider/searchchat.py +293 -0
- webscout/Provider/sonus.py +2 -2
- webscout/Provider/talkai.py +2 -2
- webscout/Provider/turboseek.py +1 -1
- webscout/Provider/tutorai.py +1 -1
- webscout/Provider/typegpt.py +5 -42
- webscout/Provider/uncovr.py +4 -2
- webscout/Provider/x0gpt.py +1 -1
- webscout/__init__.py +36 -36
- webscout/cli.py +293 -332
- webscout/tempid.py +11 -11
- webscout/utils.py +2 -2
- webscout/version.py +1 -1
- webscout/webscout_search.py +1282 -1223
- webscout/webscout_search_async.py +813 -692
- {webscout-7.7.dist-info → webscout-7.8.dist-info}/METADATA +50 -29
- {webscout-7.7.dist-info → webscout-7.8.dist-info}/RECORD +121 -110
- {webscout-7.7.dist-info → webscout-7.8.dist-info}/LICENSE.md +0 -0
- {webscout-7.7.dist-info → webscout-7.8.dist-info}/WHEEL +0 -0
- {webscout-7.7.dist-info → webscout-7.8.dist-info}/entry_points.txt +0 -0
- {webscout-7.7.dist-info → webscout-7.8.dist-info}/top_level.txt +0 -0
|
@@ -390,9 +390,17 @@ class AutoCoder:
|
|
|
390
390
|
except Exception as e:
|
|
391
391
|
last_error = e
|
|
392
392
|
if retries < self.max_retries - 1 and ai_instance:
|
|
393
|
-
error_context = self._get_error_context(e, code)
|
|
394
393
|
try:
|
|
395
|
-
# First try to
|
|
394
|
+
# First try to handle import errors
|
|
395
|
+
if isinstance(e, ImportError):
|
|
396
|
+
fixed_code = self._handle_import_error(e, code)
|
|
397
|
+
if fixed_code:
|
|
398
|
+
code = fixed_code
|
|
399
|
+
retries += 1
|
|
400
|
+
continue
|
|
401
|
+
|
|
402
|
+
# Get error context and try to fix the specific error
|
|
403
|
+
error_context = self._get_error_context(e, code)
|
|
396
404
|
fixed_response = ai_instance.chat(error_context)
|
|
397
405
|
fixed_code = self._extract_code_from_response(fixed_response)
|
|
398
406
|
|
|
@@ -411,6 +419,7 @@ Please provide a complete, corrected version of the code that handles this error
|
|
|
411
419
|
2. Include proper error handling
|
|
412
420
|
3. Use appropriate libraries and imports
|
|
413
421
|
4. Be compatible with the current Python environment
|
|
422
|
+
5. Fix the specific error: {str(e)}
|
|
414
423
|
|
|
415
424
|
Provide only the corrected code without any explanation.
|
|
416
425
|
"""
|
|
@@ -435,6 +444,7 @@ Please provide a significantly different approach to solve this problem. Conside
|
|
|
435
444
|
2. Implementing a different algorithm
|
|
436
445
|
3. Adding more robust error handling
|
|
437
446
|
4. Using a different encoding or data handling approach
|
|
447
|
+
5. Specifically address the error: {str(e)}
|
|
438
448
|
|
|
439
449
|
Provide only the corrected code without any explanation.
|
|
440
450
|
"""
|
|
@@ -444,10 +454,12 @@ Provide only the corrected code without any explanation.
|
|
|
444
454
|
if self._is_similar_solution(fixed_code):
|
|
445
455
|
break
|
|
446
456
|
|
|
457
|
+
# Update code and continue with retry
|
|
447
458
|
code = fixed_code
|
|
448
459
|
self.tried_solutions.add(code)
|
|
449
460
|
retries += 1
|
|
450
461
|
continue
|
|
462
|
+
|
|
451
463
|
except Exception as ai_error:
|
|
452
464
|
console.print(f"Error during AI correction: {str(ai_error)}", style="error")
|
|
453
465
|
break
|
|
@@ -496,12 +508,37 @@ Provide only the corrected code without any explanation.
|
|
|
496
508
|
Returns:
|
|
497
509
|
str: Extracted code from the first code block
|
|
498
510
|
"""
|
|
499
|
-
|
|
500
|
-
if not code_blocks:
|
|
511
|
+
if not response:
|
|
501
512
|
return ""
|
|
502
|
-
|
|
503
|
-
#
|
|
504
|
-
|
|
513
|
+
|
|
514
|
+
# First try to find code blocks with explicit language tags
|
|
515
|
+
code_blocks = self._extract_code_blocks(response)
|
|
516
|
+
if code_blocks:
|
|
517
|
+
# Return the content of the first code block
|
|
518
|
+
return code_blocks[0][1]
|
|
519
|
+
|
|
520
|
+
# If no code blocks found, try to find raw Python code
|
|
521
|
+
lines = []
|
|
522
|
+
in_code = False
|
|
523
|
+
for line in response.split('\n'):
|
|
524
|
+
line = line.strip()
|
|
525
|
+
if not line:
|
|
526
|
+
continue
|
|
527
|
+
|
|
528
|
+
# Skip markdown headers and other non-code lines
|
|
529
|
+
if line.startswith(('#', '```', '---', '===', '>>>')):
|
|
530
|
+
continue
|
|
531
|
+
|
|
532
|
+
# Skip common non-code lines
|
|
533
|
+
if any(line.startswith(prefix) for prefix in ['Please', 'Here', 'The', 'This', 'You']):
|
|
534
|
+
continue
|
|
535
|
+
|
|
536
|
+
lines.append(line)
|
|
537
|
+
|
|
538
|
+
if lines:
|
|
539
|
+
return '\n'.join(lines)
|
|
540
|
+
|
|
541
|
+
return ""
|
|
505
542
|
|
|
506
543
|
def _get_error_context(self, error: Exception, code: str) -> str:
|
|
507
544
|
"""Create context about the error for AI correction.
|
|
@@ -516,17 +553,39 @@ Provide only the corrected code without any explanation.
|
|
|
516
553
|
error_type = type(error).__name__
|
|
517
554
|
error_msg = str(error)
|
|
518
555
|
|
|
556
|
+
# Get Python version and environment info
|
|
557
|
+
python_version = f"{sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}"
|
|
558
|
+
platform = sys.platform
|
|
559
|
+
|
|
560
|
+
# Get the line number where the error occurred if available
|
|
561
|
+
import traceback
|
|
562
|
+
tb = traceback.extract_tb(error.__traceback__)
|
|
563
|
+
line_info = ""
|
|
564
|
+
if tb:
|
|
565
|
+
line_info = f"\nError occurred at line {tb[-1].lineno}"
|
|
566
|
+
|
|
519
567
|
return f"""
|
|
520
568
|
The code failed with error:
|
|
521
569
|
Error Type: {error_type}
|
|
522
|
-
Error Message: {error_msg}
|
|
570
|
+
Error Message: {error_msg}{line_info}
|
|
571
|
+
|
|
572
|
+
Environment:
|
|
573
|
+
Python Version: {python_version}
|
|
574
|
+
Platform: {platform}
|
|
523
575
|
|
|
524
576
|
Original Code:
|
|
525
577
|
```python
|
|
526
578
|
{code}
|
|
527
579
|
```
|
|
528
580
|
|
|
529
|
-
Please fix the code to handle this error.
|
|
581
|
+
Please fix the code to handle this error. The solution should:
|
|
582
|
+
1. Address the specific error: {error_msg}
|
|
583
|
+
2. Be compatible with Python {python_version}
|
|
584
|
+
3. Work on {platform}
|
|
585
|
+
4. Include proper error handling
|
|
586
|
+
5. Use appropriate libraries and imports
|
|
587
|
+
|
|
588
|
+
Provide only the corrected code without any explanation.
|
|
530
589
|
"""
|
|
531
590
|
|
|
532
591
|
def _handle_import_error(self, error: ImportError, code: str) -> Optional[str]:
|