webscout 8.2.5__tar.gz → 8.2.6__tar.gz

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 (321) hide show
  1. {webscout-8.2.5/webscout.egg-info → webscout-8.2.6}/PKG-INFO +1 -1
  2. webscout-8.2.6/webscout/AIauto.py +233 -0
  3. webscout-8.2.6/webscout/AIutel.py +240 -0
  4. {webscout-8.2.5 → webscout-8.2.6}/webscout/Extra/autocoder/autocoder.py +66 -5
  5. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/AISEARCH/scira_search.py +2 -1
  6. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/GizAI.py +6 -4
  7. webscout-8.2.6/webscout/Provider/Nemotron.py +218 -0
  8. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/OPENAI/scirachat.py +2 -1
  9. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/TeachAnything.py +8 -5
  10. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/WiseCat.py +1 -1
  11. webscout-8.2.6/webscout/Provider/WrDoChat.py +370 -0
  12. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/__init__.py +4 -6
  13. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/ai4chat.py +5 -3
  14. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/akashgpt.py +59 -66
  15. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/freeaichat.py +57 -43
  16. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/scira_chat.py +2 -1
  17. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/scnet.py +4 -1
  18. {webscout-8.2.5 → webscout-8.2.6}/webscout/__init__.py +0 -1
  19. webscout-8.2.6/webscout/conversation.py +436 -0
  20. webscout-8.2.6/webscout/swiftcli/__init__.py +95 -0
  21. webscout-8.2.6/webscout/swiftcli/core/__init__.py +7 -0
  22. webscout-8.2.6/webscout/swiftcli/core/cli.py +297 -0
  23. webscout-8.2.6/webscout/swiftcli/core/context.py +104 -0
  24. webscout-8.2.6/webscout/swiftcli/core/group.py +241 -0
  25. webscout-8.2.6/webscout/swiftcli/decorators/__init__.py +28 -0
  26. webscout-8.2.6/webscout/swiftcli/decorators/command.py +221 -0
  27. webscout-8.2.6/webscout/swiftcli/decorators/options.py +220 -0
  28. webscout-8.2.6/webscout/swiftcli/decorators/output.py +252 -0
  29. webscout-8.2.6/webscout/swiftcli/exceptions.py +21 -0
  30. webscout-8.2.6/webscout/swiftcli/plugins/__init__.py +9 -0
  31. webscout-8.2.6/webscout/swiftcli/plugins/base.py +135 -0
  32. webscout-8.2.6/webscout/swiftcli/plugins/manager.py +262 -0
  33. webscout-8.2.6/webscout/swiftcli/utils/__init__.py +59 -0
  34. webscout-8.2.6/webscout/swiftcli/utils/formatting.py +252 -0
  35. webscout-8.2.6/webscout/swiftcli/utils/parsing.py +267 -0
  36. webscout-8.2.6/webscout/version.py +2 -0
  37. {webscout-8.2.5 → webscout-8.2.6/webscout.egg-info}/PKG-INFO +1 -1
  38. {webscout-8.2.5 → webscout-8.2.6}/webscout.egg-info/SOURCES.txt +17 -4
  39. webscout-8.2.5/webscout/AIauto.py +0 -143
  40. webscout-8.2.5/webscout/AIutel.py +0 -344
  41. webscout-8.2.5/webscout/LLM.py +0 -442
  42. webscout-8.2.5/webscout/Provider/PizzaGPT.py +0 -228
  43. webscout-8.2.5/webscout/Provider/promptrefine.py +0 -193
  44. webscout-8.2.5/webscout/Provider/tutorai.py +0 -270
  45. webscout-8.2.5/webscout/conversation.py +0 -577
  46. webscout-8.2.5/webscout/swiftcli/__init__.py +0 -809
  47. webscout-8.2.5/webscout/version.py +0 -2
  48. {webscout-8.2.5 → webscout-8.2.6}/LICENSE.md +0 -0
  49. {webscout-8.2.5 → webscout-8.2.6}/README.md +0 -0
  50. {webscout-8.2.5 → webscout-8.2.6}/setup.cfg +0 -0
  51. {webscout-8.2.5 → webscout-8.2.6}/setup.py +0 -0
  52. {webscout-8.2.5 → webscout-8.2.6}/webscout/AIbase.py +0 -0
  53. {webscout-8.2.5 → webscout-8.2.6}/webscout/Bard.py +0 -0
  54. {webscout-8.2.5 → webscout-8.2.6}/webscout/DWEBS.py +0 -0
  55. {webscout-8.2.5 → webscout-8.2.6}/webscout/Extra/GitToolkit/__init__.py +0 -0
  56. {webscout-8.2.5 → webscout-8.2.6}/webscout/Extra/GitToolkit/gitapi/__init__.py +0 -0
  57. {webscout-8.2.5 → webscout-8.2.6}/webscout/Extra/GitToolkit/gitapi/repository.py +0 -0
  58. {webscout-8.2.5 → webscout-8.2.6}/webscout/Extra/GitToolkit/gitapi/user.py +0 -0
  59. {webscout-8.2.5 → webscout-8.2.6}/webscout/Extra/GitToolkit/gitapi/utils.py +0 -0
  60. {webscout-8.2.5 → webscout-8.2.6}/webscout/Extra/YTToolkit/YTdownloader.py +0 -0
  61. {webscout-8.2.5 → webscout-8.2.6}/webscout/Extra/YTToolkit/__init__.py +0 -0
  62. {webscout-8.2.5 → webscout-8.2.6}/webscout/Extra/YTToolkit/transcriber.py +0 -0
  63. {webscout-8.2.5 → webscout-8.2.6}/webscout/Extra/YTToolkit/ytapi/__init__.py +0 -0
  64. {webscout-8.2.5 → webscout-8.2.6}/webscout/Extra/YTToolkit/ytapi/channel.py +0 -0
  65. {webscout-8.2.5 → webscout-8.2.6}/webscout/Extra/YTToolkit/ytapi/errors.py +0 -0
  66. {webscout-8.2.5 → webscout-8.2.6}/webscout/Extra/YTToolkit/ytapi/extras.py +0 -0
  67. {webscout-8.2.5 → webscout-8.2.6}/webscout/Extra/YTToolkit/ytapi/https.py +0 -0
  68. {webscout-8.2.5 → webscout-8.2.6}/webscout/Extra/YTToolkit/ytapi/patterns.py +0 -0
  69. {webscout-8.2.5 → webscout-8.2.6}/webscout/Extra/YTToolkit/ytapi/playlist.py +0 -0
  70. {webscout-8.2.5 → webscout-8.2.6}/webscout/Extra/YTToolkit/ytapi/pool.py +0 -0
  71. {webscout-8.2.5 → webscout-8.2.6}/webscout/Extra/YTToolkit/ytapi/query.py +0 -0
  72. {webscout-8.2.5 → webscout-8.2.6}/webscout/Extra/YTToolkit/ytapi/stream.py +0 -0
  73. {webscout-8.2.5 → webscout-8.2.6}/webscout/Extra/YTToolkit/ytapi/utils.py +0 -0
  74. {webscout-8.2.5 → webscout-8.2.6}/webscout/Extra/YTToolkit/ytapi/video.py +0 -0
  75. {webscout-8.2.5 → webscout-8.2.6}/webscout/Extra/__init__.py +0 -0
  76. {webscout-8.2.5 → webscout-8.2.6}/webscout/Extra/autocoder/__init__.py +0 -0
  77. {webscout-8.2.5 → webscout-8.2.6}/webscout/Extra/autocoder/autocoder_utiles.py +0 -0
  78. {webscout-8.2.5 → webscout-8.2.6}/webscout/Extra/gguf.py +0 -0
  79. {webscout-8.2.5 → webscout-8.2.6}/webscout/Extra/tempmail/__init__.py +0 -0
  80. {webscout-8.2.5 → webscout-8.2.6}/webscout/Extra/tempmail/async_utils.py +0 -0
  81. {webscout-8.2.5 → webscout-8.2.6}/webscout/Extra/tempmail/base.py +0 -0
  82. {webscout-8.2.5 → webscout-8.2.6}/webscout/Extra/tempmail/cli.py +0 -0
  83. {webscout-8.2.5 → webscout-8.2.6}/webscout/Extra/tempmail/emailnator.py +0 -0
  84. {webscout-8.2.5 → webscout-8.2.6}/webscout/Extra/tempmail/mail_tm.py +0 -0
  85. {webscout-8.2.5 → webscout-8.2.6}/webscout/Extra/tempmail/temp_mail_io.py +0 -0
  86. {webscout-8.2.5 → webscout-8.2.6}/webscout/Extra/weather.py +0 -0
  87. {webscout-8.2.5 → webscout-8.2.6}/webscout/Extra/weather_ascii.py +0 -0
  88. {webscout-8.2.5 → webscout-8.2.6}/webscout/Litlogger/__init__.py +0 -0
  89. {webscout-8.2.5 → webscout-8.2.6}/webscout/Litlogger/core/__init__.py +0 -0
  90. {webscout-8.2.5 → webscout-8.2.6}/webscout/Litlogger/core/level.py +0 -0
  91. {webscout-8.2.5 → webscout-8.2.6}/webscout/Litlogger/core/logger.py +0 -0
  92. {webscout-8.2.5 → webscout-8.2.6}/webscout/Litlogger/handlers/__init__.py +0 -0
  93. {webscout-8.2.5 → webscout-8.2.6}/webscout/Litlogger/handlers/console.py +0 -0
  94. {webscout-8.2.5 → webscout-8.2.6}/webscout/Litlogger/handlers/file.py +0 -0
  95. {webscout-8.2.5 → webscout-8.2.6}/webscout/Litlogger/handlers/network.py +0 -0
  96. {webscout-8.2.5 → webscout-8.2.6}/webscout/Litlogger/styles/__init__.py +0 -0
  97. {webscout-8.2.5 → webscout-8.2.6}/webscout/Litlogger/styles/colors.py +0 -0
  98. {webscout-8.2.5 → webscout-8.2.6}/webscout/Litlogger/styles/formats.py +0 -0
  99. {webscout-8.2.5 → webscout-8.2.6}/webscout/Litlogger/styles/text.py +0 -0
  100. {webscout-8.2.5 → webscout-8.2.6}/webscout/Litlogger/utils/__init__.py +0 -0
  101. {webscout-8.2.5 → webscout-8.2.6}/webscout/Litlogger/utils/detectors.py +0 -0
  102. {webscout-8.2.5 → webscout-8.2.6}/webscout/Litlogger/utils/formatters.py +0 -0
  103. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/AI21.py +0 -0
  104. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/AISEARCH/DeepFind.py +0 -0
  105. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/AISEARCH/ISou.py +0 -0
  106. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/AISEARCH/Perplexity.py +0 -0
  107. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/AISEARCH/__init__.py +0 -0
  108. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/AISEARCH/felo_search.py +0 -0
  109. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/AISEARCH/genspark_search.py +0 -0
  110. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/AISEARCH/hika_search.py +0 -0
  111. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/AISEARCH/iask_search.py +0 -0
  112. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/AISEARCH/monica_search.py +0 -0
  113. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/AISEARCH/webpilotai_search.py +0 -0
  114. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/Aitopia.py +0 -0
  115. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/AllenAI.py +0 -0
  116. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/Andi.py +0 -0
  117. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/Blackboxai.py +0 -0
  118. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/ChatGPTClone.py +0 -0
  119. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/ChatGPTGratis.py +0 -0
  120. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/ChatSandbox.py +0 -0
  121. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/Cloudflare.py +0 -0
  122. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/Cohere.py +0 -0
  123. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/Deepinfra.py +0 -0
  124. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/ElectronHub.py +0 -0
  125. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/ExaAI.py +0 -0
  126. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/ExaChat.py +0 -0
  127. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/Free2GPT.py +0 -0
  128. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/GPTWeb.py +0 -0
  129. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/Gemini.py +0 -0
  130. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/GithubChat.py +0 -0
  131. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/Glider.py +0 -0
  132. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/Groq.py +0 -0
  133. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/HF_space/__init__.py +0 -0
  134. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/HF_space/qwen_qwen2.py +0 -0
  135. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/HeckAI.py +0 -0
  136. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/HuggingFaceChat.py +0 -0
  137. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/Hunyuan.py +0 -0
  138. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/Jadve.py +0 -0
  139. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/Koboldai.py +0 -0
  140. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/LambdaChat.py +0 -0
  141. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/Llama3.py +0 -0
  142. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/MCPCore.py +0 -0
  143. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/Marcus.py +0 -0
  144. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/Netwrck.py +0 -0
  145. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/OLLAMA.py +0 -0
  146. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/OPENAI/__init__.py +0 -0
  147. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/OPENAI/ai4chat.py +0 -0
  148. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/OPENAI/base.py +0 -0
  149. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/OPENAI/c4ai.py +0 -0
  150. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/OPENAI/chatgpt.py +0 -0
  151. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/OPENAI/chatgptclone.py +0 -0
  152. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/OPENAI/deepinfra.py +0 -0
  153. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/OPENAI/e2b.py +0 -0
  154. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/OPENAI/exaai.py +0 -0
  155. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/OPENAI/exachat.py +0 -0
  156. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/OPENAI/freeaichat.py +0 -0
  157. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/OPENAI/glider.py +0 -0
  158. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/OPENAI/groq.py +0 -0
  159. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/OPENAI/heckai.py +0 -0
  160. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/OPENAI/llmchatco.py +0 -0
  161. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/OPENAI/mcpcore.py +0 -0
  162. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/OPENAI/multichat.py +0 -0
  163. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/OPENAI/netwrck.py +0 -0
  164. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/OPENAI/opkfc.py +0 -0
  165. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/OPENAI/sonus.py +0 -0
  166. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/OPENAI/standardinput.py +0 -0
  167. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/OPENAI/textpollinations.py +0 -0
  168. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/OPENAI/toolbaz.py +0 -0
  169. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/OPENAI/typegpt.py +0 -0
  170. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/OPENAI/uncovrAI.py +0 -0
  171. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/OPENAI/utils.py +0 -0
  172. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/OPENAI/venice.py +0 -0
  173. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/OPENAI/wisecat.py +0 -0
  174. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/OPENAI/writecream.py +0 -0
  175. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/OPENAI/x0gpt.py +0 -0
  176. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/OPENAI/yep.py +0 -0
  177. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/OpenGPT.py +0 -0
  178. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/Openai.py +0 -0
  179. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/PI.py +0 -0
  180. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/Perplexitylabs.py +0 -0
  181. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/QwenLM.py +0 -0
  182. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/Reka.py +0 -0
  183. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/StandardInput.py +0 -0
  184. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/TTI/AiForce/__init__.py +0 -0
  185. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/TTI/AiForce/async_aiforce.py +0 -0
  186. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/TTI/AiForce/sync_aiforce.py +0 -0
  187. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/TTI/FreeAIPlayground/__init__.py +0 -0
  188. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/TTI/FreeAIPlayground/async_freeaiplayground.py +0 -0
  189. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/TTI/FreeAIPlayground/sync_freeaiplayground.py +0 -0
  190. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/TTI/ImgSys/__init__.py +0 -0
  191. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/TTI/ImgSys/async_imgsys.py +0 -0
  192. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/TTI/ImgSys/sync_imgsys.py +0 -0
  193. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/TTI/MagicStudio/__init__.py +0 -0
  194. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/TTI/MagicStudio/async_magicstudio.py +0 -0
  195. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/TTI/MagicStudio/sync_magicstudio.py +0 -0
  196. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/TTI/Nexra/__init__.py +0 -0
  197. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/TTI/Nexra/async_nexra.py +0 -0
  198. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/TTI/Nexra/sync_nexra.py +0 -0
  199. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/TTI/PollinationsAI/__init__.py +0 -0
  200. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/TTI/PollinationsAI/async_pollinations.py +0 -0
  201. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/TTI/PollinationsAI/sync_pollinations.py +0 -0
  202. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/TTI/__init__.py +0 -0
  203. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/TTI/aiarta/__init__.py +0 -0
  204. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/TTI/aiarta/async_aiarta.py +0 -0
  205. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/TTI/aiarta/sync_aiarta.py +0 -0
  206. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/TTI/artbit/__init__.py +0 -0
  207. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/TTI/artbit/async_artbit.py +0 -0
  208. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/TTI/artbit/sync_artbit.py +0 -0
  209. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/TTI/fastflux/__init__.py +0 -0
  210. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/TTI/fastflux/async_fastflux.py +0 -0
  211. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/TTI/fastflux/sync_fastflux.py +0 -0
  212. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/TTI/huggingface/__init__.py +0 -0
  213. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/TTI/huggingface/async_huggingface.py +0 -0
  214. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/TTI/huggingface/sync_huggingface.py +0 -0
  215. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/TTI/piclumen/__init__.py +0 -0
  216. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/TTI/piclumen/async_piclumen.py +0 -0
  217. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/TTI/piclumen/sync_piclumen.py +0 -0
  218. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/TTI/pixelmuse/__init__.py +0 -0
  219. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/TTI/pixelmuse/async_pixelmuse.py +0 -0
  220. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/TTI/pixelmuse/sync_pixelmuse.py +0 -0
  221. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/TTI/talkai/__init__.py +0 -0
  222. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/TTI/talkai/async_talkai.py +0 -0
  223. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/TTI/talkai/sync_talkai.py +0 -0
  224. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/TTS/__init__.py +0 -0
  225. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/TTS/base.py +0 -0
  226. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/TTS/deepgram.py +0 -0
  227. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/TTS/elevenlabs.py +0 -0
  228. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/TTS/gesserit.py +0 -0
  229. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/TTS/murfai.py +0 -0
  230. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/TTS/parler.py +0 -0
  231. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/TTS/speechma.py +0 -0
  232. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/TTS/streamElements.py +0 -0
  233. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/TTS/utils.py +0 -0
  234. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/TextPollinationsAI.py +0 -0
  235. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/TwoAI.py +0 -0
  236. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/TypliAI.py +0 -0
  237. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/Venice.py +0 -0
  238. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/VercelAI.py +0 -0
  239. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/Writecream.py +0 -0
  240. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/WritingMate.py +0 -0
  241. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/Youchat.py +0 -0
  242. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/aimathgpt.py +0 -0
  243. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/asksteve.py +0 -0
  244. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/bagoodex.py +0 -0
  245. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/cerebras.py +0 -0
  246. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/chatglm.py +0 -0
  247. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/cleeai.py +0 -0
  248. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/copilot.py +0 -0
  249. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/elmo.py +0 -0
  250. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/geminiapi.py +0 -0
  251. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/geminiprorealtime.py +0 -0
  252. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/granite.py +0 -0
  253. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/hermes.py +0 -0
  254. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/julius.py +0 -0
  255. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/koala.py +0 -0
  256. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/learnfastai.py +0 -0
  257. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/llama3mitril.py +0 -0
  258. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/llmchat.py +0 -0
  259. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/llmchatco.py +0 -0
  260. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/meta.py +0 -0
  261. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/multichat.py +0 -0
  262. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/searchchat.py +0 -0
  263. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/sonus.py +0 -0
  264. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/talkai.py +0 -0
  265. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/toolbaz.py +0 -0
  266. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/turboseek.py +0 -0
  267. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/typefully.py +0 -0
  268. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/typegpt.py +0 -0
  269. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/uncovr.py +0 -0
  270. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/x0gpt.py +0 -0
  271. {webscout-8.2.5 → webscout-8.2.6}/webscout/Provider/yep.py +0 -0
  272. {webscout-8.2.5 → webscout-8.2.6}/webscout/__main__.py +0 -0
  273. {webscout-8.2.5 → webscout-8.2.6}/webscout/cli.py +0 -0
  274. {webscout-8.2.5 → webscout-8.2.6}/webscout/exceptions.py +0 -0
  275. {webscout-8.2.5 → webscout-8.2.6}/webscout/litagent/__init__.py +0 -0
  276. {webscout-8.2.5 → webscout-8.2.6}/webscout/litagent/agent.py +0 -0
  277. {webscout-8.2.5 → webscout-8.2.6}/webscout/litagent/constants.py +0 -0
  278. {webscout-8.2.5 → webscout-8.2.6}/webscout/litprinter/__init__.py +0 -0
  279. {webscout-8.2.5 → webscout-8.2.6}/webscout/models.py +0 -0
  280. {webscout-8.2.5 → webscout-8.2.6}/webscout/optimizers.py +0 -0
  281. {webscout-8.2.5 → webscout-8.2.6}/webscout/prompt_manager.py +0 -0
  282. {webscout-8.2.5 → webscout-8.2.6}/webscout/scout/__init__.py +0 -0
  283. {webscout-8.2.5 → webscout-8.2.6}/webscout/scout/core/__init__.py +0 -0
  284. {webscout-8.2.5 → webscout-8.2.6}/webscout/scout/core/crawler.py +0 -0
  285. {webscout-8.2.5 → webscout-8.2.6}/webscout/scout/core/scout.py +0 -0
  286. {webscout-8.2.5 → webscout-8.2.6}/webscout/scout/core/search_result.py +0 -0
  287. {webscout-8.2.5 → webscout-8.2.6}/webscout/scout/core/text_analyzer.py +0 -0
  288. {webscout-8.2.5 → webscout-8.2.6}/webscout/scout/core/text_utils.py +0 -0
  289. {webscout-8.2.5 → webscout-8.2.6}/webscout/scout/core/web_analyzer.py +0 -0
  290. {webscout-8.2.5 → webscout-8.2.6}/webscout/scout/core.py +0 -0
  291. {webscout-8.2.5 → webscout-8.2.6}/webscout/scout/element.py +0 -0
  292. {webscout-8.2.5 → webscout-8.2.6}/webscout/scout/parsers/__init__.py +0 -0
  293. {webscout-8.2.5 → webscout-8.2.6}/webscout/scout/parsers/html5lib_parser.py +0 -0
  294. {webscout-8.2.5 → webscout-8.2.6}/webscout/scout/parsers/html_parser.py +0 -0
  295. {webscout-8.2.5 → webscout-8.2.6}/webscout/scout/parsers/lxml_parser.py +0 -0
  296. {webscout-8.2.5 → webscout-8.2.6}/webscout/scout/utils.py +0 -0
  297. {webscout-8.2.5 → webscout-8.2.6}/webscout/tempid.py +0 -0
  298. {webscout-8.2.5 → webscout-8.2.6}/webscout/update_checker.py +0 -0
  299. {webscout-8.2.5 → webscout-8.2.6}/webscout/utils.py +0 -0
  300. {webscout-8.2.5 → webscout-8.2.6}/webscout/webscout_search.py +0 -0
  301. {webscout-8.2.5 → webscout-8.2.6}/webscout/webscout_search_async.py +0 -0
  302. {webscout-8.2.5 → webscout-8.2.6}/webscout/yep_search.py +0 -0
  303. {webscout-8.2.5 → webscout-8.2.6}/webscout/zeroart/__init__.py +0 -0
  304. {webscout-8.2.5 → webscout-8.2.6}/webscout/zeroart/base.py +0 -0
  305. {webscout-8.2.5 → webscout-8.2.6}/webscout/zeroart/effects.py +0 -0
  306. {webscout-8.2.5 → webscout-8.2.6}/webscout/zeroart/fonts.py +0 -0
  307. {webscout-8.2.5 → webscout-8.2.6}/webscout.egg-info/dependency_links.txt +0 -0
  308. {webscout-8.2.5 → webscout-8.2.6}/webscout.egg-info/entry_points.txt +0 -0
  309. {webscout-8.2.5 → webscout-8.2.6}/webscout.egg-info/requires.txt +0 -0
  310. {webscout-8.2.5 → webscout-8.2.6}/webscout.egg-info/top_level.txt +0 -0
  311. {webscout-8.2.5 → webscout-8.2.6}/webstoken/__init__.py +0 -0
  312. {webscout-8.2.5 → webscout-8.2.6}/webstoken/classifier.py +0 -0
  313. {webscout-8.2.5 → webscout-8.2.6}/webstoken/keywords.py +0 -0
  314. {webscout-8.2.5 → webscout-8.2.6}/webstoken/language.py +0 -0
  315. {webscout-8.2.5 → webscout-8.2.6}/webstoken/ner.py +0 -0
  316. {webscout-8.2.5 → webscout-8.2.6}/webstoken/normalizer.py +0 -0
  317. {webscout-8.2.5 → webscout-8.2.6}/webstoken/processor.py +0 -0
  318. {webscout-8.2.5 → webscout-8.2.6}/webstoken/sentiment.py +0 -0
  319. {webscout-8.2.5 → webscout-8.2.6}/webstoken/stemmer.py +0 -0
  320. {webscout-8.2.5 → webscout-8.2.6}/webstoken/tagger.py +0 -0
  321. {webscout-8.2.5 → webscout-8.2.6}/webstoken/tokenizer.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: webscout
