webscout 6.3__py3-none-any.whl → 6.5__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 (131) hide show
  1. webscout/AIauto.py +191 -176
  2. webscout/AIbase.py +0 -197
  3. webscout/AIutel.py +441 -1130
  4. webscout/DWEBS.py +189 -35
  5. webscout/{YTdownloader.py → Extra/YTToolkit/YTdownloader.py} +990 -1103
  6. webscout/Extra/YTToolkit/__init__.py +3 -0
  7. webscout/{transcriber.py → Extra/YTToolkit/transcriber.py} +479 -551
  8. webscout/Extra/YTToolkit/ytapi/__init__.py +6 -0
  9. webscout/Extra/YTToolkit/ytapi/channel.py +307 -0
  10. webscout/Extra/YTToolkit/ytapi/errors.py +13 -0
  11. webscout/Extra/YTToolkit/ytapi/extras.py +45 -0
  12. webscout/Extra/YTToolkit/ytapi/https.py +88 -0
  13. webscout/Extra/YTToolkit/ytapi/patterns.py +61 -0
  14. webscout/Extra/YTToolkit/ytapi/playlist.py +59 -0
  15. webscout/Extra/YTToolkit/ytapi/pool.py +8 -0
  16. webscout/Extra/YTToolkit/ytapi/query.py +37 -0
  17. webscout/Extra/YTToolkit/ytapi/stream.py +60 -0
  18. webscout/Extra/YTToolkit/ytapi/utils.py +62 -0
  19. webscout/Extra/YTToolkit/ytapi/video.py +102 -0
  20. webscout/Extra/__init__.py +3 -1
  21. webscout/Extra/autocoder/__init__.py +9 -0
  22. webscout/Extra/autocoder/autocoder_utiles.py +121 -0
  23. webscout/Extra/autocoder/rawdog.py +680 -0
  24. webscout/Extra/autollama.py +246 -195
  25. webscout/Extra/gguf.py +81 -56
  26. webscout/Extra/markdownlite/__init__.py +862 -0
  27. webscout/Extra/weather_ascii.py +2 -2
  28. webscout/LLM.py +206 -43
  29. webscout/Litlogger/__init__.py +681 -0
  30. webscout/Provider/DARKAI.py +1 -1
  31. webscout/Provider/EDITEE.py +1 -1
  32. webscout/Provider/NinjaChat.py +1 -1
  33. webscout/Provider/PI.py +120 -35
  34. webscout/Provider/Perplexity.py +590 -598
  35. webscout/Provider/Reka.py +0 -1
  36. webscout/Provider/RoboCoders.py +206 -0
  37. webscout/Provider/TTI/AiForce/__init__.py +22 -0
  38. webscout/Provider/TTI/AiForce/async_aiforce.py +257 -0
  39. webscout/Provider/TTI/AiForce/sync_aiforce.py +242 -0
  40. webscout/Provider/TTI/Nexra/__init__.py +22 -0
  41. webscout/Provider/TTI/Nexra/async_nexra.py +286 -0
  42. webscout/Provider/TTI/Nexra/sync_nexra.py +258 -0
  43. webscout/Provider/TTI/PollinationsAI/__init__.py +23 -0
  44. webscout/Provider/TTI/PollinationsAI/async_pollinations.py +330 -0
  45. webscout/Provider/TTI/PollinationsAI/sync_pollinations.py +285 -0
  46. webscout/Provider/TTI/__init__.py +2 -4
  47. webscout/Provider/TTI/artbit/__init__.py +22 -0
  48. webscout/Provider/TTI/artbit/async_artbit.py +184 -0
  49. webscout/Provider/TTI/artbit/sync_artbit.py +176 -0
  50. webscout/Provider/TTI/blackbox/__init__.py +4 -0
  51. webscout/Provider/TTI/blackbox/async_blackbox.py +212 -0
  52. webscout/Provider/TTI/{blackboximage.py → blackbox/sync_blackbox.py} +199 -153
  53. webscout/Provider/TTI/deepinfra/__init__.py +4 -0
  54. webscout/Provider/TTI/deepinfra/async_deepinfra.py +227 -0
  55. webscout/Provider/TTI/deepinfra/sync_deepinfra.py +199 -0
  56. webscout/Provider/TTI/huggingface/__init__.py +22 -0
  57. webscout/Provider/TTI/huggingface/async_huggingface.py +199 -0
  58. webscout/Provider/TTI/huggingface/sync_huggingface.py +195 -0
  59. webscout/Provider/TTI/imgninza/__init__.py +4 -0
  60. webscout/Provider/TTI/imgninza/async_ninza.py +214 -0
  61. webscout/Provider/TTI/{imgninza.py → imgninza/sync_ninza.py} +209 -136
  62. webscout/Provider/TTI/talkai/__init__.py +4 -0
  63. webscout/Provider/TTI/talkai/async_talkai.py +229 -0
  64. webscout/Provider/TTI/talkai/sync_talkai.py +207 -0
  65. webscout/Provider/TTS/__init__.py +5 -1
  66. webscout/Provider/TTS/deepgram.py +183 -0
  67. webscout/Provider/TTS/elevenlabs.py +137 -0
  68. webscout/Provider/TTS/gesserit.py +151 -0
  69. webscout/Provider/TTS/murfai.py +139 -0
  70. webscout/Provider/TTS/parler.py +134 -107
  71. webscout/Provider/TTS/streamElements.py +360 -275
  72. webscout/Provider/TTS/utils.py +280 -0
  73. webscout/Provider/TTS/voicepod.py +116 -116
  74. webscout/Provider/__init__.py +8 -1
  75. webscout/Provider/askmyai.py +2 -2
  76. webscout/Provider/cerebras.py +227 -219
  77. webscout/Provider/llama3mitril.py +0 -1
  78. webscout/Provider/meta.py +794 -779
  79. webscout/Provider/mhystical.py +176 -0
  80. webscout/Provider/perplexitylabs.py +265 -0
  81. webscout/Provider/twitterclone.py +251 -245
  82. webscout/Provider/typegpt.py +358 -0
  83. webscout/__init__.py +9 -8
  84. webscout/__main__.py +5 -5
  85. webscout/cli.py +252 -280
  86. webscout/conversation.py +227 -0
  87. webscout/exceptions.py +161 -29
  88. webscout/litagent/__init__.py +172 -0
  89. webscout/litprinter/__init__.py +832 -0
  90. webscout/optimizers.py +270 -0
  91. webscout/prompt_manager.py +279 -0
  92. webscout/scout/__init__.py +11 -0
  93. webscout/scout/core.py +884 -0
  94. webscout/scout/element.py +459 -0
  95. webscout/scout/parsers/__init__.py +69 -0
  96. webscout/scout/parsers/html5lib_parser.py +172 -0
  97. webscout/scout/parsers/html_parser.py +236 -0
  98. webscout/scout/parsers/lxml_parser.py +178 -0
  99. webscout/scout/utils.py +38 -0
  100. webscout/swiftcli/__init__.py +810 -0
  101. webscout/update_checker.py +125 -0
  102. webscout/version.py +1 -1
  103. webscout/zeroart/__init__.py +55 -0
  104. webscout/zeroart/base.py +61 -0
  105. webscout/zeroart/effects.py +99 -0
  106. webscout/zeroart/fonts.py +816 -0
  107. webscout/zerodir/__init__.py +225 -0
  108. {webscout-6.3.dist-info → webscout-6.5.dist-info}/METADATA +37 -112
  109. webscout-6.5.dist-info/RECORD +179 -0
  110. webscout/Agents/Onlinesearcher.py +0 -182
  111. webscout/Agents/__init__.py +0 -2
  112. webscout/Agents/functioncall.py +0 -248
  113. webscout/Bing_search.py +0 -154
  114. webscout/Provider/TTI/AIuncensoredimage.py +0 -103
  115. webscout/Provider/TTI/Nexra.py +0 -120
  116. webscout/Provider/TTI/PollinationsAI.py +0 -138
  117. webscout/Provider/TTI/WebSimAI.py +0 -142
  118. webscout/Provider/TTI/aiforce.py +0 -160
  119. webscout/Provider/TTI/artbit.py +0 -141
  120. webscout/Provider/TTI/deepinfra.py +0 -148
  121. webscout/Provider/TTI/huggingface.py +0 -155
  122. webscout/Provider/TTI/talkai.py +0 -116
  123. webscout/g4f.py +0 -666
  124. webscout/models.py +0 -23
  125. webscout/requestsHTMLfix.py +0 -775
  126. webscout/webai.py +0 -2590
  127. webscout-6.3.dist-info/RECORD +0 -124
  128. {webscout-6.3.dist-info → webscout-6.5.dist-info}/LICENSE.md +0 -0
  129. {webscout-6.3.dist-info → webscout-6.5.dist-info}/WHEEL +0 -0
  130. {webscout-6.3.dist-info → webscout-6.5.dist-info}/entry_points.txt +0 -0
  131. {webscout-6.3.dist-info → webscout-6.5.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,225 @@
1
+ """
2
+ ZeroDir: A zero-dependency app directories management library
3
+
4
+ Provides cross-platform directory management for application data,
5
+ configuration, and cache without external dependencies.
6
+ """
7
+
8
+ import os
9
+ import sys
10
+ import json
11
+ import platform
12
+ import tempfile
13
+ import shutil
14
+ import hashlib
15
+ import time
16
+ import datetime
17
+
18
+ class ZeroDirs:
19
+ def __init__(self, app_name, app_author=None):
20
+ """
21
+ Initialize ZeroDirs with application details
22
+
23
+ :param app_name: Name of the application
24
+ :param app_author: Author/Company name (optional)
25
+ """
26
+ self.app_name = app_name
27
+ self.app_author = app_author or os.getlogin()
28
+ self._init_dirs()
29
+
30
+ def _init_dirs(self):
31
+ """Initialize application directories"""
32
+ self.user_data_dir = self._get_user_data_dir()
33
+ self.user_config_dir = self._get_user_config_dir()
34
+ self.user_cache_dir = self._get_user_cache_dir()
35
+ self.user_log_dir = self._get_user_log_dir()
36
+ self.temp_dir = self._get_temp_dir()
37
+
38
+ # Create directories if they don't exist
39
+ for directory in [
40
+ self.user_data_dir,
41
+ self.user_config_dir,
42
+ self.user_cache_dir,
43
+ self.user_log_dir,
44
+ self.temp_dir
45
+ ]:
46
+ os.makedirs(directory, exist_ok=True)
47
+
48
+ def _get_user_data_dir(self):
49
+ """Get user data directory"""
50
+ system = platform.system().lower()
51
+ if system == 'windows':
52
+ base = os.path.expandvars('%LOCALAPPDATA%')
53
+ return os.path.join(base, self.app_author, self.app_name)
54
+ elif system == 'darwin': # macOS
55
+ return os.path.expanduser(f'~/Library/Application Support/{self.app_name}')
56
+ else: # Linux and other Unix-like
57
+ xdg_data_home = os.environ.get('XDG_DATA_HOME') or os.path.expanduser('~/.local/share')
58
+ return os.path.join(xdg_data_home, self.app_name)
59
+
60
+ def _get_user_config_dir(self):
61
+ """Get user configuration directory"""
62
+ system = platform.system().lower()
63
+ if system == 'windows':
64
+ base = os.path.expandvars('%APPDATA%')
65
+ return os.path.join(base, self.app_author, self.app_name)
66
+ elif system == 'darwin': # macOS
67
+ return os.path.expanduser(f'~/Library/Preferences/{self.app_name}')
68
+ else: # Linux and other Unix-like
69
+ xdg_config_home = os.environ.get('XDG_CONFIG_HOME') or os.path.expanduser('~/.config')
70
+ return os.path.join(xdg_config_home, self.app_name)
71
+
72
+ def _get_user_cache_dir(self):
73
+ """Get user cache directory"""
74
+ system = platform.system().lower()
75
+ if system == 'windows':
76
+ base = os.path.expandvars('%LOCALAPPDATA%')
77
+ return os.path.join(base, self.app_author, self.app_name, 'Cache')
78
+ elif system == 'darwin': # macOS
79
+ return os.path.expanduser(f'~/Library/Caches/{self.app_name}')
80
+ else: # Linux and other Unix-like
81
+ xdg_cache_home = os.environ.get('XDG_CACHE_HOME') or os.path.expanduser('~/.cache')
82
+ return os.path.join(xdg_cache_home, self.app_name)
83
+
84
+ def _get_user_log_dir(self):
85
+ """Get user log directory"""
86
+ system = platform.system().lower()
87
+ if system == 'windows':
88
+ base = os.path.expandvars('%LOCALAPPDATA%')
89
+ return os.path.join(base, self.app_author, self.app_name, 'Logs')
90
+ elif system == 'darwin': # macOS
91
+ return os.path.expanduser(f'~/Library/Logs/{self.app_name}')
92
+ else: # Linux and other Unix-like
93
+ xdg_data_home = os.environ.get('XDG_DATA_HOME') or os.path.expanduser('~/.local/share')
94
+ return os.path.join(xdg_data_home, self.app_name, 'logs')
95
+
96
+ def _get_temp_dir(self):
97
+ """Get temporary directory for the application"""
98
+ return os.path.join(tempfile.gettempdir(), f'{self.app_name}_temp')
99
+
100
+ def save_config(self, config_data, filename='config.json'):
101
+ """
102
+ Save configuration data to config directory
103
+
104
+ :param config_data: Dictionary of configuration data
105
+ :param filename: Name of the config file (default: config.json)
106
+ :return: Path to saved config file
107
+ """
108
+ config_path = os.path.join(self.user_config_dir, filename)
109
+ with open(config_path, 'w') as f:
110
+ json.dump(config_data, f, indent=4)
111
+ return config_path
112
+
113
+ def load_config(self, filename='config.json'):
114
+ """
115
+ Load configuration data from config directory
116
+
117
+ :param filename: Name of the config file (default: config.json)
118
+ :return: Dictionary of configuration data or None if file doesn't exist
119
+ """
120
+ config_path = os.path.join(self.user_config_dir, filename)
121
+ if os.path.exists(config_path):
122
+ with open(config_path, 'r') as f:
123
+ return json.load(f)
124
+ return None
125
+
126
+ def cache_file(self, content, filename=None, extension=None):
127
+ """
128
+ Cache a file with optional naming and extension
129
+
130
+ :param content: File content or bytes
131
+ :param filename: Optional custom filename
132
+ :param extension: Optional file extension
133
+ :return: Path to cached file
134
+ """
135
+ if not filename:
136
+ # Generate a hash-based filename if not provided
137
+ content_hash = hashlib.md5(str(content).encode()).hexdigest()
138
+ filename = f'{content_hash}{extension or ""}'
139
+
140
+ cache_path = os.path.join(self.user_cache_dir, filename)
141
+
142
+ # Write content to file
143
+ with open(cache_path, 'wb' if isinstance(content, bytes) else 'w') as f:
144
+ f.write(content)
145
+
146
+ return cache_path
147
+
148
+ def clear_cache(self, max_age_days=30):
149
+ """
150
+ Clear cache directory, optionally removing files older than max_age_days
151
+
152
+ :param max_age_days: Maximum age of files to keep (default: 30 days)
153
+ :return: Number of files deleted
154
+ """
155
+ current_time = time.time()
156
+
157
+ deleted_count = 0
158
+ for filename in os.listdir(self.user_cache_dir):
159
+ filepath = os.path.join(self.user_cache_dir, filename)
160
+
161
+ # Check file age
162
+ file_age_days = (current_time - os.path.getctime(filepath)) / (24 * 3600)
163
+
164
+ if file_age_days > max_age_days:
165
+ try:
166
+ os.remove(filepath)
167
+ deleted_count += 1
168
+ except Exception:
169
+ pass
170
+
171
+ return deleted_count
172
+
173
+ def log(self, message, filename='app.log', level='INFO'):
174
+ """
175
+ Log a message to the log directory
176
+
177
+ :param message: Log message
178
+ :param filename: Log filename (default: app.log)
179
+ :param level: Log level (default: INFO)
180
+ """
181
+ log_path = os.path.join(self.user_log_dir, filename)
182
+
183
+ with open(log_path, 'a') as log_file:
184
+ timestamp = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')
185
+ log_file.write(f'[{level}] {timestamp}: {message}\n')
186
+
187
+ def user_data_dir(app_name, app_author=None):
188
+ """
189
+ Quick function to get user data directory
190
+
191
+ :param app_name: Name of the application
192
+ :param app_author: Author/Company name (optional)
193
+ :return: Path to user data directory
194
+ """
195
+ return ZeroDirs(app_name, app_author).user_data_dir
196
+
197
+ def user_config_dir(app_name, app_author=None):
198
+ """
199
+ Quick function to get user config directory
200
+
201
+ :param app_name: Name of the application
202
+ :param app_author: Author/Company name (optional)
203
+ :return: Path to user config directory
204
+ """
205
+ return ZeroDirs(app_name, app_author).user_config_dir
206
+
207
+ def user_cache_dir(app_name, app_author=None):
208
+ """
209
+ Quick function to get user cache directory
210
+
211
+ :param app_name: Name of the application
212
+ :param app_author: Author/Company name (optional)
213
+ :return: Path to user cache directory
214
+ """
215
+ return ZeroDirs(app_name, app_author).user_cache_dir
216
+
217
+ def user_log_dir(app_name, app_author=None):
218
+ """
219
+ Quick function to get user log directory
220
+
221
+ :param app_name: Name of the application
222
+ :param app_author: Author/Company name (optional)
223
+ :return: Path to user log directory
224
+ """
225
+ return ZeroDirs(app_name, app_author).user_log_dir
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: webscout
3
- Version: 6.3
3
+ Version: 6.5
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
@@ -24,13 +24,11 @@ Classifier: Topic :: Software Development :: Libraries :: Python Modules
24
24
  Requires-Python: >=3.7
25
25
  Description-Content-Type: text/markdown
26
26
  License-File: LICENSE.md
27
- Requires-Dist: click
27
+ Requires-Dist: mistune
28
+ Requires-Dist: tenacity
28
29
  Requires-Dist: curl-cffi
29
30
  Requires-Dist: nest-asyncio
30
- Requires-Dist: g4f>=0.2.2.3
31
- Requires-Dist: g4f[webdriver]
32
31
  Requires-Dist: rich
33
- Requires-Dist: beautifulsoup4
34
32
  Requires-Dist: markdownify
35
33
  Requires-Dist: requests
36
34
  Requires-Dist: google-generativeai
@@ -38,28 +36,22 @@ Requires-Dist: lxml>=5.2.2
38
36
  Requires-Dist: termcolor
39
37
  Requires-Dist: orjson
40
38
  Requires-Dist: PyYAML
41
- Requires-Dist: appdirs
42
39
  Requires-Dist: tls-client
43
40
  Requires-Dist: clipman
44
41
  Requires-Dist: playsound
45
42
  Requires-Dist: ollama
46
- Requires-Dist: pyfiglet
47
43
  Requires-Dist: pillow
48
- Requires-Dist: requests-html
49
44
  Requires-Dist: bson
50
45
  Requires-Dist: cloudscraper
51
46
  Requires-Dist: emoji
52
47
  Requires-Dist: openai
53
48
  Requires-Dist: prompt-toolkit
54
- Requires-Dist: fake-useragent
55
49
  Requires-Dist: primp
56
50
  Requires-Dist: pyreqwest-impersonate
57
- Requires-Dist: lxml-html-clean
58
51
  Requires-Dist: gradio-client
59
52
  Requires-Dist: psutil
60
- Requires-Dist: colorlog
61
53
  Requires-Dist: yaspin
62
- Requires-Dist: cerebras-cloud-sdk
54
+ Requires-Dist: websocket
63
55
  Provides-Extra: dev
64
56
  Requires-Dist: ruff>=0.1.6; extra == "dev"
65
57
  Requires-Dist: pytest>=7.4.2; extra == "dev"
@@ -106,12 +98,11 @@ Requires-Dist: unicorn; extra == "local"
106
98
  </div>
107
99
 
108
100
  ## 🚀 Features
109
- * **Comprehensive Search:** Leverage Google, DuckDuckGo, and Phind.com for diverse search results.
101
+ * **Comprehensive Search:** Leverage Google, DuckDuckGo for diverse search results.
110
102
  * **AI Powerhouse:** Access and interact with various AI models, including OpenAI, Cohere, and more.
111
- * **YouTube Toolkit:** Transcribe YouTube videos effortlessly and download audio/video content.
103
+ * **[YouTube Toolkit](webscout/Extra/YTToolkit):** Advanced YouTube video and transcript management with multi-language support, versatile downloading, and intelligent data extraction
112
104
  * **Tempmail & Temp Number:** Generate temporary email addresses and phone numbers for enhanced privacy.
113
- * **Text-to-Speech (TTS):** Convert text into natural-sounding speech using various TTS providers.
114
- * **WebAI:** Experience the power of terminal-based GPT and an open interpreter for code execution and more.
105
+ * **[Text-to-Speech (TTS)](webscout/Provider/TTS/README.md):** Convert text into natural-sounding speech using multiple AI-powered providers like ElevenLabs, StreamElements, and Voicepods.
115
106
  * **Offline LLMs:** Utilize powerful language models offline with GGUF support.
116
107
  * **Extensive Provider Ecosystem:** Explore a vast collection of providers, including BasedGPT, DeepSeek, and many others.
117
108
  * **Local LLM Execution:** Run GGUF models locally with minimal configuration.
@@ -119,7 +110,12 @@ Requires-Dist: unicorn; extra == "local"
119
110
  * **GGUF Conversion & Quantization:** Convert and quantize Hugging Face models to GGUF format.
120
111
  * **Autollama:** Download Hugging Face models and automatically convert them for Ollama compatibility.
121
112
  * **Function Calling (Beta):** Experiment with function calling capabilities for enhanced AI interactions.
122
-
113
+ * **[SwiftCLI](webscout/swiftcli/Readme.md):** A powerful and elegant CLI framework that makes it easy to create beautiful command-line interfaces.
114
+ * **[LitPrinter](webscout/litprinter/Readme.md):** Provides beautiful, styled console output with rich formatting and colors
115
+ * **[LitLogger](webscout/litlogger/Readme.md):** Simplifies logging with customizable formats and color schemes
116
+ * **[LitAgent](webscout/litagent/Readme.md):** Powerful and modern user agent generator that keeps your requests fresh and undetectable
117
+ * **[Text-to-Image](webscout/Provider/TTI/README.md):** Generate high-quality images using a wide range of AI art providers
118
+ * **[MarkdownLite](webscout/Extra/markdownlite/README.md):** Powerful HTML to Markdown conversion library with advanced parsing and structured output
123
119
 
124
120
  ## ⚙️ Installation
125
121
  ```python
@@ -225,29 +221,7 @@ python -m webscout --help
225
221
 
226
222
  [Go To TOP](#webscout-️)
227
223
 
228
- ## ⬇️ YTdownloader
229
224
 
230
- ```python
231
- from os import rename, getcwd
232
- from webscout import YTdownloader
233
- def download_audio(video_id):
234
- youtube_link = video_id
235
- handler = YTdownloader.Handler(query=youtube_link)
236
- for third_query_data in handler.run(format='mp3', quality='128kbps', limit=1):
237
- audio_path = handler.save(third_query_data, dir=getcwd())
238
- rename(audio_path, "audio.mp3")
239
-
240
- def download_video(video_id):
241
- youtube_link = video_id
242
- handler = YTdownloader.Handler(query=youtube_link)
243
- for third_query_data in handler.run(format='mp4', quality='auto', limit=1):
244
- video_path = handler.save(third_query_data, dir=getcwd())
245
- rename(video_path, "video.mp4")
246
-
247
- if __name__ == "__main__":
248
- # download_audio("https://www.youtube.com/watch?v=c0tMvzB0OKw")
249
- download_video("https://www.youtube.com/watch?v=c0tMvzB0OKw")
250
- ```
251
225
 
252
226
  ## ☀️ Weather
253
227
 
@@ -303,20 +277,7 @@ if __name__ == "__main__":
303
277
  asyncio.run(main())
304
278
  ```
305
279
 
306
- ## 📝 Transcriber
307
-
308
- The `transcriber` function in Webscout is a handy tool that transcribes YouTube videos.
309
280
 
310
- **Example:**
311
-
312
- ```python
313
- from webscout import YTTranscriber
314
- yt = YTTranscriber()
315
- from rich import print
316
- video_url = input("Enter the YouTube video URL: ")
317
- transcript = yt.get_transcript(video_url, languages=None)
318
- print(transcript)
319
- ```
320
281
 
321
282
  ## 🔍 GoogleS (formerly DWEBS)
322
283
 
@@ -329,16 +290,6 @@ for result in results:
329
290
  print(result)
330
291
  ```
331
292
 
332
- ### BingS
333
-
334
- ```python
335
- from webscout import BingS
336
- from rich import print
337
- searcher = BingS()
338
- results = searcher.search("HelpingAI-9B", max_results=20, extract_webpage_text=True, max_extract_characters=1000)
339
- for result in results:
340
- print(result)
341
- ```
342
293
 
343
294
  ## 🦆 WEBS and AsyncWEBS
344
295
 
@@ -817,17 +768,6 @@ with WEBS() as WEBS:
817
768
  ___
818
769
  </details>
819
770
 
820
- ### 🖼️ Text to Images - DeepInfraImager, PollinationsAI, BlackboxAIImager, AiForceimager, NexraImager, HFimager, ArtbitImager, NinjaImager, WebSimAI, AIUncensoredImager, TalkaiImager
821
-
822
- **Every TTI provider has the same usage code, you just need to change the import.**
823
-
824
- ```python
825
- from webscout import DeepInfraImager
826
- bot = DeepInfraImager()
827
- resp = bot.generate("AI-generated image - webscout", 1)
828
- print(bot.save(resp))
829
- ```
830
-
831
771
  ### 🗣️ Text to Speech - Voicepods, StreamElements
832
772
 
833
773
  ```python
@@ -936,9 +876,9 @@ ai.tool_registry.register_tool(
936
876
  parameters={
937
877
  "type": "object",
938
878
  "properties": {
939
- "location": {"type": "string", "description": "The city and state, or zip code"}
879
+ "location": {"title": "Location", "type": "string"}
940
880
  },
941
- "required": ["location"],
881
+ "required": ["location"]
942
882
  },
943
883
  )
944
884
 
@@ -966,18 +906,12 @@ ai = BLACKBOXAI(
966
906
  model=None # You can specify a model if needed
967
907
  )
968
908
 
969
- # Start an infinite loop for continuous interaction
970
- while True:
971
- # Define a prompt to send to the AI
972
- prompt = input("Enter your prompt: ")
973
-
974
- # Check if the user wants to exit the loop
975
- if prompt.lower() == "exit":
976
- break
977
-
978
- # Use the 'chat' method to send the prompt and receive a response
979
- r = ai.chat(prompt)
980
- print(r)
909
+
910
+ # Define a prompt to send to the AI
911
+ prompt = "Tell me about india"
912
+ # Use the 'chat' method to send the prompt and receive a response
913
+ r = ai.chat(prompt)
914
+ print(r)
981
915
  ```
982
916
 
983
917
  ### ❓ `PERPLEXITY` - Search with PERPLEXITY
@@ -1019,8 +953,7 @@ meta_ai = Meta(fb_email=fb_email, fb_password=fb_password)
1019
953
  # Text prompt with web search
1020
954
  response = meta_ai.ask("what is currently happning in bangladesh in aug 2024")
1021
955
  print(response["message"]) # Access the text message
1022
- print("Sources:", response["sources"]) # Access sources (if ```python
1023
- any)
956
+ print("Sources:", response["sources"]) # Access sources (if any)
1024
957
 
