webscout 6.6__tar.gz → 6.7__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 (202) hide show
  1. {webscout-6.6/webscout.egg-info → webscout-6.7}/PKG-INFO +2 -8
  2. {webscout-6.6 → webscout-6.7}/README.md +1 -7
  3. {webscout-6.6 → webscout-6.7}/setup.py +1 -1
  4. {webscout-6.6 → webscout-6.7}/webscout/Extra/weather.py +5 -5
  5. {webscout-6.6 → webscout-6.7}/webscout/Provider/Netwrck.py +238 -234
  6. {webscout-6.6 → webscout-6.7}/webscout/Provider/meta.py +1 -1
  7. {webscout-6.6 → webscout-6.7}/webscout/cli.py +31 -39
  8. {webscout-6.6 → webscout-6.7}/webscout/litprinter/__init__.py +16 -7
  9. {webscout-6.6 → webscout-6.7}/webscout/version.py +1 -1
  10. {webscout-6.6 → webscout-6.7}/webscout/webscout_search.py +1 -1
  11. {webscout-6.6 → webscout-6.7/webscout.egg-info}/PKG-INFO +2 -8
  12. {webscout-6.6 → webscout-6.7}/webscout.egg-info/entry_points.txt +1 -1
  13. {webscout-6.6 → webscout-6.7}/LICENSE.md +0 -0
  14. {webscout-6.6 → webscout-6.7}/setup.cfg +0 -0
  15. {webscout-6.6 → webscout-6.7}/webscout/AIauto.py +0 -0
  16. {webscout-6.6 → webscout-6.7}/webscout/AIbase.py +0 -0
  17. {webscout-6.6 → webscout-6.7}/webscout/AIutel.py +0 -0
  18. {webscout-6.6 → webscout-6.7}/webscout/Bard.py +0 -0
  19. {webscout-6.6 → webscout-6.7}/webscout/DWEBS.py +0 -0
  20. {webscout-6.6 → webscout-6.7}/webscout/Extra/YTToolkit/YTdownloader.py +0 -0
  21. {webscout-6.6 → webscout-6.7}/webscout/Extra/YTToolkit/__init__.py +0 -0
  22. {webscout-6.6 → webscout-6.7}/webscout/Extra/YTToolkit/transcriber.py +0 -0
  23. {webscout-6.6 → webscout-6.7}/webscout/Extra/YTToolkit/ytapi/__init__.py +0 -0
  24. {webscout-6.6 → webscout-6.7}/webscout/Extra/YTToolkit/ytapi/channel.py +0 -0
  25. {webscout-6.6 → webscout-6.7}/webscout/Extra/YTToolkit/ytapi/errors.py +0 -0
  26. {webscout-6.6 → webscout-6.7}/webscout/Extra/YTToolkit/ytapi/extras.py +0 -0
  27. {webscout-6.6 → webscout-6.7}/webscout/Extra/YTToolkit/ytapi/https.py +0 -0
  28. {webscout-6.6 → webscout-6.7}/webscout/Extra/YTToolkit/ytapi/patterns.py +0 -0
  29. {webscout-6.6 → webscout-6.7}/webscout/Extra/YTToolkit/ytapi/playlist.py +0 -0
  30. {webscout-6.6 → webscout-6.7}/webscout/Extra/YTToolkit/ytapi/pool.py +0 -0
  31. {webscout-6.6 → webscout-6.7}/webscout/Extra/YTToolkit/ytapi/query.py +0 -0
  32. {webscout-6.6 → webscout-6.7}/webscout/Extra/YTToolkit/ytapi/stream.py +0 -0
  33. {webscout-6.6 → webscout-6.7}/webscout/Extra/YTToolkit/ytapi/utils.py +0 -0
  34. {webscout-6.6 → webscout-6.7}/webscout/Extra/YTToolkit/ytapi/video.py +0 -0
  35. {webscout-6.6 → webscout-6.7}/webscout/Extra/__init__.py +0 -0
  36. {webscout-6.6 → webscout-6.7}/webscout/Extra/autocoder/__init__.py +0 -0
  37. {webscout-6.6 → webscout-6.7}/webscout/Extra/autocoder/autocoder_utiles.py +0 -0
  38. {webscout-6.6 → webscout-6.7}/webscout/Extra/autocoder/rawdog.py +0 -0
  39. {webscout-6.6 → webscout-6.7}/webscout/Extra/autollama.py +0 -0
  40. {webscout-6.6 → webscout-6.7}/webscout/Extra/gguf.py +0 -0
  41. {webscout-6.6 → webscout-6.7}/webscout/Extra/markdownlite/__init__.py +0 -0
  42. {webscout-6.6 → webscout-6.7}/webscout/Extra/weather_ascii.py +0 -0
  43. {webscout-6.6 → webscout-6.7}/webscout/LLM.py +0 -0
  44. {webscout-6.6 → webscout-6.7}/webscout/Litlogger/__init__.py +0 -0
  45. {webscout-6.6 → webscout-6.7}/webscout/Local/__init__.py +0 -0
  46. {webscout-6.6 → webscout-6.7}/webscout/Local/_version.py +0 -0
  47. {webscout-6.6 → webscout-6.7}/webscout/Local/formats.py +0 -0
  48. {webscout-6.6 → webscout-6.7}/webscout/Local/model.py +0 -0
  49. {webscout-6.6 → webscout-6.7}/webscout/Local/samplers.py +0 -0
  50. {webscout-6.6 → webscout-6.7}/webscout/Local/thread.py +0 -0
  51. {webscout-6.6 → webscout-6.7}/webscout/Local/ui.py +0 -0
  52. {webscout-6.6 → webscout-6.7}/webscout/Local/utils.py +0 -0
  53. {webscout-6.6 → webscout-6.7}/webscout/Provider/AI21.py +0 -0
  54. {webscout-6.6 → webscout-6.7}/webscout/Provider/AISEARCH/__init__.py +0 -0
  55. {webscout-6.6 → webscout-6.7}/webscout/Provider/AISEARCH/felo_search.py +0 -0
  56. {webscout-6.6 → webscout-6.7}/webscout/Provider/AISEARCH/ooai.py +0 -0
  57. {webscout-6.6 → webscout-6.7}/webscout/Provider/Amigo.py +0 -0
  58. {webscout-6.6 → webscout-6.7}/webscout/Provider/Andi.py +0 -0
  59. {webscout-6.6 → webscout-6.7}/webscout/Provider/Bing.py +0 -0
  60. {webscout-6.6 → webscout-6.7}/webscout/Provider/Blackboxai.py +0 -0
  61. {webscout-6.6 → webscout-6.7}/webscout/Provider/ChatGPTES.py +0 -0
  62. {webscout-6.6 → webscout-6.7}/webscout/Provider/Chatify.py +0 -0
  63. {webscout-6.6 → webscout-6.7}/webscout/Provider/Cloudflare.py +0 -0
  64. {webscout-6.6 → webscout-6.7}/webscout/Provider/Cohere.py +0 -0
  65. {webscout-6.6 → webscout-6.7}/webscout/Provider/DARKAI.py +0 -0
  66. {webscout-6.6 → webscout-6.7}/webscout/Provider/Deepinfra.py +0 -0
  67. {webscout-6.6 → webscout-6.7}/webscout/Provider/Deepseek.py +0 -0
  68. {webscout-6.6 → webscout-6.7}/webscout/Provider/DiscordRocks.py +0 -0
  69. {webscout-6.6 → webscout-6.7}/webscout/Provider/EDITEE.py +0 -0
  70. {webscout-6.6 → webscout-6.7}/webscout/Provider/Farfalle.py +0 -0
  71. {webscout-6.6 → webscout-6.7}/webscout/Provider/Free2GPT.py +0 -0
  72. {webscout-6.6 → webscout-6.7}/webscout/Provider/GPTWeb.py +0 -0
  73. {webscout-6.6 → webscout-6.7}/webscout/Provider/Gemini.py +0 -0
  74. {webscout-6.6 → webscout-6.7}/webscout/Provider/Groq.py +0 -0
  75. {webscout-6.6 → webscout-6.7}/webscout/Provider/Jadve.py +0 -0
  76. {webscout-6.6 → webscout-6.7}/webscout/Provider/Koboldai.py +0 -0
  77. {webscout-6.6 → webscout-6.7}/webscout/Provider/Llama.py +0 -0
  78. {webscout-6.6 → webscout-6.7}/webscout/Provider/Llama3.py +0 -0
  79. {webscout-6.6 → webscout-6.7}/webscout/Provider/Marcus.py +0 -0
  80. {webscout-6.6 → webscout-6.7}/webscout/Provider/NinjaChat.py +0 -0
  81. {webscout-6.6 → webscout-6.7}/webscout/Provider/OLLAMA.py +0 -0
  82. {webscout-6.6 → webscout-6.7}/webscout/Provider/Openai.py +0 -0
  83. {webscout-6.6 → webscout-6.7}/webscout/Provider/PI.py +0 -0
  84. {webscout-6.6 → webscout-6.7}/webscout/Provider/Phind.py +0 -0
  85. {webscout-6.6 → webscout-6.7}/webscout/Provider/PizzaGPT.py +0 -0
  86. {webscout-6.6 → webscout-6.7}/webscout/Provider/RUBIKSAI.py +0 -0
  87. {webscout-6.6 → webscout-6.7}/webscout/Provider/Reka.py +0 -0
  88. {webscout-6.6 → webscout-6.7}/webscout/Provider/TTI/AiForce/__init__.py +0 -0
  89. {webscout-6.6 → webscout-6.7}/webscout/Provider/TTI/AiForce/async_aiforce.py +0 -0
  90. {webscout-6.6 → webscout-6.7}/webscout/Provider/TTI/AiForce/sync_aiforce.py +0 -0
  91. {webscout-6.6 → webscout-6.7}/webscout/Provider/TTI/Nexra/__init__.py +0 -0
  92. {webscout-6.6 → webscout-6.7}/webscout/Provider/TTI/Nexra/async_nexra.py +0 -0
  93. {webscout-6.6 → webscout-6.7}/webscout/Provider/TTI/Nexra/sync_nexra.py +0 -0
  94. {webscout-6.6 → webscout-6.7}/webscout/Provider/TTI/PollinationsAI/__init__.py +0 -0
  95. {webscout-6.6 → webscout-6.7}/webscout/Provider/TTI/PollinationsAI/async_pollinations.py +0 -0
  96. {webscout-6.6 → webscout-6.7}/webscout/Provider/TTI/PollinationsAI/sync_pollinations.py +0 -0
  97. {webscout-6.6 → webscout-6.7}/webscout/Provider/TTI/__init__.py +0 -0
  98. {webscout-6.6 → webscout-6.7}/webscout/Provider/TTI/artbit/__init__.py +0 -0
  99. {webscout-6.6 → webscout-6.7}/webscout/Provider/TTI/artbit/async_artbit.py +0 -0
  100. {webscout-6.6 → webscout-6.7}/webscout/Provider/TTI/artbit/sync_artbit.py +0 -0
  101. {webscout-6.6 → webscout-6.7}/webscout/Provider/TTI/blackbox/__init__.py +0 -0
  102. {webscout-6.6 → webscout-6.7}/webscout/Provider/TTI/blackbox/async_blackbox.py +0 -0
  103. {webscout-6.6 → webscout-6.7}/webscout/Provider/TTI/blackbox/sync_blackbox.py +0 -0
  104. {webscout-6.6 → webscout-6.7}/webscout/Provider/TTI/deepinfra/__init__.py +0 -0
  105. {webscout-6.6 → webscout-6.7}/webscout/Provider/TTI/deepinfra/async_deepinfra.py +0 -0
  106. {webscout-6.6 → webscout-6.7}/webscout/Provider/TTI/deepinfra/sync_deepinfra.py +0 -0
  107. {webscout-6.6 → webscout-6.7}/webscout/Provider/TTI/huggingface/__init__.py +0 -0
  108. {webscout-6.6 → webscout-6.7}/webscout/Provider/TTI/huggingface/async_huggingface.py +0 -0
  109. {webscout-6.6 → webscout-6.7}/webscout/Provider/TTI/huggingface/sync_huggingface.py +0 -0
  110. {webscout-6.6 → webscout-6.7}/webscout/Provider/TTI/imgninza/__init__.py +0 -0
  111. {webscout-6.6 → webscout-6.7}/webscout/Provider/TTI/imgninza/async_ninza.py +0 -0
  112. {webscout-6.6 → webscout-6.7}/webscout/Provider/TTI/imgninza/sync_ninza.py +0 -0
  113. {webscout-6.6 → webscout-6.7}/webscout/Provider/TTI/talkai/__init__.py +0 -0
  114. {webscout-6.6 → webscout-6.7}/webscout/Provider/TTI/talkai/async_talkai.py +0 -0
  115. {webscout-6.6 → webscout-6.7}/webscout/Provider/TTI/talkai/sync_talkai.py +0 -0
  116. {webscout-6.6 → webscout-6.7}/webscout/Provider/TTS/__init__.py +0 -0
  117. {webscout-6.6 → webscout-6.7}/webscout/Provider/TTS/deepgram.py +0 -0
  118. {webscout-6.6 → webscout-6.7}/webscout/Provider/TTS/elevenlabs.py +0 -0
  119. {webscout-6.6 → webscout-6.7}/webscout/Provider/TTS/gesserit.py +0 -0
  120. {webscout-6.6 → webscout-6.7}/webscout/Provider/TTS/murfai.py +0 -0
  121. {webscout-6.6 → webscout-6.7}/webscout/Provider/TTS/parler.py +0 -0
  122. {webscout-6.6 → webscout-6.7}/webscout/Provider/TTS/streamElements.py +0 -0
  123. {webscout-6.6 → webscout-6.7}/webscout/Provider/TTS/utils.py +0 -0
  124. {webscout-6.6 → webscout-6.7}/webscout/Provider/TTS/voicepod.py +0 -0
  125. {webscout-6.6 → webscout-6.7}/webscout/Provider/TeachAnything.py +0 -0
  126. {webscout-6.6 → webscout-6.7}/webscout/Provider/Youchat.py +0 -0
  127. {webscout-6.6 → webscout-6.7}/webscout/Provider/__init__.py +0 -0
  128. {webscout-6.6 → webscout-6.7}/webscout/Provider/ai4chat.py +0 -0
  129. {webscout-6.6 → webscout-6.7}/webscout/Provider/aimathgpt.py +0 -0
  130. {webscout-6.6 → webscout-6.7}/webscout/Provider/askmyai.py +0 -0
  131. {webscout-6.6 → webscout-6.7}/webscout/Provider/bagoodex.py +0 -0
  132. {webscout-6.6 → webscout-6.7}/webscout/Provider/cerebras.py +0 -0
  133. {webscout-6.6 → webscout-6.7}/webscout/Provider/cleeai.py +0 -0
  134. {webscout-6.6 → webscout-6.7}/webscout/Provider/elmo.py +0 -0
  135. {webscout-6.6 → webscout-6.7}/webscout/Provider/gaurish.py +0 -0
  136. {webscout-6.6 → webscout-6.7}/webscout/Provider/geminiapi.py +0 -0
  137. {webscout-6.6 → webscout-6.7}/webscout/Provider/geminiprorealtime.py +0 -0
  138. {webscout-6.6 → webscout-6.7}/webscout/Provider/julius.py +0 -0
  139. {webscout-6.6 → webscout-6.7}/webscout/Provider/koala.py +0 -0
  140. {webscout-6.6 → webscout-6.7}/webscout/Provider/learnfastai.py +0 -0
  141. {webscout-6.6 → webscout-6.7}/webscout/Provider/lepton.py +0 -0
  142. {webscout-6.6 → webscout-6.7}/webscout/Provider/llama3mitril.py +0 -0
  143. {webscout-6.6 → webscout-6.7}/webscout/Provider/llamatutor.py +0 -0
  144. {webscout-6.6 → webscout-6.7}/webscout/Provider/llmchat.py +0 -0
  145. {webscout-6.6 → webscout-6.7}/webscout/Provider/mhystical.py +0 -0
  146. {webscout-6.6 → webscout-6.7}/webscout/Provider/multichat.py +0 -0
  147. {webscout-6.6 → webscout-6.7}/webscout/Provider/promptrefine.py +0 -0
  148. {webscout-6.6 → webscout-6.7}/webscout/Provider/talkai.py +0 -0
  149. {webscout-6.6 → webscout-6.7}/webscout/Provider/turboseek.py +0 -0
  150. {webscout-6.6 → webscout-6.7}/webscout/Provider/tutorai.py +0 -0
  151. {webscout-6.6 → webscout-6.7}/webscout/Provider/typegpt.py +0 -0
  152. {webscout-6.6 → webscout-6.7}/webscout/Provider/x0gpt.py +0 -0
  153. {webscout-6.6 → webscout-6.7}/webscout/Provider/yep.py +0 -0
  154. {webscout-6.6 → webscout-6.7}/webscout/__init__.py +0 -0
  155. {webscout-6.6 → webscout-6.7}/webscout/__main__.py +0 -0
  156. {webscout-6.6 → webscout-6.7}/webscout/conversation.py +0 -0
  157. {webscout-6.6 → webscout-6.7}/webscout/exceptions.py +0 -0
  158. {webscout-6.6 → webscout-6.7}/webscout/litagent/__init__.py +0 -0
  159. {webscout-6.6 → webscout-6.7}/webscout/litprinter/colors.py +0 -0
  160. {webscout-6.6 → webscout-6.7}/webscout/optimizers.py +0 -0
  161. {webscout-6.6 → webscout-6.7}/webscout/prompt_manager.py +0 -0
  162. {webscout-6.6 → webscout-6.7}/webscout/scout/__init__.py +0 -0
  163. {webscout-6.6 → webscout-6.7}/webscout/scout/core/__init__.py +0 -0
  164. {webscout-6.6 → webscout-6.7}/webscout/scout/core/crawler.py +0 -0
  165. {webscout-6.6 → webscout-6.7}/webscout/scout/core/scout.py +0 -0
  166. {webscout-6.6 → webscout-6.7}/webscout/scout/core/search_result.py +0 -0
  167. {webscout-6.6 → webscout-6.7}/webscout/scout/core/text_analyzer.py +0 -0
  168. {webscout-6.6 → webscout-6.7}/webscout/scout/core/text_utils.py +0 -0
  169. {webscout-6.6 → webscout-6.7}/webscout/scout/core/web_analyzer.py +0 -0
  170. {webscout-6.6 → webscout-6.7}/webscout/scout/core.py +0 -0
  171. {webscout-6.6 → webscout-6.7}/webscout/scout/element.py +0 -0
  172. {webscout-6.6 → webscout-6.7}/webscout/scout/parsers/__init__.py +0 -0
  173. {webscout-6.6 → webscout-6.7}/webscout/scout/parsers/html5lib_parser.py +0 -0
  174. {webscout-6.6 → webscout-6.7}/webscout/scout/parsers/html_parser.py +0 -0
  175. {webscout-6.6 → webscout-6.7}/webscout/scout/parsers/lxml_parser.py +0 -0
  176. {webscout-6.6 → webscout-6.7}/webscout/scout/utils.py +0 -0
  177. {webscout-6.6 → webscout-6.7}/webscout/swiftcli/__init__.py +0 -0
  178. {webscout-6.6 → webscout-6.7}/webscout/tempid.py +0 -0
  179. {webscout-6.6 → webscout-6.7}/webscout/update_checker.py +0 -0
  180. {webscout-6.6 → webscout-6.7}/webscout/utils.py +0 -0
  181. {webscout-6.6 → webscout-6.7}/webscout/webscout_search_async.py +0 -0
  182. {webscout-6.6 → webscout-6.7}/webscout/zeroart/__init__.py +0 -0
  183. {webscout-6.6 → webscout-6.7}/webscout/zeroart/base.py +0 -0
  184. {webscout-6.6 → webscout-6.7}/webscout/zeroart/effects.py +0 -0
  185. {webscout-6.6 → webscout-6.7}/webscout/zeroart/fonts.py +0 -0
  186. {webscout-6.6 → webscout-6.7}/webscout/zerodir/__init__.py +0 -0
  187. {webscout-6.6 → webscout-6.7}/webscout.egg-info/SOURCES.txt +0 -0
  188. {webscout-6.6 → webscout-6.7}/webscout.egg-info/dependency_links.txt +0 -0
  189. {webscout-6.6 → webscout-6.7}/webscout.egg-info/requires.txt +0 -0
  190. {webscout-6.6 → webscout-6.7}/webscout.egg-info/top_level.txt +0 -0
  191. {webscout-6.6 → webscout-6.7}/webstoken/__init__.py +0 -0
  192. {webscout-6.6 → webscout-6.7}/webstoken/classifier.py +0 -0
  193. {webscout-6.6 → webscout-6.7}/webstoken/keywords.py +0 -0
  194. {webscout-6.6 → webscout-6.7}/webstoken/language.py +0 -0
  195. {webscout-6.6 → webscout-6.7}/webstoken/ner.py +0 -0
  196. {webscout-6.6 → webscout-6.7}/webstoken/normalizer.py +0 -0
  197. {webscout-6.6 → webscout-6.7}/webstoken/processor.py +0 -0
  198. {webscout-6.6 → webscout-6.7}/webstoken/sentiment.py +0 -0
  199. {webscout-6.6 → webscout-6.7}/webstoken/stemmer.py +0 -0
  200. {webscout-6.6 → webscout-6.7}/webstoken/t.py +0 -0
  201. {webscout-6.6 → webscout-6.7}/webstoken/tagger.py +0 -0
  202. {webscout-6.6 → webscout-6.7}/webstoken/tokenizer.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: webscout