3
- Version: 8.2.5
3
+ Version: 8.2.6
4
4
  Summary: Search for anything using Google, DuckDuckGo, phind.com, Contains AI models, can transcribe yt videos, temporary email and phone number generation, has TTS support, webai (terminal gpt and open interpreter) and offline LLMs and more
5
5
  Author: OEvortex
6
6
  Author-email: helpingai5@gmail.com
@@ -0,0 +1,233 @@
1
+ """
2
+ This module provides the AUTO provider, which automatically selects and uses
3
+ an available LLM provider from the webscout library that doesn't require
4
+ API keys or cookies.
5
+ """
6
+
7
+ from webscout.AIbase import Provider
8
+ from webscout.exceptions import AllProvidersFailure
9
+ from typing import Union, Any, Dict, Generator
10
+ import importlib
11
+ import pkgutil
12
+ import random
13
+ import inspect
14
+
15
+ def load_providers():
16
+ """
17
+ Dynamically loads all Provider classes from the webscout.Provider package.
18
+
19
+ Identifies providers that require special authentication parameters like
20
+ 'api_key', 'cookie_file', or 'cookie_path'.
21
+
22
+ Returns:
23
+ tuple: A tuple containing:
24
+ - provider_map (dict): A dictionary mapping uppercase provider names to their classes.
25
+ - api_key_providers (set): A set of uppercase provider names requiring special authentication.
26
+ """
27
+ provider_map = {}
28
+ api_key_providers = set()
29
+ cookie_providers = set()
30
+ provider_package = importlib.import_module("webscout.Provider")
31
+
32
+ for _, module_name, _ in pkgutil.iter_modules(provider_package.__path__):
33
+ try:
34
+ module = importlib.import_module(f"webscout.Provider.{module_name}")
35
+ for attr_name in dir(module):
36
+ attr = getattr(module, attr_name)
37
+ if isinstance(attr, type) and issubclass(attr, Provider) and attr != Provider:
38
+ provider_map[attr_name.upper()] = attr
39
+ # Check if the provider needs special parameters
40
+ sig = inspect.signature(attr.__init__).parameters
41
+ if 'api_key' in sig:
42
+ api_key_providers.add(attr_name.upper())
43
+ if 'cookie_file' in sig or 'cookie_path' in sig:
44
+ cookie_providers.add(attr_name.upper())
45
+ except Exception:
46
+ pass
47
+ return provider_map, api_key_providers.union(cookie_providers)
48
+
49
+ provider_map, api_key_providers = load_providers()
50
+
51
+ class AUTO(Provider):
52
+ """
53
+ An automatic provider that cycles through available free providers
54
+ until one successfully processes the request. Excludes providers
55
+ requiring API keys or cookies by default.
56
+ """
57
+ def __init__(
58
+ self,
59
+ is_conversation: bool = True,
60
+ max_tokens: int = 600,
61
+ timeout: int = 30,
62
+ intro: str = None,
63
+ filepath: str = None,
64
+ update_file: bool = True,
65
+ proxies: dict = {},
66
+ history_offset: int = 10250,
67
+ act: str = None,
68
+ exclude: list[str] = [],
69
+ print_provider_info: bool = False,
70
+ ):
71
+ """
72
+ Initializes the AUTO provider.
73
+
74
+ Args:
75
+ is_conversation (bool): Flag for conversational mode. Defaults to True.
76
+ max_tokens (int): Maximum tokens for the response. Defaults to 600.
77
+ timeout (int): Request timeout in seconds. Defaults to 30.
78
+ intro (str, optional): Introductory prompt. Defaults to None.
79
+ filepath (str, optional): Path for conversation history. Defaults to None.
80
+ update_file (bool): Whether to update the history file. Defaults to True.
81
+ proxies (dict): Proxies for requests. Defaults to {}.
82
+ history_offset (int): History character offset limit. Defaults to 10250.
83
+ act (str, optional): Awesome prompt key. Defaults to None.
84
+ exclude (list[str]): List of provider names (uppercase) to exclude. Defaults to [].
85
+ print_provider_info (bool): Whether to print the name of the successful provider. Defaults to False.
86
+ """
87
+ self.provider = None # type: Provider
88
+ self.provider_name = None # type: str
89
+ self.is_conversation: bool = is_conversation
90
+ self.max_tokens: int = max_tokens
91
+ self.timeout: int = timeout
92
+ self.intro: str = intro
93
+ self.filepath: str = filepath
94
+ self.update_file: bool = update_file
95
+ self.proxies: dict = proxies
96
+ self.history_offset: int = history_offset
97
+ self.act: str = act
98
+ self.exclude: list[str] = [e.upper() for e in exclude]
99
+ self.print_provider_info: bool = print_provider_info
100
+
101
+
102
+ @property
103
+ def last_response(self) -> dict[str, Any]:
104
+ """
105
+ Returns the last response dictionary from the successful provider.
106
+ """
107
+ return self.provider.last_response if self.provider else {}
108
+
109
+ @property
110
+ def conversation(self) -> object:
111
+ """
112
+ Returns the conversation object from the successful provider.
113
+ """
114
+ return self.provider.conversation if self.provider else None
115
+
116
+ def ask(
117
+ self,
118
+ prompt: str,
119
+ stream: bool = False,
120
+ raw: bool = False,
121
+ optimizer: str = None,
122
+ conversationally: bool = False,
123
+ ) -> Union[Dict, Generator]:
124
+ """
125
+ Sends the prompt to providers, trying each available free provider
126
+ in a random order until one succeeds.
127
+
128
+ Args:
129
+ prompt (str): The user's prompt.
130
+ stream (bool): Whether to stream the response. Defaults to False.
131
+ raw (bool): Whether to return the raw response format. Defaults to False.
132
+ optimizer (str, optional): Name of the optimizer to use. Defaults to None.
133
+ conversationally (bool): Whether to apply optimizer conversationally. Defaults to False.
134
+
135
+ Returns:
136
+ Union[Dict, Generator]: The response dictionary or generator from the successful provider.
137
+ """
138
+ ask_kwargs = {
139
+ "prompt": prompt,
140
+ "stream": stream,
141
+ "raw": raw,
142
+ "optimizer": optimizer,
143
+ "conversationally": conversationally,
144
+ }
145
+
146
+ # Filter out API key required providers and excluded providers
147
+ available_providers = [
148
+ (name, cls) for name, cls in provider_map.items()
149
+ if name not in api_key_providers and name not in self.exclude
150
+ ]
151
+
152
+ # Shuffle the list of available providers
153
+ random.shuffle(available_providers)
154
+
155
+ # Try webscout-based providers
156
+ for provider_name, provider_class in available_providers:
157
+ try:
158
+ self.provider_name = f"webscout-{provider_name}"
159
+
160
+ self.provider = provider_class(
161
+ is_conversation=self.is_conversation,
162
+ max_tokens=self.max_tokens,
163
+ timeout=self.timeout,
164
+ intro=self.intro,
165
+ filepath=self.filepath,
166
+ update_file=self.update_file,
167
+ proxies=self.proxies,
168
+ history_offset=self.history_offset,
169
+ act=self.act,
170
+ )
171
+ response = self.provider.ask(**ask_kwargs)
172
+ # Print provider info if enabled
173
+ if self.print_provider_info:
174
+ print(f"\033[1;34m{self.provider_name}\033[0m\n")
175
+ return response
176
+ except Exception:
177
+ continue
178
+
179
+ # If we get here, all providers failed
180
+ raise AllProvidersFailure("All providers failed to process the request")
181
+
182
+ def chat(
183
+ self,
184
+ prompt: str,
185
+ stream: bool = False,
186
+ optimizer: str = None,
187
+ conversationally: bool = False,
188
+ ) -> Union[str, Generator[str, None, None]]:
189
+ """
190
+ Provides a simplified chat interface, returning the message string(s).
191
+
192
+ Args:
193
+ prompt (str): The user's prompt.
194
+ stream (bool): Whether to stream the response. Defaults to False.
195
+ optimizer (str, optional): Name of the optimizer to use. Defaults to None.
196
+ conversationally (bool): Whether to apply optimizer conversationally. Defaults to False.
197
+
198
+ Returns:
199
+ Union[str, Generator[str, None, None]]: The response string or a generator yielding
200
+ response chunks.
201
+ """
202
+ # run_new_test is not used in the current implementation, but we keep it for API compatibility
203
+ response = self.ask(
204
+ prompt,
205
+ stream,
206
+ optimizer=optimizer,
207
+ conversationally=conversationally,
208
+ )
209
+
210
+ if stream:
211
+ for chunk in response:
212
+ yield self.get_message(chunk)
213
+ else:
214
+ return self.get_message(response)
215
+
216
+ def get_message(self, response: dict) -> str:
217
+ """
218
+ Extracts the message text from the provider's response dictionary.
219
+
220
+ Args:
221
+ response (dict): The response dictionary from the ask method.
222
+
223
+ Returns:
224
+ str: The extracted message string.
225
+ """
226
+ assert self.provider is not None, "Chat with AI first"
227
+ return self.provider.get_message(response)
228
+
229
+ if __name__ == "__main__":
230
+ auto = AUTO(print_provider_info=True)
231
+ response = auto.chat("Hello, how are you?", stream=True)
232
+ for chunk in response:
233
+ print(chunk, end="", flush=True)
@@ -0,0 +1,240 @@
1
+ import json
2
+ import platform
3
+ import subprocess
4
+ from typing import Union, Optional, Dict, Any, Iterable, Generator, List, Callable, Literal, Tuple
5
+ import io
6
+ from collections import deque
7
+ import codecs
8
+
9
+ # Expanded encoding types
10
+ EncodingType = Literal['utf-8', 'utf-16', 'utf-32', 'ascii', 'latin1', 'cp1252', 'iso-8859-1',
11
+ 'iso-8859-2', 'windows-1250', 'windows-1251', 'windows-1252', 'gbk', 'big5',
12
+ 'shift_jis', 'euc-jp', 'euc-kr']
13
+
14
+ def _process_chunk(
15
+ chunk: str,
16
+ intro_value: str,
17
+ to_json: bool,
18
+ skip_markers: List[str],
19
+ strip_chars: Optional[str],
20
+ yield_raw_on_error: bool,
21
+ ) -> Union[str, Dict[str, Any], None]:
22
+ """Internal helper to sanitize and potentially parse a single chunk."""
23
+ if not isinstance(chunk, str):
24
+ return None
25
+
26
+ sanitized_chunk = chunk
27
+
28
+ # Check if chunk starts with intro_value + skip_marker combination
29
+ if intro_value and skip_markers:
30
+ for marker in skip_markers:
31
+ combined_marker = f"{intro_value}{marker}"
32
+ if sanitized_chunk.startswith(combined_marker):
33
+ return None
34
+
35
+ if intro_value and sanitized_chunk.startswith(intro_value):
36
+ sanitized_chunk = sanitized_chunk[len(intro_value):]
37
+
38
+ if strip_chars is not None:
39
+ sanitized_chunk = sanitized_chunk.strip(strip_chars)
40
+ else:
41
+ sanitized_chunk = sanitized_chunk.lstrip()
42
+
43
+ # Check both standalone skip_markers and stripped version
44
+ if not sanitized_chunk or any(
45
+ marker in sanitized_chunk or sanitized_chunk == marker
46
+ for marker in skip_markers
47
+ ):
48
+ return None
49
+
50
+ if to_json:
51
+ try:
52
+ return json.loads(sanitized_chunk)
53
+ except (json.JSONDecodeError, Exception) as e:
54
+ return sanitized_chunk if yield_raw_on_error else None
55
+
56
+ return sanitized_chunk
57
+
58
+ def _decode_byte_stream(
59
+ byte_iterator: Iterable[bytes],
60
+ encoding: EncodingType = 'utf-8',
61
+ errors: str = 'replace'
62
+ ) -> Generator[str, None, None]:
63
+ """
64
+ Realtime byte stream decoder with flexible encoding support.
65
+
66
+ Args:
67
+ byte_iterator: Iterator yielding bytes
68
+ encoding: Character encoding to use
69
+ errors: How to handle encoding errors ('strict', 'ignore', 'replace')
70
+ """
71
+ # Initialize decoder with the specified encoding
72
+ try:
73
+ decoder = codecs.getincrementaldecoder(encoding)(errors=errors)
74
+ except LookupError:
75
+ # Fallback to utf-8 if the encoding is not supported
76
+ decoder = codecs.getincrementaldecoder('utf-8')(errors=errors)
77
+
78
+ # Process byte stream in realtime
79
+ for chunk_bytes in byte_iterator:
80
+ if not chunk_bytes:
81
+ continue
82
+
83
+ try:
84
+ # Decode chunk with specified encoding
85
+ text = decoder.decode(chunk_bytes, final=False)
86
+ if text:
87
+ yield text
88
+ except UnicodeDecodeError:
89
+ yield f"[Encoding Error: Could not decode bytes with {encoding}]\n"
90
+
91
+ # Final flush
92
+ try:
93
+ final_text = decoder.decode(b'', final=True)
94
+ if final_text:
95
+ yield final_text
96
+ except UnicodeDecodeError:
97
+ yield f"[Encoding Error: Could not decode final bytes with {encoding}]\n"
98
+ def sanitize_stream(
99
+ data: Union[str, bytes, Iterable[str], Iterable[bytes]],
100
+ intro_value: str = "data:",
101
+ to_json: bool = True,
102
+ skip_markers: Optional[List[str]] = None,
103
+ strip_chars: Optional[str] = None,
104
+ start_marker: Optional[str] = None,
105
+ end_marker: Optional[str] = None,
106
+ content_extractor: Optional[Callable[[Union[str, Dict[str, Any]]], Optional[Any]]] = None,
107
+ yield_raw_on_error: bool = True,
108
+ encoding: EncodingType = 'utf-8',
109
+ encoding_errors: str = 'replace',
110
+ chunk_size: Optional[int] = None,
111
+ ) -> Generator[Any, None, None]:
112
+ """
113
+ Realtime stream processor that handles string/byte streams with minimal latency.
114
+
115
+ Features:
116
+ - Direct realtime processing of byte streams
117
+ - Optimized string handling and JSON parsing
118
+ - Robust error handling and validation
119
+ - Flexible encoding support
120
+ - Drop-in replacement for response.iter_content/iter_lines
121
+
122
+ Args:
123
+ data: Input data (string, string iterator, or bytes iterator)
124
+ intro_value: Prefix to remove from each chunk
125
+ to_json: Whether to parse chunks as JSON
126
+ skip_markers: Markers to skip
127
+ strip_chars: Characters to strip
128
+ start_marker: Processing start marker
129
+ end_marker: Processing end marker
130
+ content_extractor: Function to extract content
131
+ yield_raw_on_error: Yield raw content on JSON errors
132
+ encoding: Character encoding for byte streams ('utf-8', 'latin1', etc.)
133
+ encoding_errors: How to handle encoding errors ('strict', 'ignore', 'replace')
134
+ chunk_size: Chunk size for byte streams (None for default)
135
+
136
+ Yields:
137
+ Processed chunks (string or dictionary)
138
+
139
+ Example:
140
+ >>> # Process response content
141
+ >>> for chunk in sanitize_stream(response.iter_content()):
142
+ ... process_chunk(chunk)
143
+
144
+ >>> # Process a stream with specific encoding
145
+ >>> for text in sanitize_stream(byte_stream, encoding='latin1', to_json=False):
146
+ ... process_text(text)
147
+ """
148
+ effective_skip_markers = skip_markers or []
149
+ processing_active = start_marker is None
150
+
151
+ if isinstance(data, (str, bytes)):
152
+ # Optimized single string/bytes processing
153
+ processed_item = None
154
+ if isinstance(data, bytes):
155
+ data = data.decode(encoding, errors=encoding_errors)
156
+ if to_json:
157
+ try:
158
+ processed_item = json.loads(data)
159
+ except json.JSONDecodeError:
160
+ pass
161
+
162
+ if processed_item is None:
163
+ if not processing_active and data == start_marker:
164
+ processing_active = True
165
+ elif processing_active and end_marker is not None and data == end_marker:
166
+ processing_active = False
167
+
168
+ if processing_active:
169
+ processed_item = _process_chunk(
170
+ data, intro_value, to_json, effective_skip_markers,
171
+ strip_chars, yield_raw_on_error
172
+ )
173
+
174
+ if processed_item is not None:
175
+ if content_extractor:
176
+ try:
177
+ final_content = content_extractor(processed_item)
178
+ if final_content is not None:
179
+ yield final_content
180
+ except Exception:
181
+ pass
182
+ else:
183
+ yield processed_item
184
+
185
+ elif hasattr(data, '__iter__') or hasattr(data, 'iter_content'):
186
+ # Efficient stream processing
187
+ try:
188
+ if hasattr(data, 'iter_content'):
189
+ data = data.iter_content(chunk_size=chunk_size)
190
+ first_item = next(iter(data))
191
+ except StopIteration:
192
+ return
193
+
194
+ from itertools import chain
195
+ stream = chain([first_item], data)
196
+
197
+ # Choose processing path based on type
198
+ if isinstance(first_item, bytes):
199
+ line_iterator = _decode_byte_stream(
200
+ stream,
201
+ encoding=encoding,
202
+ errors=encoding_errors
203
+ )
204
+ elif isinstance(first_item, str):
205
+ line_iterator = stream
206
+ else:
207
+ raise TypeError(f"Stream must yield strings or bytes, not {type(first_item).__name__}")
208
+
209
+ # Process stream efficiently
210
+ for line in line_iterator:
211
+ if not processing_active and start_marker is not None and line == start_marker:
212
+ processing_active = True
213
+ continue
214
+ if processing_active and end_marker is not None and line == end_marker:
215
+ processing_active = False
216
+ continue
217
+
218
+ if processing_active:
219
+ processed = _process_chunk(
220
+ line, intro_value, to_json, effective_skip_markers,
221
+ strip_chars, yield_raw_on_error
222
+ )
223
+
224
+ if processed is not None:
225
+ if content_extractor:
226
+ try:
227
+ final_content = content_extractor(processed)
228
+ if final_content is not None:
229
+ yield final_content
230
+ except Exception:
231
+ pass
232
+ else:
233
+ yield processed
234
+ else:
235
+ raise TypeError(f"Input must be a string or an iterable, not {type(data).__name__}")
236
+
237
+ from .conversation import Conversation
238
+ from .optimizers import Optimizers
239
+ from .Extra.autocoder import AutoCoder
240
+ from .prompt_manager import AwesomePrompts
@@ -7,19 +7,16 @@ import queue
7
7
  import tempfile