1025
958
  # Image generation
1026
959
  response = meta_ai.ask("Create an image of a cat wearing a hat.")
@@ -1355,36 +1288,28 @@ if __name__ == "__main__":
1355
1288
  main()
1356
1289
  ```
1357
1290
 
1358
- ### LLAMA3, pizzagpt, RUBIKSAI, Koala, Darkai, AI4Chat, Farfalle, PIAI, Felo, Julius, YouChat, YEPCHAT, Cloudflare, TurboSeek, Editee, AI21, Chatify, Cerebras, X0GPT, Lepton, GEMINIAPI, Cleeai, Elmo, Genspark, Upstage, Free2GPT, Bing, DiscordRocks, GPTWeb, LlamaTutor, PromptRefine, AIUncensored, TutorAI, ChatGPTES, Bagoodex, ChatHub, AmigoChat, AIMathGPT, GaurishCerebras, NinjaChat, GeminiPro, Talkai, LLMChat, AskMyAI, Llama3Mitril, Marcus
1291
+ ### LLAMA3, pizzagpt, RUBIKSAI, Koala, Darkai, AI4Chat, Farfalle, PIAI, Felo, Julius, YouChat, YEPCHAT, Cloudflare, TurboSeek, Editee, AI21, Chatify, Cerebras, X0GPT, Lepton, GEMINIAPI, Cleeai, Elmo, Genspark, Upstage, Free2GPT, Bing, DiscordRocks, GPTWeb, LlamaTutor, PromptRefine, AIUncensored, TutorAI, ChatGPTES, Bagoodex, ChatHub, AmigoChat, AIMathGPT, GaurishCerebras, NinjaChat, GeminiPro, Talkai, LLMChat, AskMyAI, Llama3Mitril, Marcus, PerplexityLabs, TypeGPT, Mhystical
1359
1292
 
1360
1293
  Code is similar to other providers.
1361
1294
 
1362
1295
  ### `LLM`
1363
1296
 
1364
1297
  ```python
