webscout 1.3.5__py3-none-any.whl → 1.3.8__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.
- webscout/AI.py +318 -156
- webscout/AIutel.py +300 -1
- webscout/__init__.py +2 -0
- webscout/g4f.py +473 -473
- webscout/version.py +1 -1
- webscout/voice.py +26 -26
- webscout/webai.py +2419 -2322
- {webscout-1.3.5.dist-info → webscout-1.3.8.dist-info}/METADATA +29 -9
- {webscout-1.3.5.dist-info → webscout-1.3.8.dist-info}/RECORD +13 -14
- webscout/HelpingAI.py +0 -192
- {webscout-1.3.5.dist-info → webscout-1.3.8.dist-info}/LICENSE.md +0 -0
- {webscout-1.3.5.dist-info → webscout-1.3.8.dist-info}/WHEEL +0 -0
- {webscout-1.3.5.dist-info → webscout-1.3.8.dist-info}/entry_points.txt +0 -0
- {webscout-1.3.5.dist-info → webscout-1.3.8.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: webscout
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.8
|
|
4
4
|
Summary: Search for anything using the Google, DuckDuckGo.com, yep.com, phind.com, you.com, etc Also containes AI models, can transcribe yt videos, have TTS support and now has webai(terminal gpt and open interpeter) support
|
|
5
5
|
Author: OEvortex
|
|
6
6
|
Author-email: helpingai5@gmail.com
|
|
@@ -46,6 +46,7 @@ Requires-Dist: termcolor
|
|
|
46
46
|
Requires-Dist: tiktoken
|
|
47
47
|
Requires-Dist: tldextract
|
|
48
48
|
Requires-Dist: orjson
|
|
49
|
+
Requires-Dist: PyYAML
|
|
49
50
|
Provides-Extra: dev
|
|
50
51
|
Requires-Dist: ruff >=0.1.6 ; extra == 'dev'
|
|
51
52
|
Requires-Dist: pytest >=7.4.2 ; extra == 'dev'
|
|
@@ -97,11 +98,12 @@ Search for anything using the Google, DuckDuckGo.com, yep.com, phind.com, you.co
|
|
|
97
98
|
- [8. `OpenGPT` - chat With OPENGPT](#8-opengpt---chat-with-opengpt)
|
|
98
99
|
- [9. `KOBOLDIA` -](#9-koboldia--)
|
|
99
100
|
- [10. `Sean` - chat With Sean](#10-sean---chat-with-sean)
|
|
101
|
+
- [11. `Reka` - chat with reka](#11-reka---chat-with-reka)
|
|
102
|
+
- [12. `Cohere` - chat with cohere](#12-cohere---chat-with-cohere)
|
|
100
103
|
- [usage of special .LLM file from webscout (webscout.LLM)](#usage-of-special-llm-file-from-webscout-webscoutllm)
|
|
101
104
|
- [`LLM`](#llm)
|
|
102
105
|
- [`LLM` with internet](#llm-with-internet)
|
|
103
106
|
- [`Webai` - terminal gpt and a open interpeter](#webai---terminal-gpt-and-a-open-interpeter)
|
|
104
|
-
- [for using as terminal gpt](#for-using-as-terminal-gpt)
|
|
105
107
|
|
|
106
108
|
## Install
|
|
107
109
|
```python
|
|
@@ -698,6 +700,27 @@ response_str = a.chat(prompt)
|
|
|
698
700
|
print(response_str)
|
|
699
701
|
```
|
|
700
702
|
|
|
703
|
+
### 11. `Reka` - chat with reka
|
|
704
|
+
```python
|
|
705
|
+
from webscout.AI import REKA
|
|
706
|
+
|
|
707
|
+
a = REKA(is_conversation=True, max_tokens=8000, timeout=30,api_key="")
|
|
708
|
+
|
|
709
|
+
prompt = "tell me about india"
|
|
710
|
+
response_str = a.chat(prompt)
|
|
711
|
+
print(response_str)
|
|
712
|
+
```
|
|
713
|
+
|
|
714
|
+
### 12. `Cohere` - chat with cohere
|
|
715
|
+
```python
|
|
716
|
+
from webscout.AI import Cohere
|
|
717
|
+
|
|
718
|
+
a = Cohere(is_conversation=True, max_tokens=8000, timeout=30,api_key="")
|
|
719
|
+
|
|
720
|
+
prompt = "tell me about india"
|
|
721
|
+
response_str = a.chat(prompt)
|
|
722
|
+
print(response_str)
|
|
723
|
+
```
|
|
701
724
|
## usage of special .LLM file from webscout (webscout.LLM)
|
|
702
725
|
|
|
703
726
|
### `LLM`
|
|
@@ -816,12 +839,12 @@ def use_rawdog_with_webai(prompt):
|
|
|
816
839
|
try:
|
|
817
840
|
webai_bot = Main(
|
|
818
841
|
max_tokens=500,
|
|
819
|
-
provider="
|
|
842
|
+
provider="cohere",
|
|
820
843
|
temperature=0.7,
|
|
821
844
|
top_k=40,
|
|
822
845
|
top_p=0.95,
|
|
823
|
-
model="
|
|
824
|
-
auth=
|
|
846
|
+
model="command-r-plus", # Replace with your desired model
|
|
847
|
+
auth="0zoQbKs1AAgd8WrPBO9CTIGgVvm5ZMbDcCqJOVyl", # Replace with your auth key/value (if needed)
|
|
825
848
|
timeout=30,
|
|
826
849
|
disable_conversation=True,
|
|
827
850
|
filepath=None,
|
|
@@ -841,11 +864,8 @@ def use_rawdog_with_webai(prompt):
|
|
|
841
864
|
if __name__ == "__main__":
|
|
842
865
|
user_prompt = input("Enter your prompt: ")
|
|
843
866
|
use_rawdog_with_webai(user_prompt)
|
|
867
|
+
|
|
844
868
|
```
|
|
845
869
|
```shell
|
|
846
870
|
python -m webscout.webai webai --provider "phind" --rawdog
|
|
847
871
|
```
|
|
848
|
-
### for using as terminal gpt
|
|
849
|
-
```python
|
|
850
|
-
python -m webscout.webai webai --provider "sean"
|
|
851
|
-
```
|
|
@@ -10,28 +10,27 @@ DeepWEBS/networks/webpage_fetcher.py,sha256=vRB9T3o-nMgrMkG2NPHTDctNeXaPSKCmBXqu
|
|
|
10
10
|
DeepWEBS/utilsdw/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
11
|
DeepWEBS/utilsdw/enver.py,sha256=vpI7s4_o_VL9govSryOv-z1zYK3pTEW3-H9QNN8JYtc,2472
|
|
12
12
|
DeepWEBS/utilsdw/logger.py,sha256=Z0nFUcEGyU8r28yKiIyvEtO26xxpmJgbvNToTfwZecc,8174
|
|
13
|
-
webscout/AI.py,sha256=
|
|
13
|
+
webscout/AI.py,sha256=p5OmcPVZxG6WQ4Y4EDPmCYfHg6jXfhTVtIIyMMXAvjY,110135
|
|
14
14
|
webscout/AIbase.py,sha256=vQi2ougu5bG-QdmoYmxCQsOg7KTEgG7EF6nZh5qqUGw,2343
|
|
15
|
-
webscout/AIutel.py,sha256=
|
|
15
|
+
webscout/AIutel.py,sha256=csBD8bqP2tCeNHbfwvj_SLCHSTSSmWkWOiM0uie0qdg,32585
|
|
16
16
|
webscout/DWEBS.py,sha256=QT-7-dUgWhQ_H7EVZD53AVyXxyskoPMKCkFIpzkN56Q,7332
|
|
17
|
-
webscout/HelpingAI.py,sha256=YeZw0zYVHMcBFFPNdd3_Ghpm9ebt_EScQjHO_IIs4lg,8103
|
|
18
17
|
webscout/LLM.py,sha256=CiDz0okZNEoXuxMwadZnwRGSLpqk2zg0vzvXSxQZjcE,1910
|
|
19
|
-
webscout/__init__.py,sha256=
|
|
18
|
+
webscout/__init__.py,sha256=yA465j5M4a6u3wtQHGEM57FH5Cb86cAV3Lp0MRcaZkw,1042
|
|
20
19
|
webscout/__main__.py,sha256=ZtTRgsRjUi2JOvYFLF1ZCh55Sdoz94I-BS-TlJC7WDU,126
|
|
21
20
|
webscout/cli.py,sha256=F888fdrFUQgczMBN4yMOSf6Nh-IbvkqpPhDsbnA2FtQ,17059
|
|
22
21
|
webscout/exceptions.py,sha256=4AOO5wexeL96nvUS-badcckcwrPS7UpZyAgB9vknHZE,276
|
|
23
|
-
webscout/g4f.py,sha256=
|
|
22
|
+
webscout/g4f.py,sha256=9oAd6ke9LB1pAGouxFQc-vxs3iOsgq0eqw2EyhP_CoA,16831
|
|
24
23
|
webscout/models.py,sha256=5iQIdtedT18YuTZ3npoG7kLMwcrKwhQ7928dl_7qZW0,692
|
|
25
24
|
webscout/transcriber.py,sha256=EddvTSq7dPJ42V3pQVnGuEiYQ7WjJ9uyeR9kMSxN7uY,20622
|
|
26
25
|
webscout/utils.py,sha256=c_98M4oqpb54pUun3fpGGlCerFD6ZHUbghyp5b7Mwgo,2605
|
|
27
|
-
webscout/version.py,sha256=
|
|
28
|
-
webscout/voice.py,sha256=
|
|
29
|
-
webscout/webai.py,sha256=
|
|
26
|
+
webscout/version.py,sha256=Q-Na6BGgN5t7iVeh9-qLCQJVgTdGveKcrtsBmXkyNPc,25
|
|
27
|
+
webscout/voice.py,sha256=0QjXTHAQmCK07IDZXRc7JXem47cnPJH7u3X0sVP1-UQ,967
|
|
28
|
+
webscout/webai.py,sha256=Lx2CMm0-wgANH3pFURtIqBHyIZJBOOv-VT-jEn_6nR8,80881
|
|
30
29
|
webscout/webscout_search.py,sha256=3_lli-hDb8_kCGwscK29xuUcOS833ROgpNhDzrxh0dk,3085
|
|
31
30
|
webscout/webscout_search_async.py,sha256=Y5frH0k3hLqBCR-8dn7a_b7EvxdYxn6wHiKl3jWosE0,40670
|
|
32
|
-
webscout-1.3.
|
|
33
|
-
webscout-1.3.
|
|
34
|
-
webscout-1.3.
|
|
35
|
-
webscout-1.3.
|
|
36
|
-
webscout-1.3.
|
|
37
|
-
webscout-1.3.
|
|
31
|
+
webscout-1.3.8.dist-info/LICENSE.md,sha256=mRVwJuT4SXC5O93BFdsfWBjlXjGn2Np90Zm5SocUzM0,3150
|
|
32
|
+
webscout-1.3.8.dist-info/METADATA,sha256=z2ZuQTaq7K0z50nsX6sR8wh5KxHtX4WLnv1YIobLWeU,32490
|
|
33
|
+
webscout-1.3.8.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
|
34
|
+
webscout-1.3.8.dist-info/entry_points.txt,sha256=8-93eRslYrzTHs5E-6yFRJrve00C9q-SkXJD113jzRY,197
|
|
35
|
+
webscout-1.3.8.dist-info/top_level.txt,sha256=OD5YKy6Y3hldL7SmuxsiEDxAG4LgdSSWwzYk22MF9fk,18
|
|
36
|
+
webscout-1.3.8.dist-info/RECORD,,
|
webscout/HelpingAI.py
DELETED
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
import warnings
|
|
2
|
-
from selenium import webdriver
|
|
3
|
-
from selenium.webdriver.chrome.options import Options
|
|
4
|
-
from selenium.webdriver.common.by import By
|
|
5
|
-
from selenium.common.exceptions import NoSuchElementException
|
|
6
|
-
import time
|
|
7
|
-
import os
|
|
8
|
-
import requests
|
|
9
|
-
from rich import print
|
|
10
|
-
from dotenv import load_dotenv
|
|
11
|
-
import random
|
|
12
|
-
import string
|
|
13
|
-
import json
|
|
14
|
-
from typing import NoReturn, List, Dict, Union
|
|
15
|
-
import requests
|
|
16
|
-
from uuid import uuid4
|
|
17
|
-
from re import findall
|
|
18
|
-
from curl_cffi.requests import get, RequestsError
|
|
19
|
-
import time
|
|
20
|
-
from selenium import webdriver
|
|
21
|
-
from selenium.webdriver.chrome.options import Options
|
|
22
|
-
from selenium.webdriver.common.by import By
|
|
23
|
-
from selenium.webdriver.support import expected_conditions as EC
|
|
24
|
-
from selenium.webdriver.support.ui import WebDriverWait
|
|
25
|
-
from halo import Halo
|
|
26
|
-
|
|
27
|
-
class ChatBot:
|
|
28
|
-
def __init__(self):
|
|
29
|
-
load_dotenv()
|
|
30
|
-
options = Options()
|
|
31
|
-
options.add_argument('--no-sandbox')
|
|
32
|
-
options.add_argument('--headless')
|
|
33
|
-
options.add_argument('--disable-dev-shm-usage')
|
|
34
|
-
options.add_argument("start-maximized")
|
|
35
|
-
options.add_argument("disable-infobars")
|
|
36
|
-
options.add_argument("--disable-extensions")
|
|
37
|
-
options.add_argument("--disable-gpu")
|
|
38
|
-
options.add_argument("--disable-dev-shm-usage")
|
|
39
|
-
options.add_argument('--log-level=3') # Add this line
|
|
40
|
-
warnings.simplefilter("ignore")
|
|
41
|
-
# Initialize WebDriver
|
|
42
|
-
self.driver = webdriver.Chrome(options=options)
|
|
43
|
-
|
|
44
|
-
self.HelpingAI = "https://vortex.zapier.app/"
|
|
45
|
-
# Navigate to the target URL
|
|
46
|
-
self.driver.get(self.HelpingAI)
|
|
47
|
-
time.sleep(7)
|
|
48
|
-
|
|
49
|
-
# Security Bypass: Refresh the page if the title contains 'just a moment'
|
|
50
|
-
while 'just a moment' in self.driver.title.lower():
|
|
51
|
-
self.driver.refresh()
|
|
52
|
-
|
|
53
|
-
# Initialize Chat_Num
|
|
54
|
-
self.Chat_Num = 2
|
|
55
|
-
|
|
56
|
-
# Function to increment Chat_Num
|
|
57
|
-
def increment_chat_num(self):
|
|
58
|
-
self.Chat_Num = str(int(self.Chat_Num) + 1)
|
|
59
|
-
|
|
60
|
-
# Function to send a query and retrieve response
|
|
61
|
-
def send_query(self, query):
|
|
62
|
-
text_box_xpath = "/html/body/div[1]/main/div[1]/div/div/div/div/div/div/div/form/fieldset/textarea"
|
|
63
|
-
send_button_xpath = "/html/body/div[1]/main/div[1]/div/div/div/div/div/div/div/form/fieldset/button"
|
|
64
|
-
response_xpath = f"/html/body/div[1]/main/div[1]/div/div/div/div/div/div/div/div/div/div[{self.Chat_Num}]/div[2]"
|
|
65
|
-
button_xpath = f"/html/body/div[1]/main/div[1]/div/div/div/div/div/div/div/div/div/div[{self.Chat_Num}]/div[1]/div/form/div/div[1]/button"
|
|
66
|
-
|
|
67
|
-
# Find the text box, enter query, and click send
|
|
68
|
-
text_box = self.driver.find_element(by=By.XPATH, value=text_box_xpath)
|
|
69
|
-
text_box.clear()
|
|
70
|
-
text_box.send_keys(query)
|
|
71
|
-
time.sleep(0.25) # Pause for 1 second after typing query
|
|
72
|
-
|
|
73
|
-
send_button = self.driver.find_element(by=By.XPATH, value=send_button_xpath)
|
|
74
|
-
send_button.click()
|
|
75
|
-
|
|
76
|
-
# Continuously check for the presence of the button every second
|
|
77
|
-
while True:
|
|
78
|
-
try:
|
|
79
|
-
button = self.driver.find_element(by=By.XPATH, value=button_xpath)
|
|
80
|
-
# If the button is found, retrieve and print the response
|
|
81
|
-
response = self.driver.find_element(by=By.XPATH, value=response_xpath).text
|
|
82
|
-
print("🤖:", response)
|
|
83
|
-
break
|
|
84
|
-
except NoSuchElementException:
|
|
85
|
-
time.sleep(0.25) # If the button is not found, wait for 1 second before checking again
|
|
86
|
-
|
|
87
|
-
self.increment_chat_num()
|
|
88
|
-
|
|
89
|
-
# Function to ask the user for a query, send it, and print the response
|
|
90
|
-
def query_chat(self):
|
|
91
|
-
while True:
|
|
92
|
-
query = input("🧑: ")
|
|
93
|
-
if query.lower() == 'exit':
|
|
94
|
-
break
|
|
95
|
-
|
|
96
|
-
self.send_query(query)
|
|
97
|
-
time.sleep(0.25) # Pause for 1 second before asking for the next query
|
|
98
|
-
|
|
99
|
-
# Close the browser window
|
|
100
|
-
def close(self):
|
|
101
|
-
self.driver.quit()
|
|
102
|
-
|
|
103
|
-
class WEBS:
|
|
104
|
-
def __init__(self):
|
|
105
|
-
load_dotenv()
|
|
106
|
-
options = Options()
|
|
107
|
-
options.add_argument('--no-sandbox')
|
|
108
|
-
options.add_argument('--headless')
|
|
109
|
-
options.add_argument('--disable-dev-shm-usage')
|
|
110
|
-
options.add_argument("start-maximized")
|
|
111
|
-
options.add_argument("disable-infobars")
|
|
112
|
-
options.add_argument("--disable-extensions")
|
|
113
|
-
options.add_argument("--disable-gpu")
|
|
114
|
-
options.add_argument("--disable-dev-shm-usage")
|
|
115
|
-
options.add_argument('--log-level=3')
|
|
116
|
-
warnings.simplefilter("ignore")
|
|
117
|
-
# Initialize WebDriver without specifying the path to the driver
|
|
118
|
-
self.driver = webdriver.Chrome(options=options)
|
|
119
|
-
|
|
120
|
-
self.HelpingAI = "https://vortex.zapier.app/"
|
|
121
|
-
# Navigate to the target URL
|
|
122
|
-
self.driver.get(self.HelpingAI)
|
|
123
|
-
time.sleep(7)
|
|
124
|
-
|
|
125
|
-
# Security Bypass: Refresh the page if the title contains 'just a moment'
|
|
126
|
-
while 'just a moment' in self.driver.title.lower():
|
|
127
|
-
self.driver.refresh()
|
|
128
|
-
|
|
129
|
-
# Initialize Chat_Num
|
|
130
|
-
self.Chat_Num = 2
|
|
131
|
-
|
|
132
|
-
# Function to increment Chat_Num
|
|
133
|
-
def increment_chat_num(self):
|
|
134
|
-
self.Chat_Num = str(int(self.Chat_Num) + 1)
|
|
135
|
-
|
|
136
|
-
# Function to send a query and retrieve response
|
|
137
|
-
def send_query(self, prompt):
|
|
138
|
-
text_box_xpath = "/html/body/div[1]/main/div[1]/div/div/div/div/div/div/div/form/fieldset/textarea"
|
|
139
|
-
send_button_xpath = "/html/body/div[1]/main/div[1]/div/div/div/div/div/div/div/form/fieldset/button"
|
|
140
|
-
response_xpath = f"/html/body/div[1]/main/div[1]/div/div/div/div/div/div/div/div/div/div[{self.Chat_Num}]/div[2]"
|
|
141
|
-
button_xpath = f"/html/body/div[1]/main/div[1]/div/div/div/div/div/div/div/div/div/div[{self.Chat_Num}]/div[1]/div/form/div/div[1]/button"
|
|
142
|
-
|
|
143
|
-
# Find the text box, enter prompt, and click send
|
|
144
|
-
text_box = self.driver.find_element(by=By.XPATH, value=text_box_xpath)
|
|
145
|
-
text_box.clear()
|
|
146
|
-
text_box.send_keys(prompt)
|
|
147
|
-
time.sleep(1) # Pause for 1 second after typing prompt
|
|
148
|
-
|
|
149
|
-
send_button = self.driver.find_element(by=By.XPATH, value=send_button_xpath)
|
|
150
|
-
send_button.click()
|
|
151
|
-
|
|
152
|
-
# Continuously check for the presence of the button every second
|
|
153
|
-
while True:
|
|
154
|
-
try:
|
|
155
|
-
button = self.driver.find_element(by=By.XPATH, value=button_xpath)
|
|
156
|
-
# If the button is found, retrieve and print the response
|
|
157
|
-
response = self.driver.find_element(by=By.XPATH, value=response_xpath).text
|
|
158
|
-
print("🤖:", response)
|
|
159
|
-
break
|
|
160
|
-
except NoSuchElementException:
|
|
161
|
-
time.sleep(0.25) # If the button is not found, wait for 1 second before checking again
|
|
162
|
-
|
|
163
|
-
self.increment_chat_num()
|
|
164
|
-
|
|
165
|
-
# Function to perform web search
|
|
166
|
-
def web_search(self, query):
|
|
167
|
-
url = "https://abhaykoul-webscout1.hf.space/mws"
|
|
168
|
-
payload = {"query": query}
|
|
169
|
-
response = requests.post(url, json=payload)
|
|
170
|
-
|
|
171
|
-
if response.status_code == 200:
|
|
172
|
-
return response.json()
|
|
173
|
-
else:
|
|
174
|
-
print("Error:", response.status_code)
|
|
175
|
-
|
|
176
|
-
# Function to ask the user for a prompt, send it, and print the response
|
|
177
|
-
def query_chat(self):
|
|
178
|
-
while True:
|
|
179
|
-
prompt = input("🧑: ")
|
|
180
|
-
if prompt.lower() == 'exit':
|
|
181
|
-
break
|
|
182
|
-
|
|
183
|
-
# Perform web search
|
|
184
|
-
search_results = self.web_search(prompt)
|
|
185
|
-
|
|
186
|
-
# Pass the search results and the prompt to the AI
|
|
187
|
-
self.send_query(f"users question:{prompt} web search results: {search_results} Answer in HelpingAI style**note you have internet access and only use search_results when necessary also dont give links or urls (when users is asking something that needs realtime data)**")
|
|
188
|
-
time.sleep(0.25) # Pause for 1 second before asking for the next prompt
|
|
189
|
-
|
|
190
|
-
# Close the browser window
|
|
191
|
-
def close(self):
|
|
192
|
-
self.driver.quit()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|