webscout 3.6__tar.gz → 3.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.
- {webscout-3.6/webscout.egg-info → webscout-3.7}/PKG-INFO +73 -6
- {webscout-3.6 → webscout-3.7}/README.md +70 -3
- {webscout-3.6 → webscout-3.7}/setup.py +3 -3
- webscout-3.7/webscout/Extra/__init__.py +2 -0
- webscout-3.7/webscout/Extra/autollama.py +47 -0
- webscout-3.7/webscout/Extra/gguf.py +80 -0
- {webscout-3.6 → webscout-3.7}/webscout/Local/_version.py +1 -1
- {webscout-3.6 → webscout-3.7}/webscout/__init__.py +1 -1
- webscout-3.7/webscout/version.py +2 -0
- {webscout-3.6 → webscout-3.7/webscout.egg-info}/PKG-INFO +73 -6
- {webscout-3.6 → webscout-3.7}/webscout.egg-info/SOURCES.txt +3 -0
- {webscout-3.6 → webscout-3.7}/webscout.egg-info/requires.txt +1 -1
- webscout-3.6/webscout/version.py +0 -2
- {webscout-3.6 → webscout-3.7}/LICENSE.md +0 -0
- {webscout-3.6 → webscout-3.7}/setup.cfg +0 -0
- {webscout-3.6 → webscout-3.7}/webscout/AIauto.py +0 -0
- {webscout-3.6 → webscout-3.7}/webscout/AIbase.py +0 -0
- {webscout-3.6 → webscout-3.7}/webscout/AIutel.py +0 -0
- {webscout-3.6 → webscout-3.7}/webscout/DWEBS.py +0 -0
- {webscout-3.6 → webscout-3.7}/webscout/LLM.py +0 -0
- {webscout-3.6 → webscout-3.7}/webscout/Local/__init__.py +0 -0
- {webscout-3.6 → webscout-3.7}/webscout/Local/formats.py +0 -0
- {webscout-3.6 → webscout-3.7}/webscout/Local/model.py +0 -0
- {webscout-3.6 → webscout-3.7}/webscout/Local/rawdog.py +0 -0
- {webscout-3.6 → webscout-3.7}/webscout/Local/samplers.py +0 -0
- {webscout-3.6 → webscout-3.7}/webscout/Local/thread.py +0 -0
- {webscout-3.6 → webscout-3.7}/webscout/Local/utils.py +0 -0
- {webscout-3.6 → webscout-3.7}/webscout/Provider/BasedGPT.py +0 -0
- {webscout-3.6 → webscout-3.7}/webscout/Provider/Berlin4h.py +0 -0
- {webscout-3.6 → webscout-3.7}/webscout/Provider/Blackboxai.py +0 -0
- {webscout-3.6 → webscout-3.7}/webscout/Provider/ChatGPTUK.py +0 -0
- {webscout-3.6 → webscout-3.7}/webscout/Provider/Cohere.py +0 -0
- {webscout-3.6 → webscout-3.7}/webscout/Provider/Deepinfra.py +0 -0
- {webscout-3.6 → webscout-3.7}/webscout/Provider/Deepseek.py +0 -0
- {webscout-3.6 → webscout-3.7}/webscout/Provider/Gemini.py +0 -0
- {webscout-3.6 → webscout-3.7}/webscout/Provider/Groq.py +0 -0
- {webscout-3.6 → webscout-3.7}/webscout/Provider/Koboldai.py +0 -0
- {webscout-3.6 → webscout-3.7}/webscout/Provider/Leo.py +0 -0
- {webscout-3.6 → webscout-3.7}/webscout/Provider/Llama2.py +0 -0
- {webscout-3.6 → webscout-3.7}/webscout/Provider/OpenGPT.py +0 -0
- {webscout-3.6 → webscout-3.7}/webscout/Provider/Openai.py +0 -0
- {webscout-3.6 → webscout-3.7}/webscout/Provider/Perplexity.py +0 -0
- {webscout-3.6 → webscout-3.7}/webscout/Provider/Phind.py +0 -0
- {webscout-3.6 → webscout-3.7}/webscout/Provider/Poe.py +0 -0
- {webscout-3.6 → webscout-3.7}/webscout/Provider/Reka.py +0 -0
- {webscout-3.6 → webscout-3.7}/webscout/Provider/ThinkAnyAI.py +0 -0
- {webscout-3.6 → webscout-3.7}/webscout/Provider/VTLchat.py +0 -0
- {webscout-3.6 → webscout-3.7}/webscout/Provider/Xjai.py +0 -0
- {webscout-3.6 → webscout-3.7}/webscout/Provider/Yepchat.py +0 -0
- {webscout-3.6 → webscout-3.7}/webscout/Provider/Youchat.py +0 -0
- {webscout-3.6 → webscout-3.7}/webscout/Provider/__init__.py +0 -0
- {webscout-3.6 → webscout-3.7}/webscout/__main__.py +0 -0
- {webscout-3.6 → webscout-3.7}/webscout/async_providers.py +0 -0
- {webscout-3.6 → webscout-3.7}/webscout/cli.py +0 -0
- {webscout-3.6 → webscout-3.7}/webscout/exceptions.py +0 -0
- {webscout-3.6 → webscout-3.7}/webscout/g4f.py +0 -0
- {webscout-3.6 → webscout-3.7}/webscout/models.py +0 -0
- {webscout-3.6 → webscout-3.7}/webscout/tempid.py +0 -0
- {webscout-3.6 → webscout-3.7}/webscout/transcriber.py +0 -0
- {webscout-3.6 → webscout-3.7}/webscout/utils.py +0 -0
- {webscout-3.6 → webscout-3.7}/webscout/voice.py +0 -0
- {webscout-3.6 → webscout-3.7}/webscout/webai.py +0 -0
- {webscout-3.6 → webscout-3.7}/webscout/webscout_search.py +0 -0
- {webscout-3.6 → webscout-3.7}/webscout/webscout_search_async.py +0 -0
- {webscout-3.6 → webscout-3.7}/webscout/websx_search.py +0 -0
- {webscout-3.6 → webscout-3.7}/webscout.egg-info/dependency_links.txt +0 -0
- {webscout-3.6 → webscout-3.7}/webscout.egg-info/entry_points.txt +0 -0
- {webscout-3.6 → webscout-3.7}/webscout.egg-info/top_level.txt +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: webscout
|
|
3
|
-
Version: 3.
|
|
4
|
-
Summary: Search for anything using Google, DuckDuckGo, brave, qwant, 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
|
|
3
|
+
Version: 3.7
|
|
4
|
+
Summary: Search for anything using Google, DuckDuckGo, brave, qwant, 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
|
|
7
7
|
License: HelpingAI
|
|
@@ -62,7 +62,7 @@ Provides-Extra: local
|
|
|
62
62
|
Requires-Dist: llama-cpp-python; extra == "local"
|
|
63
63
|
Requires-Dist: colorama; extra == "local"
|
|
64
64
|
Requires-Dist: numpy; extra == "local"
|
|
65
|
-
Requires-Dist: huggingface_hub; extra == "local"
|
|
65
|
+
Requires-Dist: huggingface_hub[cli]; extra == "local"
|
|
66
66
|
|
|
67
67
|
<div align="center">
|
|
68
68
|
<!-- Replace `#` with your actual links -->
|
|
@@ -1447,13 +1447,19 @@ while True:
|
|
|
1447
1447
|
# Print the response
|
|
1448
1448
|
print("AI: ", response)
|
|
1449
1449
|
```
|
|
1450
|
-
|
|
1451
|
-
Local
|
|
1450
|
+
|
|
1451
|
+
## Local-LLM
|
|
1452
|
+
|
|
1453
|
+
Webscout can now run GGUF models locally. You can download and run your favorite models with minimal configuration.
|
|
1454
|
+
|
|
1455
|
+
**Example:**
|
|
1456
|
+
|
|
1452
1457
|
```python
|
|
1453
1458
|
from webscout.Local.utils import download_model
|
|
1454
1459
|
from webscout.Local.model import Model
|
|
1455
1460
|
from webscout.Local.thread import Thread
|
|
1456
1461
|
from webscout.Local import formats
|
|
1462
|
+
|
|
1457
1463
|
# 1. Download the model
|
|
1458
1464
|
repo_id = "microsoft/Phi-3-mini-4k-instruct-gguf" # Replace with the desired Hugging Face repo
|
|
1459
1465
|
filename = "Phi-3-mini-4k-instruct-q4.gguf" # Replace with the correct filename
|
|
@@ -1469,7 +1475,11 @@ thread = Thread(model, formats.phi3)
|
|
|
1469
1475
|
thread.interact()
|
|
1470
1476
|
```
|
|
1471
1477
|
|
|
1472
|
-
|
|
1478
|
+
## Local-rawdog
|
|
1479
|
+
Webscout's local raw-dog feature allows you to run Python scripts within your terminal prompt.
|
|
1480
|
+
|
|
1481
|
+
**Example:**
|
|
1482
|
+
|
|
1473
1483
|
```python
|
|
1474
1484
|
import webscout.Local as ws
|
|
1475
1485
|
from webscout.Local.rawdog import RawDog
|
|
@@ -1556,6 +1566,63 @@ while True:
|
|
|
1556
1566
|
print(script_output)
|
|
1557
1567
|
|
|
1558
1568
|
```
|
|
1569
|
+
|
|
1570
|
+
## GGUF
|
|
1571
|
+
|
|
1572
|
+
Webscout provides tools to convert and quantize Hugging Face models into the GGUF format for use with offline LLMs.
|
|
1573
|
+
|
|
1574
|
+
**Example:**
|
|
1575
|
+
|
|
1576
|
+
```python
|
|
1577
|
+
from webscout import gguf
|
|
1578
|
+
"""
|
|
1579
|
+
Valid quantization methods:
|
|
1580
|
+
"q2_k", "q3_k_l", "q3_k_m", "q3_k_s",
|
|
1581
|
+
"q4_0", "q4_1", "q4_k_m", "q4_k_s",
|
|
1582
|
+
"q5_0", "q5_1", "q5_k_m", "q5_k_s",
|
|
1583
|
+
"q6_k", "q8_0"
|
|
1584
|
+
"""
|
|
1585
|
+
gguf.convert(
|
|
1586
|
+
model_id="OEvortex/HelpingAI-Lite-1.5T", # Replace with your model ID
|
|
1587
|
+
username="Abhaykoul", # Replace with your Hugging Face username
|
|
1588
|
+
token="hf_token_write", # Replace with your Hugging Face token
|
|
1589
|
+
quantization_methods="q4_k_m" # Optional, adjust quantization methods
|
|
1590
|
+
)
|
|
1591
|
+
```
|
|
1592
|
+
|
|
1593
|
+
## Autollama
|
|
1594
|
+
|
|
1595
|
+
Webscout's `autollama` utility download model from huggingface and then automatically makes it ollama ready
|
|
1596
|
+
|
|
1597
|
+
**Example:**
|
|
1598
|
+
|
|
1599
|
+
```python
|
|
1600
|
+
from webscout import autollama
|
|
1601
|
+
|
|
1602
|
+
autollama.autollama(
|
|
1603
|
+
model_path="OEvortex/HelpingAI-Lite-1.5T", # Hugging Face model ID
|
|
1604
|
+
gguf_file="HelpingAI-Lite-1.5T.q4_k_m.gguf" # GGUF file ID
|
|
1605
|
+
)
|
|
1606
|
+
```
|
|
1607
|
+
|
|
1608
|
+
**Command Line Usage:**
|
|
1609
|
+
|
|
1610
|
+
* **GGUF Conversion:**
|
|
1611
|
+
```bash
|
|
1612
|
+
python -m webscout.Extra.gguf -m "OEvortex/HelpingAI-Lite-1.5T" -u "your_username" -t "your_hf_token" -q "q4_k_m,q5_k_m"
|
|
1613
|
+
```
|
|
1614
|
+
|
|
1615
|
+
* **Autollama:**
|
|
1616
|
+
```bash
|
|
1617
|
+
python -m webscout.Extra.autollama -m "OEvortex/HelpingAI-Lite-1.5T" -g "HelpingAI-Lite-1.5T.q4_k_m.gguf"
|
|
1618
|
+
```
|
|
1619
|
+
|
|
1620
|
+
**Note:**
|
|
1621
|
+
|
|
1622
|
+
* Replace `"your_username"` and `"your_hf_token"` with your actual Hugging Face credentials.
|
|
1623
|
+
* The `model_path` in `autollama` is the Hugging Face model ID, and `gguf_file` is the GGUF file ID.
|
|
1624
|
+
|
|
1625
|
+
|
|
1559
1626
|
### `LLM` with internet
|
|
1560
1627
|
```python
|
|
1561
1628
|
from __future__ import annotations
|
|
@@ -1381,13 +1381,19 @@ while True:
|
|
|
1381
1381
|
# Print the response
|
|
1382
1382
|
print("AI: ", response)
|
|
1383
1383
|
```
|
|
1384
|
-
|
|
1385
|
-
Local
|
|
1384
|
+
|
|
1385
|
+
## Local-LLM
|
|
1386
|
+
|
|
1387
|
+
Webscout can now run GGUF models locally. You can download and run your favorite models with minimal configuration.
|
|
1388
|
+
|
|
1389
|
+
**Example:**
|
|
1390
|
+
|
|
1386
1391
|
```python
|
|
1387
1392
|
from webscout.Local.utils import download_model
|
|
1388
1393
|
from webscout.Local.model import Model
|
|
1389
1394
|
from webscout.Local.thread import Thread
|
|
1390
1395
|
from webscout.Local import formats
|
|
1396
|
+
|
|
1391
1397
|
# 1. Download the model
|
|
1392
1398
|
repo_id = "microsoft/Phi-3-mini-4k-instruct-gguf" # Replace with the desired Hugging Face repo
|
|
1393
1399
|
filename = "Phi-3-mini-4k-instruct-q4.gguf" # Replace with the correct filename
|
|
@@ -1403,7 +1409,11 @@ thread = Thread(model, formats.phi3)
|
|
|
1403
1409
|
thread.interact()
|
|
1404
1410
|
```
|
|
1405
1411
|
|
|
1406
|
-
|
|
1412
|
+
## Local-rawdog
|
|
1413
|
+
Webscout's local raw-dog feature allows you to run Python scripts within your terminal prompt.
|
|
1414
|
+
|
|
1415
|
+
**Example:**
|
|
1416
|
+
|
|
1407
1417
|
```python
|
|
1408
1418
|
import webscout.Local as ws
|
|
1409
1419
|
from webscout.Local.rawdog import RawDog
|
|
@@ -1490,6 +1500,63 @@ while True:
|
|
|
1490
1500
|
print(script_output)
|
|
1491
1501
|
|
|
1492
1502
|
```
|
|
1503
|
+
|
|
1504
|
+
## GGUF
|
|
1505
|
+
|
|
1506
|
+
Webscout provides tools to convert and quantize Hugging Face models into the GGUF format for use with offline LLMs.
|
|
1507
|
+
|
|
1508
|
+
**Example:**
|
|
1509
|
+
|
|
1510
|
+
```python
|
|
1511
|
+
from webscout import gguf
|
|
1512
|
+
"""
|
|
1513
|
+
Valid quantization methods:
|
|
1514
|
+
"q2_k", "q3_k_l", "q3_k_m", "q3_k_s",
|
|
1515
|
+
"q4_0", "q4_1", "q4_k_m", "q4_k_s",
|
|
1516
|
+
"q5_0", "q5_1", "q5_k_m", "q5_k_s",
|
|
1517
|
+
"q6_k", "q8_0"
|
|
1518
|
+
"""
|
|
1519
|
+
gguf.convert(
|
|
1520
|
+
model_id="OEvortex/HelpingAI-Lite-1.5T", # Replace with your model ID
|
|
1521
|
+
username="Abhaykoul", # Replace with your Hugging Face username
|
|
1522
|
+
token="hf_token_write", # Replace with your Hugging Face token
|
|
1523
|
+
quantization_methods="q4_k_m" # Optional, adjust quantization methods
|
|
1524
|
+
)
|
|
1525
|
+
```
|
|
1526
|
+
|
|
1527
|
+
## Autollama
|
|
1528
|
+
|
|
1529
|
+
Webscout's `autollama` utility download model from huggingface and then automatically makes it ollama ready
|
|
1530
|
+
|
|
1531
|
+
**Example:**
|
|
1532
|
+
|
|
1533
|
+
```python
|
|
1534
|
+
from webscout import autollama
|
|
1535
|
+
|
|
1536
|
+
autollama.autollama(
|
|
1537
|
+
model_path="OEvortex/HelpingAI-Lite-1.5T", # Hugging Face model ID
|
|
1538
|
+
gguf_file="HelpingAI-Lite-1.5T.q4_k_m.gguf" # GGUF file ID
|
|
1539
|
+
)
|
|
1540
|
+
```
|
|
1541
|
+
|
|
1542
|
+
**Command Line Usage:**
|
|
1543
|
+
|
|
1544
|
+
* **GGUF Conversion:**
|
|
1545
|
+
```bash
|
|
1546
|
+
python -m webscout.Extra.gguf -m "OEvortex/HelpingAI-Lite-1.5T" -u "your_username" -t "your_hf_token" -q "q4_k_m,q5_k_m"
|
|
1547
|
+
```
|
|
1548
|
+
|
|
1549
|
+
* **Autollama:**
|
|
1550
|
+
```bash
|
|
1551
|
+
python -m webscout.Extra.autollama -m "OEvortex/HelpingAI-Lite-1.5T" -g "HelpingAI-Lite-1.5T.q4_k_m.gguf"
|
|
1552
|
+
```
|
|
1553
|
+
|
|
1554
|
+
**Note:**
|
|
1555
|
+
|
|
1556
|
+
* Replace `"your_username"` and `"your_hf_token"` with your actual Hugging Face credentials.
|
|
1557
|
+
* The `model_path` in `autollama` is the Hugging Face model ID, and `gguf_file` is the GGUF file ID.
|
|
1558
|
+
|
|
1559
|
+
|
|
1493
1560
|
### `LLM` with internet
|
|
1494
1561
|
```python
|
|
1495
1562
|
from __future__ import annotations
|
|
@@ -5,8 +5,8 @@ with open("README.md", encoding="utf-8") as f:
|
|
|
5
5
|
|
|
6
6
|
setup(
|
|
7
7
|
name="webscout",
|
|
8
|
-
version="3.
|
|
9
|
-
description="Search for anything using Google, DuckDuckGo, brave, qwant, 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",
|
|
8
|
+
version="3.7",
|
|
9
|
+
description="Search for anything using Google, DuckDuckGo, brave, qwant, 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",
|
|
10
10
|
long_description=README,
|
|
11
11
|
long_description_content_type="text/markdown",
|
|
12
12
|
author="OEvortex",
|
|
@@ -75,7 +75,7 @@ setup(
|
|
|
75
75
|
'llama-cpp-python',
|
|
76
76
|
'colorama',
|
|
77
77
|
'numpy',
|
|
78
|
-
'huggingface_hub',
|
|
78
|
+
'huggingface_hub[cli]',
|
|
79
79
|
],
|
|
80
80
|
},
|
|
81
81
|
license="HelpingAI",
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import subprocess
|
|
2
|
+
import argparse
|
|
3
|
+
import os
|
|
4
|
+
|
|
5
|
+
def autollama(model_path, gguf_file):
|
|
6
|
+
"""Manages models with Ollama using the autollama.sh script.
|
|
7
|
+
|
|
8
|
+
Args:
|
|
9
|
+
model_path (str): The path to the Hugging Face model.
|
|
10
|
+
gguf_file (str): The name of the GGUF file.
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
# Get the directory where this script is located
|
|
14
|
+
script_dir = os.path.dirname(os.path.abspath(__file__))
|
|
15
|
+
|
|
16
|
+
# Construct the path to the shell script
|
|
17
|
+
script_path = os.path.join(script_dir, "autollama.sh")
|
|
18
|
+
|
|
19
|
+
# Initialize command list
|
|
20
|
+
command = ["bash", script_path, "-m", model_path, "-g", gguf_file]
|
|
21
|
+
|
|
22
|
+
# Execute the command
|
|
23
|
+
process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
|
|
24
|
+
|
|
25
|
+
# Print the output and error in real-time
|
|
26
|
+
for line in process.stdout:
|
|
27
|
+
print(line, end='')
|
|
28
|
+
|
|
29
|
+
for line in process.stderr:
|
|
30
|
+
print(line, end='')
|
|
31
|
+
|
|
32
|
+
process.wait()
|
|
33
|
+
|
|
34
|
+
def main():
|
|
35
|
+
parser = argparse.ArgumentParser(description='Run autollama.sh to manage models with Ollama')
|
|
36
|
+
parser.add_argument('-m', '--model_path', required=True, help='Set the path to the Hugging Face model')
|
|
37
|
+
parser.add_argument('-g', '--gguf_file', required=True, help='Set the GGUF file name')
|
|
38
|
+
args = parser.parse_args()
|
|
39
|
+
|
|
40
|
+
try:
|
|
41
|
+
autollama(args.model_path, args.gguf_file)
|
|
42
|
+
except Exception as e:
|
|
43
|
+
print(f"Error: {e}")
|
|
44
|
+
exit(1)
|
|
45
|
+
|
|
46
|
+
if __name__ == "__main__":
|
|
47
|
+
main()
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import subprocess
|
|
2
|
+
import argparse
|
|
3
|
+
import os
|
|
4
|
+
|
|
5
|
+
def convert(model_id, username=None, token=None, quantization_methods="q4_k_m,q5_k_m"):
|
|
6
|
+
"""Converts and quantizes a Hugging Face model to GGUF format.
|
|
7
|
+
|
|
8
|
+
Args:
|
|
9
|
+
model_id (str): The Hugging Face model ID (e.g., 'google/flan-t5-xl').
|
|
10
|
+
username (str, optional): Your Hugging Face username. Required for uploads.
|
|
11
|
+
token (str, optional): Your Hugging Face API token. Required for uploads.
|
|
12
|
+
quantization_methods (str, optional): Comma-separated quantization methods.
|
|
13
|
+
Defaults to "q4_k_m,q5_k_m".
|
|
14
|
+
|
|
15
|
+
Raises:
|
|
16
|
+
ValueError: If an invalid quantization method is provided.
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
# List of valid quantization methods
|
|
20
|
+
valid_methods = [
|
|
21
|
+
"q2_k", "q3_k_l", "q3_k_m", "q3_k_s",
|
|
22
|
+
"q4_0", "q4_1", "q4_k_m", "q4_k_s",
|
|
23
|
+
"q5_0", "q5_1", "q5_k_m", "q5_k_s",
|
|
24
|
+
"q6_k", "q8_0"
|
|
25
|
+
]
|
|
26
|
+
|
|
27
|
+
# Validate the selected quantization methods
|
|
28
|
+
selected_methods_list = quantization_methods.split(',')
|
|
29
|
+
for method in selected_methods_list:
|
|
30
|
+
if method not in valid_methods:
|
|
31
|
+
raise ValueError(f"Invalid method: {method}. Please select from the available methods: {', '.join(valid_methods)}")
|
|
32
|
+
|
|
33
|
+
# Get the directory where this script is located
|
|
34
|
+
script_dir = os.path.dirname(os.path.abspath(__file__))
|
|
35
|
+
|
|
36
|
+
# Construct the path to the shell script
|
|
37
|
+
script_path = os.path.join(script_dir, "gguf.sh")
|
|
38
|
+
|
|
39
|
+
# Construct the command
|
|
40
|
+
command = ["bash", script_path, "-m", model_id]
|
|
41
|
+
|
|
42
|
+
if username:
|
|
43
|
+
command.extend(["-u", username])
|
|
44
|
+
|
|
45
|
+
if token:
|
|
46
|
+
command.extend(["-t", token])
|
|
47
|
+
|
|
48
|
+
if quantization_methods:
|
|
49
|
+
command.extend(["-q", quantization_methods])
|
|
50
|
+
|
|
51
|
+
# Execute the command
|
|
52
|
+
process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
|
|
53
|
+
|
|
54
|
+
# Print the output and error in real-time
|
|
55
|
+
for line in process.stdout:
|
|
56
|
+
print(line, end='')
|
|
57
|
+
|
|
58
|
+
for line in process.stderr:
|
|
59
|
+
print(line, end='')
|
|
60
|
+
|
|
61
|
+
process.wait()
|
|
62
|
+
|
|
63
|
+
def main():
|
|
64
|
+
parser = argparse.ArgumentParser(description='Convert and quantize model using gguf.sh')
|
|
65
|
+
parser.add_argument('-m', '--model_id', required=True, help='Set the HF model ID (e.g., "google/flan-t5-xl")')
|
|
66
|
+
parser.add_argument('-u', '--username', help='Set your Hugging Face username (required for uploads)')
|
|
67
|
+
parser.add_argument('-t', '--token', help='Set your Hugging Face API token (required for uploads)')
|
|
68
|
+
parser.add_argument('-q', '--quantization_methods', default="q4_k_m,q5_k_m",
|
|
69
|
+
help='Comma-separated quantization methods (default: q4_k_m,q5_k_m). Valid methods: q2_k, q3_k_l, q3_k_m, q3_k_s, q4_0, q4_1, q4_k_m, q4_k_s, q5_0, q5_1, q5_k_m, q5_k_s, q6_k, q8_0')
|
|
70
|
+
|
|
71
|
+
args = parser.parse_args()
|
|
72
|
+
|
|
73
|
+
try:
|
|
74
|
+
convert(args.model_id, args.username, args.token, args.quantization_methods)
|
|
75
|
+
except ValueError as e:
|
|
76
|
+
print(e)
|
|
77
|
+
exit(1)
|
|
78
|
+
|
|
79
|
+
if __name__ == "__main__":
|
|
80
|
+
main()
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: webscout
|
|
3
|
-
Version: 3.
|
|
4
|
-
Summary: Search for anything using Google, DuckDuckGo, brave, qwant, 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
|
|
3
|
+
Version: 3.7
|
|
4
|
+
Summary: Search for anything using Google, DuckDuckGo, brave, qwant, 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
|
|
7
7
|
License: HelpingAI
|
|
@@ -62,7 +62,7 @@ Provides-Extra: local
|
|
|
62
62
|
Requires-Dist: llama-cpp-python; extra == "local"
|
|
63
63
|
Requires-Dist: colorama; extra == "local"
|
|
64
64
|
Requires-Dist: numpy; extra == "local"
|
|
65
|
-
Requires-Dist: huggingface_hub; extra == "local"
|
|
65
|
+
Requires-Dist: huggingface_hub[cli]; extra == "local"
|
|
66
66
|
|
|
67
67
|
<div align="center">
|
|
68
68
|
<!-- Replace `#` with your actual links -->
|
|
@@ -1447,13 +1447,19 @@ while True:
|
|
|
1447
1447
|
# Print the response
|
|
1448
1448
|
print("AI: ", response)
|
|
1449
1449
|
```
|
|
1450
|
-
|
|
1451
|
-
Local
|
|
1450
|
+
|
|
1451
|
+
## Local-LLM
|
|
1452
|
+
|
|
1453
|
+
Webscout can now run GGUF models locally. You can download and run your favorite models with minimal configuration.
|
|
1454
|
+
|
|
1455
|
+
**Example:**
|
|
1456
|
+
|
|
1452
1457
|
```python
|
|
1453
1458
|
from webscout.Local.utils import download_model
|
|
1454
1459
|
from webscout.Local.model import Model
|
|
1455
1460
|
from webscout.Local.thread import Thread
|
|
1456
1461
|
from webscout.Local import formats
|
|
1462
|
+
|
|
1457
1463
|
# 1. Download the model
|
|
1458
1464
|
repo_id = "microsoft/Phi-3-mini-4k-instruct-gguf" # Replace with the desired Hugging Face repo
|
|
1459
1465
|
filename = "Phi-3-mini-4k-instruct-q4.gguf" # Replace with the correct filename
|
|
@@ -1469,7 +1475,11 @@ thread = Thread(model, formats.phi3)
|
|
|
1469
1475
|
thread.interact()
|
|
1470
1476
|
```
|
|
1471
1477
|
|
|
1472
|
-
|
|
1478
|
+
## Local-rawdog
|
|
1479
|
+
Webscout's local raw-dog feature allows you to run Python scripts within your terminal prompt.
|
|
1480
|
+
|
|
1481
|
+
**Example:**
|
|
1482
|
+
|
|
1473
1483
|
```python
|
|
1474
1484
|
import webscout.Local as ws
|
|
1475
1485
|
from webscout.Local.rawdog import RawDog
|
|
@@ -1556,6 +1566,63 @@ while True:
|
|
|
1556
1566
|
print(script_output)
|
|
1557
1567
|
|
|
1558
1568
|
```
|
|
1569
|
+
|
|
1570
|
+
## GGUF
|
|
1571
|
+
|
|
1572
|
+
Webscout provides tools to convert and quantize Hugging Face models into the GGUF format for use with offline LLMs.
|
|
1573
|
+
|
|
1574
|
+
**Example:**
|
|
1575
|
+
|
|
1576
|
+
```python
|
|
1577
|
+
from webscout import gguf
|
|
1578
|
+
"""
|
|
1579
|
+
Valid quantization methods:
|
|
1580
|
+
"q2_k", "q3_k_l", "q3_k_m", "q3_k_s",
|
|
1581
|
+
"q4_0", "q4_1", "q4_k_m", "q4_k_s",
|
|
1582
|
+
"q5_0", "q5_1", "q5_k_m", "q5_k_s",
|
|
1583
|
+
"q6_k", "q8_0"
|
|
1584
|
+
"""
|
|
1585
|
+
gguf.convert(
|
|
1586
|
+
model_id="OEvortex/HelpingAI-Lite-1.5T", # Replace with your model ID
|
|
1587
|
+
username="Abhaykoul", # Replace with your Hugging Face username
|
|
1588
|
+
token="hf_token_write", # Replace with your Hugging Face token
|
|
1589
|
+
quantization_methods="q4_k_m" # Optional, adjust quantization methods
|
|
1590
|
+
)
|
|
1591
|
+
```
|
|
1592
|
+
|
|
1593
|
+
## Autollama
|
|
1594
|
+
|
|
1595
|
+
Webscout's `autollama` utility download model from huggingface and then automatically makes it ollama ready
|
|
1596
|
+
|
|
1597
|
+
**Example:**
|
|
1598
|
+
|
|
1599
|
+
```python
|
|
1600
|
+
from webscout import autollama
|
|
1601
|
+
|
|
1602
|
+
autollama.autollama(
|
|
1603
|
+
model_path="OEvortex/HelpingAI-Lite-1.5T", # Hugging Face model ID
|
|
1604
|
+
gguf_file="HelpingAI-Lite-1.5T.q4_k_m.gguf" # GGUF file ID
|
|
1605
|
+
)
|
|
1606
|
+
```
|
|
1607
|
+
|
|
1608
|
+
**Command Line Usage:**
|
|
1609
|
+
|
|
1610
|
+
* **GGUF Conversion:**
|
|
1611
|
+
```bash
|
|
1612
|
+
python -m webscout.Extra.gguf -m "OEvortex/HelpingAI-Lite-1.5T" -u "your_username" -t "your_hf_token" -q "q4_k_m,q5_k_m"
|
|
1613
|
+
```
|
|
1614
|
+
|
|
1615
|
+
* **Autollama:**
|
|
1616
|
+
```bash
|
|
1617
|
+
python -m webscout.Extra.autollama -m "OEvortex/HelpingAI-Lite-1.5T" -g "HelpingAI-Lite-1.5T.q4_k_m.gguf"
|
|
1618
|
+
```
|
|
1619
|
+
|
|
1620
|
+
**Note:**
|
|
1621
|
+
|
|
1622
|
+
* Replace `"your_username"` and `"your_hf_token"` with your actual Hugging Face credentials.
|
|
1623
|
+
* The `model_path` in `autollama` is the Hugging Face model ID, and `gguf_file` is the GGUF file ID.
|
|
1624
|
+
|
|
1625
|
+
|
|
1559
1626
|
### `LLM` with internet
|
|
1560
1627
|
```python
|
|
1561
1628
|
from __future__ import annotations
|
|
@@ -28,6 +28,9 @@ webscout.egg-info/dependency_links.txt
|
|
|
28
28
|
webscout.egg-info/entry_points.txt
|
|
29
29
|
webscout.egg-info/requires.txt
|
|
30
30
|
webscout.egg-info/top_level.txt
|
|
31
|
+
webscout/Extra/__init__.py
|
|
32
|
+
webscout/Extra/autollama.py
|
|
33
|
+
webscout/Extra/gguf.py
|
|
31
34
|
webscout/Local/__init__.py
|
|
32
35
|
webscout/Local/_version.py
|
|
33
36
|
webscout/Local/formats.py
|
webscout-3.6/webscout/version.py
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|