8
8
  import threading
9
9
  import subprocess
10
+ from typing import Optional, Generator, List, Tuple, Dict, Any, NamedTuple
10
11
  from rich.panel import Panel
11
12
  from rich.syntax import Syntax
12
- from rich.console import Console, Group
13
+ from rich.console import Console
13
14
  from rich.markdown import Markdown
14
15
  from rich.table import Table
15
16
  from rich.theme import Theme
16
17
  from rich.live import Live
17
- from rich.rule import Rule
18
18
  from rich.box import ROUNDED
19
- from typing import Optional, Generator, List, Tuple, Dict, Any
20
- from webscout.AIutel import run_system_command
21
19
  from .autocoder_utiles import get_intro_prompt
22
-
23
20
  # Initialize LitLogger with custom format and colors
24
21
  default_path = tempfile.mkdtemp(prefix="webscout_autocoder")
25
22
 
@@ -34,6 +31,70 @@ CUSTOM_THEME = Theme({
34
31
  })
35
32
 
36
33
  console = Console(theme=CUSTOM_THEME)
34
+ class CommandResult(NamedTuple):
35
+ """Result of a system command execution."""
36
+ success: bool
37
+ stdout: str
38
+ stderr: str
39
+
40
+ def run_system_command(
41
+ command: str,
42
+ exit_on_error: bool = False,
43
+ stdout_error: bool = False,
44
+ help: Optional[str] = None
45
+ ) -> Tuple[bool, CommandResult]:
46
+ """Execute a system command and return the result.
47
+
48
+ Args:
49
+ command (str): Command to execute
50
+ exit_on_error (bool): Whether to exit on error. Defaults to False.
51
+ stdout_error (bool): Whether to include stdout in error messages. Defaults to False.
52
+ help (str, optional): Help message for errors. Defaults to None.
53
+
54
+ Returns:
55
+ Tuple[bool, CommandResult]: Success status and command result containing stdout/stderr
56
+ """
57
+ try:
58
+ # Execute command and capture output
59
+ process = subprocess.Popen(
60
+ command,
61
+ stdout=subprocess.PIPE,
62
+ stderr=subprocess.PIPE,
63
+ shell=True,
64
+ text=True
65
+ )
66
+
67
+ # Get stdout and stderr
68
+ stdout, stderr = process.communicate()
69
+ success = process.returncode == 0
70
+
71
+ # Create result object
72
+ result = CommandResult(
73
+ success=success,
74
+ stdout=stdout.strip() if stdout else "",
75
+ stderr=stderr.strip() if stderr else ""
76
+ )
77
+
78
+ # Handle errors if needed
79
+ if not success and exit_on_error:
80
+ error_msg = stderr if stderr else stdout if stdout_error else "Command failed"
81
+ if help:
82
+ error_msg += f"\n{help}"
83
+ sys.exit(error_msg)
84
+
85
+ return success, result
86
+
87
+ except Exception as e:
88
+ # Handle execution errors
89
+ error_msg = str(e)
90
+ if help:
91
+ error_msg += f"\n{help}"
92
+
93
+ if exit_on_error:
94
+ sys.exit(error_msg)
95
+
96
+ return False, CommandResult(success=False, stdout="", stderr=error_msg)
97
+
37
98
 
38
99
  class AutoCoder:
39
100
  """Generate and auto-execute Python scripts in the CLI with advanced error handling and retry logic.
@@ -70,7 +70,8 @@ class Scira(AISearch):
70
70
 
71
71
  AVAILABLE_MODELS = {
72
72
  "scira-default": "Grok3-mini", # thinking model
73
- "scira-grok-3": "Grok3",
73
+ "scira-grok-3": "Grok3",
74
+ "scira-anthropic": "Sonnet 3.7 thinking",
74
75
  "scira-vision" : "Grok2-Vision", # vision model
75
76
  "scira-4.1-mini": "GPT4.1-mini",
76
77
  "scira-qwq": "QWQ-32B",
@@ -264,12 +264,12 @@ class GizAI(Provider):
264
264
  )
265
265
  return self.get_message(response_data)
266
266
 
267
- def get_message(self, response: dict) -> str:
267
+ def get_message(self, response: Union[dict, str]) -> str:
268
268
  """
269
269
  Extracts the message from the API response.
270
270
 
271
271
  Args:
272
- response (dict): The API response.
272
+ response (Union[dict, str]): The API response.
273
273
 
274
274
  Returns:
275
275
  str: The message content.
@@ -279,5 +279,7 @@ class GizAI(Provider):
279
279
  >>> response = ai.ask("Tell me a joke!")
280
280
  >>> message = ai.get_message(response)
281
281
  """
282
- assert isinstance(response, dict), "Response should be of dict data-type only"
283
- return response.get("text", "")
282
+ if isinstance(response, str):
283
+ return response
284
+ assert isinstance(response, dict), "Response should be either dict or str"
285
+ return response.get("text", "")