3
- Version: 6.6
3
+ Version: 6.7
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
@@ -232,7 +232,7 @@ python -m webscout --help
232
232
  ```python
233
233
  from webscout import weather as w
234
234
  weather = w.get("Qazigund")
235
- w.print_weather(weather)
235
+ print(weather)
236
236
  ```
237
237
 
238
238
  ### 2. Weather ASCII
@@ -1321,12 +1321,6 @@ autollama.main(model_path, gguf_file)
1321
1321
  * The `model_path` in `autollama` is the Hugging Face model ID, and `gguf_file` is the GGUF file ID.
1322
1322
 
1323
1323
 
1324
- ## 🌐 `Webai` - Terminal GPT and an Open Interpreter
1325
-
1326
- ```bash
1327
- python -m webscout.webai webai --provider "phind" --rawdog
1328
- ```
1329
-
1330
1324
  <div align="center">
1331
1325
  <!-- Replace `#` with your actual links -->
1332
1326
  <a href="https://t.me/official_helpingai"><img alt="Telegram" src="https://img.shields.io/badge/Telegram-2CA5E0?style=for-the-badge&logo=telegram&logoColor=white"></a>
@@ -166,7 +166,7 @@ python -m webscout --help
166
166
  ```python
167
167
  from webscout import weather as w
168
168
  weather = w.get("Qazigund")
169
- w.print_weather(weather)
169
+ print(weather)
170
170
  ```
