webscout 6.1__tar.gz → 6.2b0__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.
- {webscout-6.1/webscout.egg-info → webscout-6.2b0}/PKG-INFO +36 -119
- {webscout-6.1 → webscout-6.2b0}/README.md +33 -118
- {webscout-6.1 → webscout-6.2b0}/setup.py +4 -1
- webscout-6.2b0/webscout/AIauto.py +176 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Agents/functioncall.py +2 -2
- {webscout-6.1 → webscout-6.2b0}/webscout/Extra/autollama.py +37 -20
- {webscout-6.1 → webscout-6.2b0}/webscout/Local/utils.py +37 -12
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/Amigo.py +50 -37
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/Deepseek.py +7 -6
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/EDITEE.py +2 -2
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/GPTWeb.py +1 -1
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/NinjaChat.py +2 -2
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/OLLAMA.py +1 -1
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/Perplexity.py +1 -1
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/Reka.py +12 -5
- webscout-6.2b0/webscout/Provider/TTI/AIuncensored.py +103 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/TTI/__init__.py +2 -2
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/TeachAnything.py +0 -3
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/__init__.py +4 -10
- webscout-6.2b0/webscout/Provider/cerebras.py +206 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/cleeai.py +1 -1
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/felo_search.py +1 -1
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/gaurish.py +41 -2
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/geminiprorealtime.py +1 -1
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/genspark.py +1 -1
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/julius.py +4 -3
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/learnfastai.py +1 -1
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/promptrefine.py +3 -1
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/turboseek.py +3 -8
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/tutorai.py +1 -1
- webscout-6.2b0/webscout/__init__.py +23 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/tempid.py +4 -73
- webscout-6.2b0/webscout/version.py +2 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/webai.py +1 -1
- {webscout-6.1 → webscout-6.2b0/webscout.egg-info}/PKG-INFO +36 -119
- {webscout-6.1 → webscout-6.2b0}/webscout.egg-info/SOURCES.txt +1 -7
- {webscout-6.1 → webscout-6.2b0}/webscout.egg-info/requires.txt +1 -0
- webscout-6.1/webscout/AIauto.py +0 -358
- webscout-6.1/webscout/Provider/BasedGPT.py +0 -214
- webscout-6.1/webscout/Provider/ChatHub.py +0 -209
- webscout-6.1/webscout/Provider/TTI/amigo.py +0 -148
- webscout-6.1/webscout/Provider/aigames.py +0 -213
- webscout-6.1/webscout/Provider/bixin.py +0 -264
- webscout-6.1/webscout/Provider/cerebras.py +0 -199
- webscout-6.1/webscout/Provider/xdash.py +0 -182
- webscout-6.1/webscout/__init__.py +0 -64
- webscout-6.1/webscout/version.py +0 -2
- webscout-6.1/webscout/websx_search.py +0 -19
- {webscout-6.1 → webscout-6.2b0}/LICENSE.md +0 -0
- {webscout-6.1 → webscout-6.2b0}/setup.cfg +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/AIbase.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/AIutel.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Agents/Onlinesearcher.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Agents/__init__.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Bard.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Bing_search.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/DWEBS.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Extra/__init__.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Extra/gguf.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Extra/weather.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Extra/weather_ascii.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/LLM.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Local/__init__.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Local/_version.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Local/formats.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Local/model.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Local/samplers.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Local/thread.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Local/ui.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/AI21.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/Andi.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/Bing.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/Blackboxai.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/ChatGPTES.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/Chatify.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/Cloudflare.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/Cohere.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/DARKAI.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/Deepinfra.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/DiscordRocks.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/Farfalle.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/Free2GPT.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/Gemini.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/Groq.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/Koboldai.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/Llama.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/Llama3.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/Openai.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/PI.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/Phind.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/PizzaGPT.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/RUBIKSAI.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/TTI/Nexra.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/TTI/PollinationsAI.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/TTI/WebSimAI.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/TTI/aiforce.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/TTI/artbit.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/TTI/blackboximage.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/TTI/deepinfra.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/TTI/huggingface.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/TTI/imgninza.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/TTS/__init__.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/TTS/parler.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/TTS/streamElements.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/TTS/voicepod.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/Youchat.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/ai4chat.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/aimathgpt.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/bagoodex.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/elmo.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/geminiapi.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/koala.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/lepton.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/llamatutor.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/meta.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/prefind.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/twitterclone.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/upstage.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/x0gpt.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/Provider/yep.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/YTdownloader.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/__main__.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/cli.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/exceptions.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/g4f.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/models.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/requestsHTMLfix.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/transcriber.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/utils.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/webscout_search.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout/webscout_search_async.py +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout.egg-info/dependency_links.txt +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout.egg-info/entry_points.txt +0 -0
- {webscout-6.1 → webscout-6.2b0}/webscout.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: webscout
|
|
3
|
-
Version: 6.
|
|
3
|
+
Version: 6.2b0
|
|
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
|
|
@@ -22,6 +22,7 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
22
22
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
23
23
|
Classifier: Topic :: Internet :: WWW/HTTP :: Indexing/Search
|
|
24
24
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
25
|
+
Requires-Python: >=3.7
|
|
25
26
|
Description-Content-Type: text/markdown
|
|
26
27
|
License-File: LICENSE.md
|
|
27
28
|
Requires-Dist: docstring_inheritance
|
|
@@ -60,6 +61,7 @@ Requires-Dist: gradio_client
|
|
|
60
61
|
Requires-Dist: psutil
|
|
61
62
|
Requires-Dist: colorlog
|
|
62
63
|
Requires-Dist: yaspin
|
|
64
|
+
Requires-Dist: cerebras-cloud-sdk
|
|
63
65
|
Provides-Extra: dev
|
|
64
66
|
Requires-Dist: ruff>=0.1.6; extra == "dev"
|
|
65
67
|
Requires-Dist: pytest>=7.4.2; extra == "dev"
|
|
@@ -265,90 +267,41 @@ weather = w.get("Qazigund")
|
|
|
265
267
|
print(weather)
|
|
266
268
|
```
|
|
267
269
|
|
|
268
|
-
## ✉️
|
|
270
|
+
## ✉️ TempMail and VNEngine
|
|
269
271
|
|
|
270
|
-
### Temp Number
|
|
271
|
-
```python
|
|
272
|
-
from rich.console import Console
|
|
273
|
-
from webscout import tempid
|
|
274
|
-
|
|
275
|
-
def main():
|
|
276
|
-
console = Console()
|
|
277
|
-
phone = tempid.TemporaryPhoneNumber()
|
|
278
|
-
|
|
279
|
-
try:
|
|
280
|
-
# Get a temporary phone number for a specific country (or random)
|
|
281
|
-
number = phone.get_number(country="Finland")
|
|
282
|
-
console.print(f"Your temporary phone number: [bold cyan]{number}[/bold cyan]")
|
|
283
|
-
|
|
284
|
-
# Pause execution briefly (replace with your actual logic)
|
|
285
|
-
# import time module
|
|
286
|
-
import time
|
|
287
|
-
time.sleep(30) # Adjust the waiting time as needed
|
|
288
|
-
|
|
289
|
-
# Retrieve and print messages
|
|
290
|
-
messages = phone.get_messages(number)
|
|
291
|
-
if messages:
|
|
292
|
-
# Access individual messages using indexing:
|
|
293
|
-
console.print(f"[bold green]{messages[0].frm}:[/] {messages[0].content}")
|
|
294
|
-
# (Add more lines if you expect multiple messages)
|
|
295
|
-
else:
|
|
296
|
-
console.print("No messages received.")
|
|
297
|
-
|
|
298
|
-
except Exception as e:
|
|
299
|
-
console.print(f"[bold red]An error occurred: {e}")
|
|
300
|
-
|
|
301
|
-
if __name__ == "__main__":
|
|
302
|
-
main()
|
|
303
|
-
|
|
304
|
-
```
|
|
305
|
-
|
|
306
|
-
### Tempmail
|
|
307
272
|
```python
|
|
273
|
+
import json
|
|
308
274
|
import asyncio
|
|
309
|
-
from
|
|
310
|
-
from
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
275
|
+
from webscout import VNEngine
|
|
276
|
+
from webscout import TempMail
|
|
277
|
+
|
|
278
|
+
async def main():
|
|
279
|
+
vn = VNEngine()
|
|
280
|
+
countries = vn.get_online_countries()
|
|
281
|
+
if countries:
|
|
282
|
+
country = countries[0]['country']
|
|
283
|
+
numbers = vn.get_country_numbers(country)
|
|
284
|
+
if numbers:
|
|
285
|
+
number = numbers[0]['full_number']
|
|
286
|
+
inbox = vn.get_number_inbox(country, number)
|
|
287
|
+
|
|
288
|
+
# Serialize inbox data to JSON string
|
|
289
|
+
json_data = json.dumps(inbox, ensure_ascii=False, indent=4)
|
|
290
|
+
|
|
291
|
+
# Print with UTF-8 encoding
|
|
292
|
+
print(json_data)
|
|
317
293
|
|
|
318
|
-
|
|
294
|
+
async with TempMail() as client:
|
|
319
295
|
domains = await client.get_domains()
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
while True:
|
|
329
|
-
messages = await client.get_messages(email.email)
|
|
330
|
-
if messages is not None:
|
|
331
|
-
break
|
|
332
|
-
|
|
333
|
-
if messages:
|
|
334
|
-
table = Table(show_header=True, header_style="bold magenta")
|
|
335
|
-
table.add_column("From", style="bold cyan")
|
|
336
|
-
table.add_column("Subject", style="bold yellow")
|
|
337
|
-
table.add_column("Body", style="bold green")
|
|
338
|
-
for message in messages:
|
|
339
|
-
body_preview = Text(message.body_text if message.body_text else "No body")
|
|
340
|
-
table.add_row(message.email_from or "Unknown", message.subject or "No Subject", body_preview)
|
|
341
|
-
console.print(table)
|
|
342
|
-
else:
|
|
343
|
-
console.print("No messages found.")
|
|
344
|
-
|
|
345
|
-
except Exception as e:
|
|
346
|
-
console.print(f"[bold red]An error occurred: {e}")
|
|
347
|
-
|
|
348
|
-
finally:
|
|
349
|
-
await client.close()
|
|
296
|
+
print("Available Domains:", domains)
|
|
297
|
+
email_response = await client.create_email(alias="testuser")
|
|
298
|
+
print("Created Email:", email_response)
|
|
299
|
+
messages = await client.get_messages(email_response.email)
|
|
300
|
+
print("Messages:", messages)
|
|
301
|
+
await client.delete_email(email_response.email, email_response.token)
|
|
302
|
+
print("Email Deleted")
|
|
350
303
|
|
|
351
|
-
if __name__ ==
|
|
304
|
+
if __name__ == "__main__":
|
|
352
305
|
asyncio.run(main())
|
|
353
306
|
```
|
|
354
307
|
|
|
@@ -607,16 +560,6 @@ with WEBS() as WEBS:
|
|
|
607
560
|
print(r)
|
|
608
561
|
```
|
|
609
562
|
|
|
610
|
-
## 🌐 WEBSX - Another Web Search Tool
|
|
611
|
-
|
|
612
|
-
```python
|
|
613
|
-
from webscout import WEBSX
|
|
614
|
-
s = "Python development tools"
|
|
615
|
-
|
|
616
|
-
result = WEBSX(s)
|
|
617
|
-
|
|
618
|
-
print(result)
|
|
619
|
-
```
|
|
620
563
|
|
|
621
564
|
## 🎭 ALL Acts
|
|
622
565
|
|
|
@@ -876,7 +819,7 @@ print(result)
|
|
|
876
819
|
___
|
|
877
820
|
</details>
|
|
878
821
|
|
|
879
|
-
### 🖼️ Text to Images - DeepInfraImager, PollinationsAI, BlackboxAIImager, AiForceimager, NexraImager, HFimager, ArtbitImager, NinjaImager, WebSimAI,
|
|
822
|
+
### 🖼️ Text to Images - DeepInfraImager, PollinationsAI, BlackboxAIImager, AiForceimager, NexraImager, HFimager, ArtbitImager, NinjaImager, WebSimAI, AIUncensoredImager
|
|
880
823
|
|
|
881
824
|
**Every TTI provider has the same usage code, you just need to change the import.**
|
|
882
825
|
|
|
@@ -1133,29 +1076,6 @@ response_str = a.chat(prompt)
|
|
|
1133
1076
|
print(response_str)
|
|
1134
1077
|
```
|
|
1135
1078
|
|
|
1136
|
-
### `BasedGPT` - Chat with GPT
|
|
1137
|
-
|
|
1138
|
-
```python
|
|
1139
|
-
from webscout import BasedGPT
|
|
1140
|
-
|
|
1141
|
-
# Initialize the BasedGPT provider
|
|
1142
|
-
basedgpt = BasedGPT(
|
|
1143
|
-
is_conversation=True, # Chat conversationally
|
|
1144
|
-
max_tokens=600, # Maximum tokens to generate
|
|
1145
|
-
timeout=30, # HTTP request timeout
|
|
1146
|
-
intro="You are a helpful and friendly AI.", # Introductory prompt
|
|
1147
|
-
filepath="chat_history.txt", # File to store conversation history
|
|
1148
|
-
update_file=True, # Update the chat history file
|
|
1149
|
-
)
|
|
1150
|
-
|
|
1151
|
-
# Send a prompt to the AI
|
|
1152
|
-
prompt = "What is the meaning of life?"
|
|
1153
|
-
response = basedgpt.chat(prompt)
|
|
1154
|
-
|
|
1155
|
-
# Print the AI's response
|
|
1156
|
-
print(response)
|
|
1157
|
-
```
|
|
1158
|
-
|
|
1159
1079
|
### `DeepSeek` - Chat with DeepSeek
|
|
1160
1080
|
|
|
1161
1081
|
```python
|
|
@@ -1437,7 +1357,7 @@ if __name__ == "__main__":
|
|
|
1437
1357
|
main()
|
|
1438
1358
|
```
|
|
1439
1359
|
|
|
1440
|
-
### LLAMA3, pizzagpt, RUBIKSAI, Koala, Darkai, AI4Chat, Farfalle, PIAI, Felo,
|
|
1360
|
+
### 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
|
|
1441
1361
|
|
|
1442
1362
|
Code is similar to other providers.
|
|
1443
1363
|
|
|
@@ -1588,7 +1508,7 @@ Webscout provides tools to convert and quantize Hugging Face models into the GGU
|
|
|
1588
1508
|
**Example:**
|
|
1589
1509
|
|
|
1590
1510
|
```python
|
|
1591
|
-
from webscout import gguf
|
|
1511
|
+
from webscout.Extra import gguf
|
|
1592
1512
|
"""
|
|
1593
1513
|
Valid quantization methods:
|
|
1594
1514
|
"q2_k", "q3_k_l", "q3_k_m", "q3_k_s",
|
|
@@ -1609,7 +1529,7 @@ gguf.convert(
|
|
|
1609
1529
|
Webscout's `autollama` utility downloads a model from Hugging Face and then automatically makes it Ollama-ready.
|
|
1610
1530
|
|
|
1611
1531
|
```python
|
|
1612
|
-
from webscout import autollama
|
|
1532
|
+
from webscout.Extra import autollama
|
|
1613
1533
|
|
|
1614
1534
|
model_path = "Vortex4ai/Jarvis-0.5B"
|
|
1615
1535
|
gguf_file = "test2-q4_k_m.gguf"
|
|
@@ -1670,9 +1590,6 @@ Contributions are welcome! If you'd like to contribute to Webscout, please follo
|
|
|
1670
1590
|
4. Push your branch to your forked repository.
|
|
1671
1591
|
5. Submit a pull request to the main repository.
|
|
1672
1592
|
|
|
1673
|
-
## 📜 License
|
|
1674
|
-
|
|
1675
|
-
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
1676
1593
|
|
|
1677
1594
|
## 🙏 Acknowledgments
|
|
1678
1595
|
|
|
@@ -193,90 +193,41 @@ weather = w.get("Qazigund")
|
|
|
193
193
|
print(weather)
|
|
194
194
|
```
|
|
195
195
|
|
|
196
|
-
## ✉️
|
|
196
|
+
## ✉️ TempMail and VNEngine
|
|
197
197
|
|
|
198
|
-
### Temp Number
|
|
199
|
-
```python
|
|
200
|
-
from rich.console import Console
|
|
201
|
-
from webscout import tempid
|
|
202
|
-
|
|
203
|
-
def main():
|
|
204
|
-
console = Console()
|
|
205
|
-
phone = tempid.TemporaryPhoneNumber()
|
|
206
|
-
|
|
207
|
-
try:
|
|
208
|
-
# Get a temporary phone number for a specific country (or random)
|
|
209
|
-
number = phone.get_number(country="Finland")
|
|
210
|
-
console.print(f"Your temporary phone number: [bold cyan]{number}[/bold cyan]")
|
|
211
|
-
|
|
212
|
-
# Pause execution briefly (replace with your actual logic)
|
|
213
|
-
# import time module
|
|
214
|
-
import time
|
|
215
|
-
time.sleep(30) # Adjust the waiting time as needed
|
|
216
|
-
|
|
217
|
-
# Retrieve and print messages
|
|
218
|
-
messages = phone.get_messages(number)
|
|
219
|
-
if messages:
|
|
220
|
-
# Access individual messages using indexing:
|
|
221
|
-
console.print(f"[bold green]{messages[0].frm}:[/] {messages[0].content}")
|
|
222
|
-
# (Add more lines if you expect multiple messages)
|
|
223
|
-
else:
|
|
224
|
-
console.print("No messages received.")
|
|
225
|
-
|
|
226
|
-
except Exception as e:
|
|
227
|
-
console.print(f"[bold red]An error occurred: {e}")
|
|
228
|
-
|
|
229
|
-
if __name__ == "__main__":
|
|
230
|
-
main()
|
|
231
|
-
|
|
232
|
-
```
|
|
233
|
-
|
|
234
|
-
### Tempmail
|
|
235
198
|
```python
|
|
199
|
+
import json
|
|
236
200
|
import asyncio
|
|
237
|
-
from
|
|
238
|
-
from
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
201
|
+
from webscout import VNEngine
|
|
202
|
+
from webscout import TempMail
|
|
203
|
+
|
|
204
|
+
async def main():
|
|
205
|
+
vn = VNEngine()
|
|
206
|
+
countries = vn.get_online_countries()
|
|
207
|
+
if countries:
|
|
208
|
+
country = countries[0]['country']
|
|
209
|
+
numbers = vn.get_country_numbers(country)
|
|
210
|
+
if numbers:
|
|
211
|
+
number = numbers[0]['full_number']
|
|
212
|
+
inbox = vn.get_number_inbox(country, number)
|
|
213
|
+
|
|
214
|
+
# Serialize inbox data to JSON string
|
|
215
|
+
json_data = json.dumps(inbox, ensure_ascii=False, indent=4)
|
|
216
|
+
|
|
217
|
+
# Print with UTF-8 encoding
|
|
218
|
+
print(json_data)
|
|
245
219
|
|
|
246
|
-
|
|
220
|
+
async with TempMail() as client:
|
|
247
221
|
domains = await client.get_domains()
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
while True:
|
|
257
|
-
messages = await client.get_messages(email.email)
|
|
258
|
-
if messages is not None:
|
|
259
|
-
break
|
|
260
|
-
|
|
261
|
-
if messages:
|
|
262
|
-
table = Table(show_header=True, header_style="bold magenta")
|
|
263
|
-
table.add_column("From", style="bold cyan")
|
|
264
|
-
table.add_column("Subject", style="bold yellow")
|
|
265
|
-
table.add_column("Body", style="bold green")
|
|
266
|
-
for message in messages:
|
|
267
|
-
body_preview = Text(message.body_text if message.body_text else "No body")
|
|
268
|
-
table.add_row(message.email_from or "Unknown", message.subject or "No Subject", body_preview)
|
|
269
|
-
console.print(table)
|
|
270
|
-
else:
|
|
271
|
-
console.print("No messages found.")
|
|
272
|
-
|
|
273
|
-
except Exception as e:
|
|
274
|
-
console.print(f"[bold red]An error occurred: {e}")
|
|
275
|
-
|
|
276
|
-
finally:
|
|
277
|
-
await client.close()
|
|
222
|
+
print("Available Domains:", domains)
|
|
223
|
+
email_response = await client.create_email(alias="testuser")
|
|
224
|
+
print("Created Email:", email_response)
|
|
225
|
+
messages = await client.get_messages(email_response.email)
|
|
226
|
+
print("Messages:", messages)
|
|
227
|
+
await client.delete_email(email_response.email, email_response.token)
|
|
228
|
+
print("Email Deleted")
|
|
278
229
|
|
|
279
|
-
if __name__ ==
|
|
230
|
+
if __name__ == "__main__":
|
|
280
231
|
asyncio.run(main())
|
|
281
232
|
```
|
|
282
233
|
|
|
@@ -535,16 +486,6 @@ with WEBS() as WEBS:
|
|
|
535
486
|
print(r)
|
|
536
487
|
```
|
|
537
488
|
|
|
538
|
-
## 🌐 WEBSX - Another Web Search Tool
|
|
539
|
-
|
|
540
|
-
```python
|
|
541
|
-
from webscout import WEBSX
|
|
542
|
-
s = "Python development tools"
|
|
543
|
-
|
|
544
|
-
result = WEBSX(s)
|
|
545
|
-
|
|
546
|
-
print(result)
|
|
547
|
-
```
|
|
548
489
|
|
|
549
490
|
## 🎭 ALL Acts
|
|
550
491
|
|
|
@@ -804,7 +745,7 @@ print(result)
|
|
|
804
745
|
___
|
|
805
746
|
</details>
|
|
806
747
|
|
|
807
|
-
### 🖼️ Text to Images - DeepInfraImager, PollinationsAI, BlackboxAIImager, AiForceimager, NexraImager, HFimager, ArtbitImager, NinjaImager, WebSimAI,
|
|
748
|
+
### 🖼️ Text to Images - DeepInfraImager, PollinationsAI, BlackboxAIImager, AiForceimager, NexraImager, HFimager, ArtbitImager, NinjaImager, WebSimAI, AIUncensoredImager
|
|
808
749
|
|
|
809
750
|
**Every TTI provider has the same usage code, you just need to change the import.**
|
|
810
751
|
|
|
@@ -1061,29 +1002,6 @@ response_str = a.chat(prompt)
|
|
|
1061
1002
|
print(response_str)
|
|
1062
1003
|
```
|
|
1063
1004
|
|
|
1064
|
-
### `BasedGPT` - Chat with GPT
|
|
1065
|
-
|
|
1066
|
-
```python
|
|
1067
|
-
from webscout import BasedGPT
|
|
1068
|
-
|
|
1069
|
-
# Initialize the BasedGPT provider
|
|
1070
|
-
basedgpt = BasedGPT(
|
|
1071
|
-
is_conversation=True, # Chat conversationally
|
|
1072
|
-
max_tokens=600, # Maximum tokens to generate
|
|
1073
|
-
timeout=30, # HTTP request timeout
|
|
1074
|
-
intro="You are a helpful and friendly AI.", # Introductory prompt
|
|
1075
|
-
filepath="chat_history.txt", # File to store conversation history
|
|
1076
|
-
update_file=True, # Update the chat history file
|
|
1077
|
-
)
|
|
1078
|
-
|
|
1079
|
-
# Send a prompt to the AI
|
|
1080
|
-
prompt = "What is the meaning of life?"
|
|
1081
|
-
response = basedgpt.chat(prompt)
|
|
1082
|
-
|
|
1083
|
-
# Print the AI's response
|
|
1084
|
-
print(response)
|
|
1085
|
-
```
|
|
1086
|
-
|
|
1087
1005
|
### `DeepSeek` - Chat with DeepSeek
|
|
1088
1006
|
|
|
1089
1007
|
```python
|
|
@@ -1365,7 +1283,7 @@ if __name__ == "__main__":
|
|
|
1365
1283
|
main()
|
|
1366
1284
|
```
|
|
1367
1285
|
|
|
1368
|
-
### LLAMA3, pizzagpt, RUBIKSAI, Koala, Darkai, AI4Chat, Farfalle, PIAI, Felo,
|
|
1286
|
+
### 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
|
|
1369
1287
|
|
|
1370
1288
|
Code is similar to other providers.
|
|
1371
1289
|
|
|
@@ -1516,7 +1434,7 @@ Webscout provides tools to convert and quantize Hugging Face models into the GGU
|
|
|
1516
1434
|
**Example:**
|
|
1517
1435
|
|
|
1518
1436
|
```python
|
|
1519
|
-
from webscout import gguf
|
|
1437
|
+
from webscout.Extra import gguf
|
|
1520
1438
|
"""
|
|
1521
1439
|
Valid quantization methods:
|
|
1522
1440
|
"q2_k", "q3_k_l", "q3_k_m", "q3_k_s",
|
|
@@ -1537,7 +1455,7 @@ gguf.convert(
|
|
|
1537
1455
|
Webscout's `autollama` utility downloads a model from Hugging Face and then automatically makes it Ollama-ready.
|
|
1538
1456
|
|
|
1539
1457
|
```python
|
|
1540
|
-
from webscout import autollama
|
|
1458
|
+
from webscout.Extra import autollama
|
|
1541
1459
|
|
|
1542
1460
|
model_path = "Vortex4ai/Jarvis-0.5B"
|
|
1543
1461
|
gguf_file = "test2-q4_k_m.gguf"
|
|
@@ -1598,9 +1516,6 @@ Contributions are welcome! If you'd like to contribute to Webscout, please follo
|
|
|
1598
1516
|
4. Push your branch to your forked repository.
|
|
1599
1517
|
5. Submit a pull request to the main repository.
|
|
1600
1518
|
|
|
1601
|
-
## 📜 License
|
|
1602
|
-
|
|
1603
|
-
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
1604
1519
|
|
|
1605
1520
|
## 🙏 Acknowledgments
|
|
1606
1521
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
from setuptools import setup, find_packages
|
|
2
2
|
from webscout.version import __prog__, __version__
|
|
3
|
+
|
|
3
4
|
with open("README.md", encoding="utf-8") as f:
|
|
4
5
|
README = f.read()
|
|
5
6
|
|
|
@@ -12,6 +13,7 @@ setup(
|
|
|
12
13
|
author="OEvortex",
|
|
13
14
|
author_email="helpingai5@gmail.com",
|
|
14
15
|
packages=find_packages(),
|
|
16
|
+
python_requires=">=3.7",
|
|
15
17
|
classifiers=[
|
|
16
18
|
"Development Status :: 5 - Production/Stable",
|
|
17
19
|
"Intended Audience :: Developers",
|
|
@@ -63,7 +65,8 @@ setup(
|
|
|
63
65
|
"gradio_client",
|
|
64
66
|
"psutil",
|
|
65
67
|
"colorlog",
|
|
66
|
-
"yaspin"
|
|
68
|
+
"yaspin",
|
|
69
|
+
"cerebras-cloud-sdk",
|
|
67
70
|
],
|
|
68
71
|
entry_points={
|
|
69
72
|
"console_scripts": [
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
from webscout.AIbase import Provider
|
|
2
|
+
from webscout.g4f import GPT4FREE, TestProviders
|
|
3
|
+
from webscout.exceptions import AllProvidersFailure
|
|
4
|
+
from typing import Union, Any, Dict, Generator
|
|
5
|
+
import importlib
|
|
6
|
+
import pkgutil
|
|
7
|
+
import logging
|
|
8
|
+
import random
|
|
9
|
+
import inspect
|
|
10
|
+
|
|
11
|
+
def load_providers():
|
|
12
|
+
provider_map = {}
|
|
13
|
+
api_key_providers = set()
|
|
14
|
+
provider_package = importlib.import_module("webscout.Provider")
|
|
15
|
+
|
|
16
|
+
for _, module_name, _ in pkgutil.iter_modules(provider_package.__path__):
|
|
17
|
+
try:
|
|
18
|
+
module = importlib.import_module(f"webscout.Provider.{module_name}")
|
|
19
|
+
for attr_name in dir(module):
|
|
20
|
+
attr = getattr(module, attr_name)
|
|
21
|
+
if isinstance(attr, type) and issubclass(attr, Provider) and attr != Provider:
|
|
22
|
+
provider_map[attr_name.upper()] = attr
|
|
23
|
+
# Check if the provider needs an API key
|
|
24
|
+
if 'api_key' in inspect.signature(attr.__init__).parameters:
|
|
25
|
+
api_key_providers.add(attr_name.upper())
|
|
26
|
+
except Exception as e:
|
|
27
|
+
logging.warning(f"Failed to load provider {module_name}: {e}")
|
|
28
|
+
|
|
29
|
+
return provider_map, api_key_providers
|
|
30
|
+
|
|
31
|
+
provider_map, api_key_providers = load_providers()
|
|
32
|
+
|
|
33
|
+
class AUTO(Provider):
|
|
34
|
+
def __init__(
|
|
35
|
+
self,
|
|
36
|
+
is_conversation: bool = True,
|
|
37
|
+
max_tokens: int = 600,
|
|
38
|
+
timeout: int = 30,
|
|
39
|
+
intro: str = None,
|
|
40
|
+
filepath: str = None,
|
|
41
|
+
update_file: bool = True,
|
|
42
|
+
proxies: dict = {},
|
|
43
|
+
history_offset: int = 10250,
|
|
44
|
+
act: str = None,
|
|
45
|
+
exclude: list[str] = [],
|
|
46
|
+
):
|
|
47
|
+
self.provider = None
|
|
48
|
+
self.provider_name = None
|
|
49
|
+
self.is_conversation = is_conversation
|
|
50
|
+
self.max_tokens = max_tokens
|
|
51
|
+
self.timeout = timeout
|
|
52
|
+
self.intro = intro
|
|
53
|
+
self.filepath = filepath
|
|
54
|
+
self.update_file = update_file
|
|
55
|
+
self.proxies = proxies
|
|
56
|
+
self.history_offset = history_offset
|
|
57
|
+
self.act = act
|
|
58
|
+
self.exclude = [e.upper() for e in exclude]
|
|
59
|
+
|
|
60
|
+
@property
|
|
61
|
+
def last_response(self) -> dict[str, Any]:
|
|
62
|
+
return self.provider.last_response if self.provider else {}
|
|
63
|
+
|
|
64
|
+
@property
|
|
65
|
+
def conversation(self) -> object:
|
|
66
|
+
return self.provider.conversation if self.provider else None
|
|
67
|
+
|
|
68
|
+
def ask(
|
|
69
|
+
self,
|
|
70
|
+
prompt: str,
|
|
71
|
+
stream: bool = False,
|
|
72
|
+
raw: bool = False,
|
|
73
|
+
optimizer: str = None,
|
|
74
|
+
conversationally: bool = False,
|
|
75
|
+
run_new_test: bool = False,
|
|
76
|
+
) -> Union[Dict, Generator]:
|
|
77
|
+
ask_kwargs = {
|
|
78
|
+
"prompt": prompt,
|
|
79
|
+
"stream": stream,
|
|
80
|
+
"raw": raw,
|
|
81
|
+
"optimizer": optimizer,
|
|
82
|
+
"conversationally": conversationally,
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
# Filter out API key required providers and excluded providers
|
|
86
|
+
available_providers = [
|
|
87
|
+
(name, cls) for name, cls in provider_map.items()
|
|
88
|
+
if name not in api_key_providers and name not in self.exclude
|
|
89
|
+
]
|
|
90
|
+
|
|
91
|
+
# Shuffle the list of available providers
|
|
92
|
+
random.shuffle(available_providers)
|
|
93
|
+
|
|
94
|
+
# Try webscout-based providers
|
|
95
|
+
for provider_name, provider_class in available_providers:
|
|
96
|
+
try:
|
|
97
|
+
self.provider_name = f"webscout-{provider_name}"
|
|
98
|
+
self.provider = provider_class(
|
|
99
|
+
is_conversation=self.is_conversation,
|
|
100
|
+
max_tokens=self.max_tokens,
|
|
101
|
+
timeout=self.timeout,
|
|
102
|
+
intro=self.intro,
|
|
103
|
+
filepath=self.filepath,
|
|
104
|
+
update_file=self.update_file,
|
|
105
|
+
proxies=self.proxies,
|
|
106
|
+
history_offset=self.history_offset,
|
|
107
|
+
act=self.act,
|
|
108
|
+
)
|
|
109
|
+
|
|
110
|
+
return self.provider.ask(**ask_kwargs)
|
|
111
|
+
|
|
112
|
+
except Exception as e:
|
|
113
|
+
logging.debug(
|
|
114
|
+
f"Failed to generate response using provider {provider_name} - {e}"
|
|
115
|
+
)
|
|
116
|
+
|
|
117
|
+
# Try GPT4FREE providers
|
|
118
|
+
gpt4free_providers = TestProviders(timeout=self.timeout).get_results(run=run_new_test)
|
|
119
|
+
random.shuffle(gpt4free_providers)
|
|
120
|
+
|
|
121
|
+
for provider_info in gpt4free_providers:
|
|
122
|
+
if provider_info["name"].upper() in self.exclude:
|
|
123
|
+
continue
|
|
124
|
+
try:
|
|
125
|
+
self.provider_name = f"g4f-{provider_info['name']}"
|
|
126
|
+
self.provider = GPT4FREE(
|
|
127
|
+
provider=provider_info["name"],
|
|
128
|
+
is_conversation=self.is_conversation,
|
|
129
|
+
max_tokens=self.max_tokens,
|
|
130
|
+
intro=self.intro,
|
|
131
|
+
filepath=self.filepath,
|
|
132
|
+
update_file=self.update_file,
|
|
133
|
+
proxies=self.proxies,
|
|
134
|
+
history_offset=self.history_offset,
|
|
135
|
+
act=self.act,
|
|
136
|
+
)
|
|
137
|
+
|
|
138
|
+
print(f"Using provider: {self.provider_name}")
|
|
139
|
+
return self.provider.ask(**ask_kwargs)
|
|
140
|
+
|
|
141
|
+
except Exception as e:
|
|
142
|
+
logging.debug(
|
|
143
|
+
f"Failed to generate response using GPT4FREE-based provider {provider_info['name']} - {e}"
|
|
144
|
+
)
|
|
145
|
+
|
|
146
|
+
raise AllProvidersFailure("None of the providers generated response successfully.")
|
|
147
|
+
|
|
148
|
+
def chat(
|
|
149
|
+
self,
|
|
150
|
+
prompt: str,
|
|
151
|
+
stream: bool = False,
|
|
152
|
+
optimizer: str = None,
|
|
153
|
+
conversationally: bool = False,
|
|
154
|
+
run_new_test: bool = False,
|
|
155
|
+
) -> Union[str, Generator[str, None, None]]:
|
|
156
|
+
response = self.ask(
|
|
157
|
+
prompt,
|
|
158
|
+
stream,
|
|
159
|
+
optimizer=optimizer,
|
|
160
|
+
conversationally=conversationally,
|
|
161
|
+
run_new_test=run_new_test,
|
|
162
|
+
)
|
|
163
|
+
|
|
164
|
+
if stream:
|
|
165
|
+
return (self.get_message(chunk) for chunk in response)
|
|
166
|
+
else:
|
|
167
|
+
return self.get_message(response)
|
|
168
|
+
|
|
169
|
+
def get_message(self, response: dict) -> str:
|
|
170
|
+
assert self.provider is not None, "Chat with AI first"
|
|
171
|
+
return self.provider.get_message(response)
|
|
172
|
+
if __name__ == "__main__":
|
|
173
|
+
auto = AUTO()
|
|
174
|
+
|
|
175
|
+
response = auto.chat("Hello, how are you?")
|
|
176
|
+
print(response)
|
|
@@ -4,12 +4,12 @@ import json
|
|
|
4
4
|
import time
|
|
5
5
|
from typing import Any, Dict, Optional
|
|
6
6
|
import requests
|
|
7
|
-
from webscout import WEBS,
|
|
7
|
+
from webscout import WEBS, GEMINIAPI
|
|
8
8
|
|
|
9
9
|
class FunctionCallingAgent:
|
|
10
10
|
def __init__(self,
|
|
11
11
|
tools: list = None):
|
|
12
|
-
self.ai =
|
|
12
|
+
self.ai = GEMINIAPI(api_key="Gemini api key", timeout=300, intro=None)
|
|
13
13
|
self.tools = tools if tools is not None else []
|
|
14
14
|
self.knowledge_cutoff = "September 2022"
|
|
15
15
|
|