1365
- from webscout.LLM import LLM
1366
-
1367
- # Read the system message from the file
1368
- with open('system.txt', 'r') as file:
1369
- system_message = file.read()
1370
-
1371
- # Initialize the LLM class with the model name and system message
1372
- llm = LLM(model="microsoft/WizardLM-2-8x22B", system_message=system_message)
1373
-
1374
- while True:
1375
- # Get the user input
1376
- user_input = input("User: ")
1377
-
1378
- # Define the messages to be sent
1379
- messages = [
1380
- {"role": "user", "content": user_input}
1298
+ from webscout.LLM import LLM, VLM
1299
+
1300
+ # Chat with text
1301
+ llm = LLM("meta-llama/Meta-Llama-3-70B-Instruct")
1302
+ response = llm.chat([{"role": "user", "content": "What's good?"}])
1303
+
1304
+ # Chat with images
1305
+ vlm = VLM("cogvlm-grounding-generalist")
1306
+ response = vlm.chat([{
1307
+ "role": "user",
1308
+ "content": [
1309
+ {"type": "image", "image_url": "cool_pic.jpg"},
1310
+ {"type": "text", "text": "What's in this image?"}
1381
1311
  ]
1382
-
1383
- # Use the mistral_chat method to get the response
1384
- response = llm.chat(messages)
1385
-
1386
- # Print the response
1387
- print("AI: ", response)
1312
+ }])
1388
1313
  ```
1389
1314
 
1390
1315
  ## 💻 Local-LLM