171
171
 
172
172
  ### 2. Weather ASCII
@@ -1255,12 +1255,6 @@ autollama.main(model_path, gguf_file)
1255
1255
  * The `model_path` in `autollama` is the Hugging Face model ID, and `gguf_file` is the GGUF file ID.
1256
1256
 
1257
1257
 
1258
- ## 🌐 `Webai` - Terminal GPT and an Open Interpreter
1259
-
1260
- ```bash
1261
- python -m webscout.webai webai --provider "phind" --rawdog
1262
- ```
1263
-
1264
1258
  <div align="center">
1265
1259
  <!-- Replace `#` with your actual links -->
1266
1260
  <a href="https://t.me/official_helpingai"><img alt="Telegram" src="https://img.shields.io/badge/Telegram-2CA5E0?style=for-the-badge&logo=telegram&logoColor=white"></a>
@@ -66,7 +66,7 @@ setup(
66
66
  entry_points={
67
67
  "console_scripts": [
68
68
  "WEBS = webscout.cli:cli",
69
- "webscout = webscout.webai:main",
69
+ "webscout = webscout.cli:cli",
70
70
  ],
71
71
  },
72
72
  extras_require={
@@ -16,7 +16,7 @@ from rich.columns import Columns
16
16
  # Initialize Rich console with force terminal
17
17
  console = Console(force_terminal=True)
18
18
 
19
- def get_weather_emoji(condition: str) -> str:
19
+ def get_emoji(condition: str) -> str:
20
20
  """Get appropriate emoji for weather condition"""
21
21
  conditions = {
22
22
  'sunny': '*', 'clear': '*',
@@ -61,7 +61,7 @@ def create_current_weather_panel(data):
61
61
  location_name = f"{location['areaName'][0]['value']}, {location['country'][0]['value']}"
62
62
 
63
63
  weather_desc = current['weatherDesc'][0]['value']
64
- symbol = get_weather_emoji(weather_desc)
64
+ symbol = get_emoji(weather_desc)
65
65
 
66
66
  # Create weather info table
67
67
  table = Table(show_header=False, box=box.ROUNDED, expand=True)
@@ -98,7 +98,7 @@ def create_forecast_panel(data):
98
98
  # Get mid-day conditions (noon)
99
99
  noon = day['hourly'][4]
100
100
  condition = noon['weatherDesc'][0]['value']
101
- symbol = get_weather_emoji(condition)
101
+ symbol = get_emoji(condition)
102
102
  temp_range = f"{day['mintempC']}° - {day['maxtempC']}°"
103
103
  rain_chance = f"v {noon['chanceofrain']}%"
104
104
  wind = f"> {noon['windspeedKmph']} km/h"
@@ -113,7 +113,7 @@ def create_forecast_panel(data):
113
113
 
114
114
  return Panel(table, title="[bold]3-Day Forecast[/]", border_style="blue")
115
115
 
116
- def get_weather(location: str):
116
+ def get(location: str):
117
117
  """Get weather data with progress indicator"""
118
118
  with Progress(
119
119
  SpinnerColumn(),
@@ -159,7 +159,7 @@ def main():
159
159
  console.print("\n[bold cyan]* Weather Information[/]\n")
160
160
  location = console.input("[cyan]Enter location: [/]")
161
161
 
162
- weather_data = get_weather(location)
162
+ weather_data = get(location)
163
163
  if weather_data:
164
164
  display_weather(weather_data)
165
165
 
@@ -1,235 +1,239 @@
1
- import time
2
- import uuid
3
- import requests
4
- import json
5
-
6
- from typing import Any, Dict, Optional, Generator, Union
7
- from dataclasses import dataclass, asdict
8
- from datetime import date
9
-
10
- from webscout.AIutel import Optimizers, Conversation, AwesomePrompts
11
- from webscout.AIbase import Provider
12
- from webscout import exceptions
13
- from webscout.Litlogger import LitLogger, LogFormat, ColorScheme
14
- from webscout.litagent import LitAgent
15
-
16
-
17
- class Netwrck(Provider):
18
- """
19
- A class to interact with the Netwrck.com API. Supports streaming.
20
- """
21
-
22
- AVAILABLE_MODELS = {
23
- "lumimaid": "neversleep/llama-3.1-lumimaid-8b",
24
- "grok": "x-ai/grok-2",
25
- "claude": "anthropic/claude-3.5-sonnet:beta",
26
- "euryale": "sao10k/l3-euryale-70b",
27
- "gpt4mini": "openai/gpt-4o-mini",
28
- "mythomax": "gryphe/mythomax-l2-13b",
29
- "gemini": "google/gemini-pro-1.5",
30
- "lumimaid70b": "neversleep/llama-3.1-lumimaid-70b",
31
- "nemotron": "nvidia/llama-3.1-nemotron-70b-instruct",
32
- }
33
-
34
- def __init__(
35
- self,
36
- model: str = "lumimaid",
37
- is_conversation: bool = True,
38
- max_tokens: int = 2048,
39
- timeout: int = 30,
40
- intro: Optional[str] = None,
41
- filepath: Optional[str] = None,
42
- update_file: bool = False,
43
- proxies: Optional[dict] = None,
44
- history_offset: int = 0,
45
- act: Optional[str] = None,
46
- system_prompt: str = "You are a helpful assistant.",
47
- temperature: float = 0.7,
48
- top_p: float = 0.8,
49
- logging: bool = False
50
- ):
51
- """Initializes the Netwrck API client."""
52
- if model not in self.AVAILABLE_MODELS:
53
- raise ValueError(f"Invalid model: {model}. Choose from: {list(self.AVAILABLE_MODELS.keys())}")
54
-
55
- self.model = model
56
- self.model_name = self.AVAILABLE_MODELS[model]
57
- self.system_prompt = system_prompt
58
- self.session = requests.Session()
59
- self.is_conversation = is_conversation
60
- self.max_tokens_to_sample = max_tokens
61
- self.timeout = timeout
62
- self.last_response: Dict[str, Any] = {}
63
- self.temperature = temperature
64
- self.top_p = top_p
65
-
66
- # Initialize LitAgent for user agent generation
67
- self.agent = LitAgent()
68
-
69
- self.headers = {
70
- 'authority': 'netwrck.com',
71
- 'accept': '*/*',
72
- 'accept-language': 'en-US,en;q=0.9',
73
- 'content-type': 'application/json',
74
- 'origin': 'https://netwrck.com',
75
- 'referer': 'https://netwrck.com/',
76
- 'user-agent': self.agent.random()
77
- }
78
- self.session.headers.update(self.headers)
79
- self.proxies = proxies or {}
80
-
81
- Conversation.intro = (
82
- AwesomePrompts().get_act(act, raise_not_found=True, default=None, case_insensitive=True)
83
- if act
84
- else intro or Conversation.intro
85
- )
86
- self.conversation = Conversation(is_conversation, max_tokens, filepath, update_file)
87
- self.conversation.history_offset = history_offset
88
- self.__available_optimizers = (
89
- method
90
- for method in dir(Optimizers)
91
- if callable(getattr(Optimizers, method)) and not method.startswith("__")
92
- )
93
-
94
- # Initialize logger
95
- self.logger = LitLogger(name="Netwrck", format=LogFormat.MODERN_EMOJI, color_scheme=ColorScheme.CYBERPUNK) if logging else None
96
-
97
-
98
- def ask(
99
- self,
100
- prompt: str,
101
- stream: bool = False,
102
- raw: bool = False,
103
- optimizer: Optional[str] = None,
104
- conversationally: bool = False,
105
- ) -> Union[Dict[str, Any], Generator]:
106
- """Sends a prompt to the Netwrck API and returns the response."""
107
-
108
- if self.logger:
109
- self.logger.debug(f"ask() called with prompt: {prompt}")
110
-
111
- conversation_prompt = self.conversation.gen_complete_prompt(prompt)
112
- if optimizer:
113
- if optimizer in self.__available_optimizers:
114
- conversation_prompt = getattr(Optimizers, optimizer)(
115
- conversation_prompt if conversationally else prompt
116
- )
117
- else:
118
- if self.logger:
119
- self.logger.error(f"Invalid optimizer: {optimizer}")
120
- raise exceptions.FailedToGenerateResponseError(
121
- f"Optimizer is not one of {self.__available_optimizers}"
122
- )
123
-
124
- payload = {
125
- "query": conversation_prompt,
126
- "context": self.system_prompt,
127
- "examples": [],
128
- "model_name": self.model_name,
129
- "temperature": self.temperature,
130
- "top_p": self.top_p,
131
- }
132
-
133
-
134
- def for_stream():
135
- try:
136
- response = self.session.post(
137
- "https://netwrck.com/api/chatpred_or",
138
- json=payload,
139
- headers=self.headers,
140
- proxies=self.proxies,
141
- timeout=self.timeout,
142
- stream=True,
143
- )
144
- response.raise_for_status()
145
-
146
- streaming_text = ""
147
- for line in response.iter_lines():
148
- if line:
149
- decoded_line = line.decode('utf-8').strip('"')
150
- streaming_text += decoded_line
151
- yield {"text": decoded_line} if not raw else decoded_line
152
-
153
- self.conversation.update_chat_history(prompt, streaming_text)
154
-
155
- except Exception as e:
156
- if self.logger:
157
- self.logger.error(f"Error communicating with Netwrck: {e}")
158
- raise exceptions.ProviderConnectionError(f"Error communicating with Netwrck: {e}") from e
159
-
160
- def for_non_stream():
161
- try:
162
- response = self.session.post(
163
- "https://netwrck.com/api/chatpred_or",
164
- json=payload,
165
- headers=self.headers,
166
- proxies=self.proxies,
167
- timeout=self.timeout,
168
- )
169
- response.raise_for_status()
170
- print(response.text)
171
- text = response.text.strip('"')
172
- self.last_response = {"text": text}
173
- self.conversation.update_chat_history(prompt, text)
174
-
175
- return self.last_response
176
- except Exception as e:
177
- if self.logger:
178
- self.logger.error(f"Error communicating with Netwrck: {e}")
179
- raise exceptions.ProviderConnectionError(f"Error communicating with Netwrck: {e}") from e
180
-
181
- return for_stream() if stream else for_non_stream()
182
-
183
- def chat(
184
- self,
185
- prompt: str,
186
- stream: bool = False,
187
- optimizer: Optional[str] = None,
188
- conversationally: bool = False,
189
- ) -> str:
190
- """Generates a response from the Netwrck API."""
191
- if self.logger:
192
- self.logger.debug(f"chat() called with prompt: {prompt}")
193
-
194
- def for_stream():
195
- for response in self.ask(
196
- prompt,
197
- stream=True,
198
- optimizer=optimizer,
199
- conversationally=conversationally
200
- ):
201
- yield self.get_message(response)
202
-
203
- def for_non_stream():
204
- return self.get_message(
205
- self.ask(
206
- prompt,
207
- stream=False,
208
- optimizer=optimizer,
209
- conversationally=conversationally,
210
- )
211
- )
212
-
213
- return for_stream() if stream else for_non_stream()
214
-
215
- def get_message(self, response: Dict[str, Any]) -> str:
216
- """Retrieves message only from response"""
217
- assert isinstance(response, dict), "Response should be of dict data-type only"
218
- return response["text"]
219
-
220
- # Example Usage:
221
- if __name__ == "__main__":
222
- from rich import print
223
-
224
- # Non-streaming example
225
- print("Non-Streaming Response:")
226
- netwrck = Netwrck(model="lumimaid", logging=True)
227
- response = netwrck.chat("What is the capital of France?")
228
- print(response)
229
-
230
- # Streaming example
231
- print("\nStreaming Response:")
232
- response = netwrck.chat("tell me about india", stream=True)
233
- for chunk in response:
234
- print(chunk, end="", flush=True)
1
+ import time
2
+ import uuid
3
+ import requests
4
+ import json
5
+
6
+ from typing import Any, Dict, Optional, Generator, Union
7
+ from dataclasses import dataclass, asdict
8
+ from datetime import date
9
+
10
+ from webscout.AIutel import Optimizers, Conversation, AwesomePrompts
11
+ from webscout.AIbase import Provider
12
+ from webscout import exceptions
13
+ from webscout.Litlogger import LitLogger, LogFormat, ColorScheme
14
+ from webscout.litagent import LitAgent
15
+
16
+
17
+ class Netwrck(Provider):
18
+ """
19
+ A class to interact with the Netwrck.com API. Supports streaming.
20
+ """
21
+ greeting = """An unknown multiverse phenomenon occurred, and you found yourself in a dark space. You looked around and found a source of light in a distance. You approached the light and *whoosh*....\nChoose your origin:\na) As a baby who just got birthed, your fate unknown\nb) As an amnesic stranded on an uninhabited island with mysterious ruins\nc) As an abandoned product of a forbidden experiment\nd) As a slave being sold at an auction\ne) Extremely Chaotic Randomizer\nOr, dive into your own fantasy."""
22
+
23
+ AVAILABLE_MODELS = {
24
+ "lumimaid": "neversleep/llama-3.1-lumimaid-8b",
25
+ "grok": "x-ai/grok-2",
26
+ "claude": "anthropic/claude-3.5-sonnet:beta",
27
+ "euryale": "sao10k/l3-euryale-70b",
28
+ "gpt4mini": "openai/gpt-4o-mini",
29
+ "mythomax": "gryphe/mythomax-l2-13b",
30
+ "gemini": "google/gemini-pro-1.5",
31
+ "lumimaid70b": "neversleep/llama-3.1-lumimaid-70b",
32
+ "nemotron": "nvidia/llama-3.1-nemotron-70b-instruct",
33
+ }
34
+
35
+ def __init__(
36
+ self,
37
+ model: str = "claude",
38
+ is_conversation: bool = True,
39
+ max_tokens: int = 2048,
40
+ timeout: int = 30,
41
+ intro: Optional[str] = None,
42
+ filepath: Optional[str] = None,
43
+ update_file: bool = False,
44
+ proxies: Optional[dict] = None,
45
+ history_offset: int = 0,
46
+ act: Optional[str] = None,
47
+ system_prompt: str = "You are a helpful assistant.",
48
+ temperature: float = 0.7,
49
+ top_p: float = 0.8,
50
+ logging: bool = False
51
+ ):
52
+ """Initializes the Netwrck API client."""
53
+ if model not in self.AVAILABLE_MODELS:
54
+ raise ValueError(f"Invalid model: {model}. Choose from: {list(self.AVAILABLE_MODELS.keys())}")
55
+
56
+ self.model = model
57
+ self.model_name = self.AVAILABLE_MODELS[model]
58
+ self.system_prompt = system_prompt
59
+ self.session = requests.Session()
60
+ self.is_conversation = is_conversation
61
+ self.max_tokens_to_sample = max_tokens
62
+ self.timeout = timeout
63
+ self.last_response: Dict[str, Any] = {}
64
+ self.temperature = temperature
65
+ self.top_p = top_p
66
+
67
+ # Initialize LitAgent for user agent generation
68
+ self.agent = LitAgent()
69
+
70
+ self.headers = {
71
+ 'authority': 'netwrck.com',
72
+ 'accept': '*/*',
73
+ 'accept-language': 'en-US,en;q=0.9',
74
+ 'content-type': 'application/json',
75
+ 'origin': 'https://netwrck.com',
76
+ 'referer': 'https://netwrck.com/',
77
+ 'user-agent': self.agent.random()
78
+ }
79
+ self.session.headers.update(self.headers)
80
+ self.proxies = proxies or {}
81
+
82
+ Conversation.intro = (
83
+ AwesomePrompts().get_act(act, raise_not_found=True, default=None, case_insensitive=True)
84
+ if act
85
+ else intro or Conversation.intro
86
+ )
87
+ self.conversation = Conversation(is_conversation, max_tokens, filepath, update_file)
88
+ self.conversation.history_offset = history_offset
89
+ self.__available_optimizers = (
90
+ method
91
+ for method in dir(Optimizers)
92
+ if callable(getattr(Optimizers, method)) and not method.startswith("__")
93
+ )
94
+
95
+ # Initialize logger
96
+ self.logger = LitLogger(name="Netwrck", format=LogFormat.MODERN_EMOJI, color_scheme=ColorScheme.CYBERPUNK) if logging else None
97
+
98
+ def ask(
99
+ self,
100
+ prompt: str,
101
+ stream: bool = False,
102
+ raw: bool = False,
103
+ optimizer: Optional[str] = None,
104
+ conversationally: bool = False,
105
+ ) -> Union[Dict[str, Any], Generator]:
106
+ """Sends a prompt to the Netwrck API and returns the response."""
107
+
108
+ if self.logger:
109
+ self.logger.debug(f"ask() called with prompt: {prompt}")
110
+
111
+ conversation_prompt = self.conversation.gen_complete_prompt(prompt)
112
+ if optimizer:
113
+ if optimizer in self.__available_optimizers:
114
+ conversation_prompt = getattr(Optimizers, optimizer)(
115
+ conversation_prompt if conversationally else prompt
116
+ )
117
+ else:
118
+ if self.logger:
119
+ self.logger.error(f"Invalid optimizer: {optimizer}")
120
+ raise exceptions.FailedToGenerateResponseError(
121
+ f"Optimizer is not one of {self.__available_optimizers}"
122
+ )
123
+ payload = {
124
+ "query": prompt,
125
+ "context": self.system_prompt,
126
+ "examples": [],
127
+ "model_name": self.model_name,
128
+ "greeting": self.greeting
129
+ }
130
+
131
+ def for_stream():
132
+ try:
133
+ response = self.session.post(
134
+ "https://netwrck.com/api/chatpred_or",
135
+ json=payload,
136
+ headers=self.headers,
137
+ proxies=self.proxies,
138
+ timeout=self.timeout,
139
+ stream=True,
140
+ )
141
+ response.raise_for_status()
142
+
143
+ # Initialize an empty string to accumulate the streaming text
144
+ streaming_text = ""
145
+ for line in response.iter_lines():
146
+ if line:
147
+ decoded_line = line.decode('utf-8').strip('"')
148
+ streaming_text += decoded_line # Accumulate the text
149
+ yield {"text": decoded_line} # Yield each chunk
150
+
151
+ # Optionally, you can update the conversation history with the full streaming text
152
+ self.conversation.update_chat_history(payload["query"], streaming_text)
153
+
154
+ except Exception as e:
155
+ if self.logger:
156
+ self.logger.error(f"Error communicating with Netwrck: {e}")
157
+ raise exceptions.ProviderConnectionError(f"Error communicating with Netwrck: {e}") from e
158
+
159
+ except Exception as e:
160
+ if self.logger:
161
+ self.logger.error(f"Error communicating with Netwrck: {e}")
162
+ raise exceptions.ProviderConnectionError(f"Error communicating with Netwrck: {e}") from e
163
+
164
+ def for_non_stream():
165
+ try:
166
+ response = self.session.post(
167
+ "https://netwrck.com/api/chatpred_or",
168
+ json=payload,
169
+ headers=self.headers,
170
+ proxies=self.proxies,
171
+ timeout=self.timeout,
172
+ )
173
+ response.raise_for_status()
174
+ # print(response.text)
175
+ text = response.text.strip('"')
176
+ self.last_response = {"text": text}
177
+ self.conversation.update_chat_history(prompt, text)
178
+
179
+ return self.last_response
180
+ except Exception as e:
181
+ if self.logger:
182
+ self.logger.error(f"Error communicating with Netwrck: {e}")
183
+ raise exceptions.ProviderConnectionError(f"Error communicating with Netwrck: {e}") from e
184
+
185
+ return for_stream() if stream else for_non_stream()
186
+
187
+ def chat(
188
+ self,
189
+ prompt: str,
190
+ stream: bool = False,
191
+ optimizer: Optional[str] = None,
192
+ conversationally: bool = False,
193
+ ) -> str:
194
+ """Generates a response from the Netwrck API."""
195
+ if self.logger:
196
+ self.logger.debug(f"chat() called with prompt: {prompt}")
197
+
198
+ def for_stream():
199
+ for response in self.ask(
200
+ prompt,
201
+ stream=True,
202
+ optimizer=optimizer,
203
+ conversationally=conversationally
204
+ ):
205
+ yield self.get_message(response)
206
+
207
+ def for_non_stream():
208
+ return self.get_message(
209
+ self.ask(
210
+ prompt,
211
+ stream=False,
212
+ optimizer=optimizer,
213
+ conversationally=conversationally,
214
+ )
215
+ )
216
+
217
+ return for_stream() if stream else for_non_stream()
218
+
219
+ def get_message(self, response: Dict[str, Any]) -> str:
220
+ """Retrieves message only from response"""
221
+ assert isinstance(response, dict), "Response should be of dict data-type only"
222
+ return response["text"]
223
+
224
+ # Example Usage:
225
+ if __name__ == "__main__":
226
+ from rich import print
227
+
228
+ # Non-streaming example
229
+ print("Non-Streaming Response:")
230
+ netwrck = Netwrck(model="claude", logging=True)
231
+ response = netwrck.chat("tell me about Russia")
232
+ print(response)
233
+
234
+ # Streaming example
235
+ print("\nStreaming Response:")
236
+ response = netwrck.chat("tell me about India", stream=True)
237
+ for chunk in response:
238
+ print(chunk, end="", flush=True)
235
239
  print() # Add a newline at the end
@@ -248,7 +248,7 @@ def get_fb_session(email, password, proxies=None):
248
248
  return cookies
249
249
 
250
250
 
251
- def get_cookies() -> dict:
251
+ def get_cookies(self) -> dict:
252
252
  """
253
253
  Extracts necessary cookies from the Meta AI main page.
254
254