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.

Files changed (121) hide show
  1. webscout/AIutel.py +2 -1
  2. webscout/Bard.py +14 -11
  3. webscout/DWEBS.py +431 -415
  4. webscout/Extra/autocoder/__init__.py +9 -9
  5. webscout/Extra/autocoder/autocoder_utiles.py +332 -194
  6. webscout/Extra/autocoder/rawdog.py +68 -9
  7. webscout/Extra/gguf.py +682 -682
  8. webscout/Provider/AI21.py +1 -1
  9. webscout/Provider/AISEARCH/DeepFind.py +2 -2
  10. webscout/Provider/AISEARCH/ISou.py +2 -2
  11. webscout/Provider/AISEARCH/felo_search.py +6 -6
  12. webscout/Provider/AISEARCH/genspark_search.py +1 -1
  13. webscout/Provider/Aitopia.py +292 -0
  14. webscout/Provider/AllenAI.py +1 -1
  15. webscout/Provider/Andi.py +3 -3
  16. webscout/Provider/C4ai.py +1 -1
  17. webscout/Provider/ChatGPTES.py +3 -5
  18. webscout/Provider/ChatGPTGratis.py +4 -4
  19. webscout/Provider/Chatify.py +2 -2
  20. webscout/Provider/Cloudflare.py +3 -2
  21. webscout/Provider/DARKAI.py +3 -2
  22. webscout/Provider/DeepSeek.py +2 -2
  23. webscout/Provider/Deepinfra.py +1 -1
  24. webscout/Provider/EDITEE.py +1 -1
  25. webscout/Provider/ElectronHub.py +178 -96
  26. webscout/Provider/ExaChat.py +310 -0
  27. webscout/Provider/Free2GPT.py +2 -2
  28. webscout/Provider/Gemini.py +5 -19
  29. webscout/Provider/GithubChat.py +1 -1
  30. webscout/Provider/Glider.py +4 -4
  31. webscout/Provider/Groq.py +3 -3
  32. webscout/Provider/HF_space/qwen_qwen2.py +1 -1
  33. webscout/Provider/HeckAI.py +1 -1
  34. webscout/Provider/HuggingFaceChat.py +1 -1
  35. webscout/Provider/Hunyuan.py +1 -1
  36. webscout/Provider/Jadve.py +3 -3
  37. webscout/Provider/Koboldai.py +3 -3
  38. webscout/Provider/LambdaChat.py +1 -1
  39. webscout/Provider/Llama.py +3 -5
  40. webscout/Provider/Llama3.py +4 -12
  41. webscout/Provider/Marcus.py +3 -3
  42. webscout/Provider/OLLAMA.py +8 -8
  43. webscout/Provider/Openai.py +7 -3
  44. webscout/Provider/PI.py +1 -1
  45. webscout/Provider/Perplexitylabs.py +1 -1
  46. webscout/Provider/Phind.py +1 -1
  47. webscout/Provider/PizzaGPT.py +1 -1
  48. webscout/Provider/QwenLM.py +4 -7
  49. webscout/Provider/TTI/FreeAIPlayground/async_freeaiplayground.py +3 -1
  50. webscout/Provider/TTI/FreeAIPlayground/sync_freeaiplayground.py +3 -3
  51. webscout/Provider/TTI/ImgSys/__init__.py +23 -0
  52. webscout/Provider/TTI/ImgSys/async_imgsys.py +202 -0
  53. webscout/Provider/TTI/ImgSys/sync_imgsys.py +195 -0
  54. webscout/Provider/TTI/__init__.py +3 -1
  55. webscout/Provider/TTI/artbit/async_artbit.py +1 -1
  56. webscout/Provider/TTI/artbit/sync_artbit.py +1 -1
  57. webscout/Provider/TTI/huggingface/async_huggingface.py +1 -1
  58. webscout/Provider/TTI/huggingface/sync_huggingface.py +1 -1
  59. webscout/Provider/TTI/piclumen/__init__.py +22 -22
  60. webscout/Provider/TTI/piclumen/sync_piclumen.py +232 -232
  61. webscout/Provider/TTI/pixelmuse/__init__.py +4 -0
  62. webscout/Provider/TTI/pixelmuse/async_pixelmuse.py +249 -0
  63. webscout/Provider/TTI/pixelmuse/sync_pixelmuse.py +182 -0
  64. webscout/Provider/TTI/talkai/sync_talkai.py +1 -1
  65. webscout/Provider/TTS/utils.py +1 -1
  66. webscout/Provider/TeachAnything.py +1 -1
  67. webscout/Provider/TextPollinationsAI.py +4 -4
  68. webscout/Provider/TwoAI.py +1 -2
  69. webscout/Provider/Venice.py +4 -2
  70. webscout/Provider/VercelAI.py +234 -0
  71. webscout/Provider/WebSim.py +3 -2
  72. webscout/Provider/WiseCat.py +10 -12
  73. webscout/Provider/Youchat.py +1 -1
  74. webscout/Provider/__init__.py +10 -0
  75. webscout/Provider/ai4chat.py +1 -1
  76. webscout/Provider/aimathgpt.py +2 -6
  77. webscout/Provider/akashgpt.py +1 -1
  78. webscout/Provider/askmyai.py +4 -4
  79. webscout/Provider/asksteve.py +203 -0
  80. webscout/Provider/bagoodex.py +2 -2
  81. webscout/Provider/cerebras.py +1 -1
  82. webscout/Provider/chatglm.py +4 -4
  83. webscout/Provider/cleeai.py +1 -0
  84. webscout/Provider/copilot.py +427 -415
  85. webscout/Provider/elmo.py +1 -1
  86. webscout/Provider/flowith.py +1 -1
  87. webscout/Provider/freeaichat.py +57 -31
  88. webscout/Provider/gaurish.py +3 -5
  89. webscout/Provider/geminiprorealtime.py +1 -1
  90. webscout/Provider/granite.py +4 -4
  91. webscout/Provider/hermes.py +5 -5
  92. webscout/Provider/julius.py +1 -1
  93. webscout/Provider/koala.py +1 -1
  94. webscout/Provider/lepton.py +1 -1
  95. webscout/Provider/llama3mitril.py +4 -4
  96. webscout/Provider/llamatutor.py +1 -1
  97. webscout/Provider/llmchat.py +3 -3
  98. webscout/Provider/meta.py +1 -1
  99. webscout/Provider/multichat.py +10 -10
  100. webscout/Provider/promptrefine.py +1 -1
  101. webscout/Provider/searchchat.py +293 -0
  102. webscout/Provider/sonus.py +2 -2
  103. webscout/Provider/talkai.py +2 -2
  104. webscout/Provider/turboseek.py +1 -1
  105. webscout/Provider/tutorai.py +1 -1
  106. webscout/Provider/typegpt.py +5 -42
  107. webscout/Provider/uncovr.py +4 -2
  108. webscout/Provider/x0gpt.py +1 -1
  109. webscout/__init__.py +36 -36
  110. webscout/cli.py +293 -332
  111. webscout/tempid.py +11 -11
  112. webscout/utils.py +2 -2
  113. webscout/version.py +1 -1
  114. webscout/webscout_search.py +1282 -1223
  115. webscout/webscout_search_async.py +813 -692
  116. {webscout-7.7.dist-info → webscout-7.8.dist-info}/METADATA +50 -29
  117. {webscout-7.7.dist-info → webscout-7.8.dist-info}/RECORD +121 -110
  118. {webscout-7.7.dist-info → webscout-7.8.dist-info}/LICENSE.md +0 -0
  119. {webscout-7.7.dist-info → webscout-7.8.dist-info}/WHEEL +0 -0
  120. {webscout-7.7.dist-info → webscout-7.8.dist-info}/entry_points.txt +0 -0
  121. {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 fix the specific error
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
- code_blocks = self._extract_code_blocks(response)
500
- if not code_blocks:
511
+ if not response:
501
512
  return ""
502
-
503
- # Return the content of the first code block, regardless of type
504
- return code_blocks[0][1]
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. Provide only the corrected code without any explanation.
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]: