webscout 8.2.6__py3-none-any.whl → 8.2.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/AIauto.py +1 -1
- webscout/AIutel.py +298 -239
- webscout/Extra/Act.md +309 -0
- webscout/Extra/GitToolkit/gitapi/README.md +110 -0
- webscout/Extra/YTToolkit/README.md +375 -0
- webscout/Extra/YTToolkit/ytapi/README.md +44 -0
- webscout/Extra/YTToolkit/ytapi/extras.py +92 -19
- webscout/Extra/autocoder/autocoder.py +309 -114
- webscout/Extra/autocoder/autocoder_utiles.py +15 -15
- webscout/Extra/gguf.md +430 -0
- webscout/Extra/tempmail/README.md +488 -0
- webscout/Extra/weather.md +281 -0
- webscout/Litlogger/Readme.md +175 -0
- webscout/Provider/AISEARCH/DeepFind.py +41 -37
- webscout/Provider/AISEARCH/README.md +279 -0
- webscout/Provider/AISEARCH/__init__.py +0 -1
- webscout/Provider/AISEARCH/genspark_search.py +228 -86
- webscout/Provider/AISEARCH/hika_search.py +11 -11
- webscout/Provider/AISEARCH/scira_search.py +324 -322
- webscout/Provider/AllenAI.py +7 -14
- webscout/Provider/Blackboxai.py +518 -74
- webscout/Provider/Cloudflare.py +0 -1
- webscout/Provider/Deepinfra.py +23 -21
- webscout/Provider/Flowith.py +217 -0
- webscout/Provider/FreeGemini.py +250 -0
- webscout/Provider/GizAI.py +15 -5
- webscout/Provider/Glider.py +11 -8
- webscout/Provider/HeckAI.py +80 -52
- webscout/Provider/Koboldai.py +7 -4
- webscout/Provider/LambdaChat.py +2 -2
- webscout/Provider/Marcus.py +10 -18
- webscout/Provider/OPENAI/BLACKBOXAI.py +735 -0
- webscout/Provider/OPENAI/Cloudflare.py +378 -0
- webscout/Provider/OPENAI/FreeGemini.py +282 -0
- webscout/Provider/OPENAI/NEMOTRON.py +244 -0
- webscout/Provider/OPENAI/README.md +1253 -0
- webscout/Provider/OPENAI/__init__.py +8 -0
- webscout/Provider/OPENAI/ai4chat.py +293 -286
- webscout/Provider/OPENAI/api.py +810 -0
- webscout/Provider/OPENAI/base.py +217 -14
- webscout/Provider/OPENAI/c4ai.py +373 -367
- webscout/Provider/OPENAI/chatgpt.py +7 -0
- webscout/Provider/OPENAI/chatgptclone.py +7 -0
- webscout/Provider/OPENAI/chatsandbox.py +172 -0
- webscout/Provider/OPENAI/deepinfra.py +30 -20
- webscout/Provider/OPENAI/e2b.py +6 -0
- webscout/Provider/OPENAI/exaai.py +7 -0
- webscout/Provider/OPENAI/exachat.py +6 -0
- webscout/Provider/OPENAI/flowith.py +162 -0
- webscout/Provider/OPENAI/freeaichat.py +359 -352
- webscout/Provider/OPENAI/glider.py +323 -316
- webscout/Provider/OPENAI/groq.py +361 -354
- webscout/Provider/OPENAI/heckai.py +30 -64
- webscout/Provider/OPENAI/llmchatco.py +8 -0
- webscout/Provider/OPENAI/mcpcore.py +7 -0
- webscout/Provider/OPENAI/multichat.py +8 -0
- webscout/Provider/OPENAI/netwrck.py +356 -350
- webscout/Provider/OPENAI/opkfc.py +8 -0
- webscout/Provider/OPENAI/scirachat.py +471 -462
- webscout/Provider/OPENAI/sonus.py +9 -0
- webscout/Provider/OPENAI/standardinput.py +9 -1
- webscout/Provider/OPENAI/textpollinations.py +339 -329
- webscout/Provider/OPENAI/toolbaz.py +7 -0
- webscout/Provider/OPENAI/typefully.py +355 -0
- webscout/Provider/OPENAI/typegpt.py +358 -346
- webscout/Provider/OPENAI/uncovrAI.py +7 -0
- webscout/Provider/OPENAI/utils.py +103 -7
- webscout/Provider/OPENAI/venice.py +12 -0
- webscout/Provider/OPENAI/wisecat.py +19 -19
- webscout/Provider/OPENAI/writecream.py +7 -0
- webscout/Provider/OPENAI/x0gpt.py +7 -0
- webscout/Provider/OPENAI/yep.py +50 -21
- webscout/Provider/OpenGPT.py +1 -1
- webscout/Provider/TTI/AiForce/README.md +159 -0
- webscout/Provider/TTI/FreeAIPlayground/README.md +99 -0
- webscout/Provider/TTI/ImgSys/README.md +174 -0
- webscout/Provider/TTI/MagicStudio/README.md +101 -0
- webscout/Provider/TTI/Nexra/README.md +155 -0
- webscout/Provider/TTI/PollinationsAI/README.md +146 -0
- webscout/Provider/TTI/README.md +128 -0
- webscout/Provider/TTI/aiarta/README.md +134 -0
- webscout/Provider/TTI/artbit/README.md +100 -0
- webscout/Provider/TTI/fastflux/README.md +129 -0
- webscout/Provider/TTI/huggingface/README.md +114 -0
- webscout/Provider/TTI/piclumen/README.md +161 -0
- webscout/Provider/TTI/pixelmuse/README.md +79 -0
- webscout/Provider/TTI/talkai/README.md +139 -0
- webscout/Provider/TTS/README.md +192 -0
- webscout/Provider/TTS/__init__.py +2 -1
- webscout/Provider/TTS/speechma.py +500 -100
- webscout/Provider/TTS/sthir.py +94 -0
- webscout/Provider/TeachAnything.py +3 -7
- webscout/Provider/TextPollinationsAI.py +4 -2
- webscout/Provider/{aimathgpt.py → UNFINISHED/ChatHub.py} +88 -68
- webscout/Provider/UNFINISHED/liner_api_request.py +263 -0
- webscout/Provider/UNFINISHED/oivscode.py +351 -0
- webscout/Provider/UNFINISHED/test_lmarena.py +119 -0
- webscout/Provider/Writecream.py +11 -2
- webscout/Provider/__init__.py +8 -14
- webscout/Provider/ai4chat.py +4 -58
- webscout/Provider/asksteve.py +17 -9
- webscout/Provider/cerebras.py +3 -1
- webscout/Provider/koala.py +170 -268
- webscout/Provider/llmchat.py +3 -0
- webscout/Provider/lmarena.py +198 -0
- webscout/Provider/meta.py +7 -4
- webscout/Provider/samurai.py +223 -0
- webscout/Provider/scira_chat.py +4 -2
- webscout/Provider/typefully.py +23 -151
- webscout/__init__.py +4 -2
- webscout/cli.py +3 -28
- webscout/conversation.py +35 -35
- webscout/litagent/Readme.md +276 -0
- webscout/scout/README.md +402 -0
- webscout/swiftcli/Readme.md +323 -0
- webscout/version.py +1 -1
- webscout/webscout_search.py +2 -182
- webscout/webscout_search_async.py +1 -179
- webscout/zeroart/README.md +89 -0
- webscout/zeroart/__init__.py +134 -54
- webscout/zeroart/base.py +19 -13
- webscout/zeroart/effects.py +101 -99
- webscout/zeroart/fonts.py +1239 -816
- {webscout-8.2.6.dist-info → webscout-8.2.8.dist-info}/METADATA +116 -74
- {webscout-8.2.6.dist-info → webscout-8.2.8.dist-info}/RECORD +130 -103
- {webscout-8.2.6.dist-info → webscout-8.2.8.dist-info}/WHEEL +1 -1
- webscout-8.2.8.dist-info/entry_points.txt +3 -0
- webscout-8.2.8.dist-info/top_level.txt +1 -0
- webscout/Provider/AISEARCH/ISou.py +0 -256
- webscout/Provider/ElectronHub.py +0 -773
- webscout/Provider/Free2GPT.py +0 -241
- webscout/Provider/GPTWeb.py +0 -249
- webscout/Provider/bagoodex.py +0 -145
- webscout/Provider/geminiprorealtime.py +0 -160
- webscout/scout/core.py +0 -881
- webscout-8.2.6.dist-info/entry_points.txt +0 -3
- webscout-8.2.6.dist-info/top_level.txt +0 -2
- webstoken/__init__.py +0 -30
- webstoken/classifier.py +0 -189
- webstoken/keywords.py +0 -216
- webstoken/language.py +0 -128
- webstoken/ner.py +0 -164
- webstoken/normalizer.py +0 -35
- webstoken/processor.py +0 -77
- webstoken/sentiment.py +0 -206
- webstoken/stemmer.py +0 -73
- webstoken/tagger.py +0 -60
- webstoken/tokenizer.py +0 -158
- /webscout/Provider/{Youchat.py → UNFINISHED/Youchat.py} +0 -0
- {webscout-8.2.6.dist-info → webscout-8.2.8.dist-info}/licenses/LICENSE.md +0 -0
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
import requests
|
|
2
|
-
import json
|
|
3
|
-
import os
|
|
4
|
-
import secrets
|
|
5
|
-
from typing import Any, Dict, Optional, Generator, Union
|
|
6
|
-
|
|
7
|
-
from webscout.AIutel import Optimizers
|
|
8
|
-
from webscout.AIutel import Conversation
|
|
9
|
-
from webscout.AIutel import AwesomePrompts, sanitize_stream
|
|
10
|
-
from webscout.AIbase import Provider, AsyncProvider
|
|
11
|
-
from webscout import exceptions
|
|
12
|
-
from webscout.litagent import LitAgent
|
|
13
|
-
|
|
14
|
-
class GeminiPro(Provider):
|
|
15
|
-
"""
|
|
16
|
-
A class to interact with the Minitool AI API.
|
|
17
|
-
"""
|
|
18
|
-
|
|
19
|
-
def __init__(
|
|
20
|
-
self,
|
|
21
|
-
is_conversation: bool = True,
|
|
22
|
-
max_tokens: int = 2049,
|
|
23
|
-
timeout: int = 30,
|
|
24
|
-
intro: str = None,
|
|
25
|
-
filepath: str = None,
|
|
26
|
-
update_file: bool = True,
|
|
27
|
-
proxies: dict = {},
|
|
28
|
-
history_offset: int = 10250,
|
|
29
|
-
act: str = None,
|
|
30
|
-
):
|
|
31
|
-
"""Initializes the Minitool AI API client."""
|
|
32
|
-
self.url = "https://minitoolai.com/test_python/"
|
|
33
|
-
self.headers = {
|
|
34
|
-
'authority': 'minitoolai.com',
|
|
35
|
-
'method': 'POST',
|
|
36
|
-
'path': '/test_python/',
|
|
37
|
-
'scheme': 'https',
|
|
38
|
-
'accept': '*/*',
|
|
39
|
-
'content-type': 'application/json',
|
|
40
|
-
'dnt': '1',
|
|
41
|
-
'origin': 'https://minitoolai.com',
|
|
42
|
-
'priority': 'u=1, i',
|
|
43
|
-
'referer': 'https://minitoolai.com/Gemini-Pro/',
|
|
44
|
-
'sec-ch-ua': '"Microsoft Edge";v="129", "Not=A?Brand";v="8", "Chromium";v="129"',
|
|
45
|
-
'sec-ch-ua-mobile': '?0',
|
|
46
|
-
'sec-ch-ua-platform': '"Windows"',
|
|
47
|
-
'sec-fetch-dest': 'empty',
|
|
48
|
-
'sec-fetch-mode': 'cors',
|
|
49
|
-
'sec-fetch-site': 'same-origin',
|
|
50
|
-
'user-agent': LitAgent().random(),
|
|
51
|
-
'x-requested-with': 'XMLHttpRequest'
|
|
52
|
-
}
|
|
53
|
-
self.session = requests.Session()
|
|
54
|
-
self.session.headers.update(self.headers)
|
|
55
|
-
self.session.proxies.update(proxies)
|
|
56
|
-
self.timeout = timeout
|
|
57
|
-
self.last_response = {}
|
|
58
|
-
|
|
59
|
-
self.is_conversation = is_conversation
|
|
60
|
-
self.max_tokens_to_sample = max_tokens
|
|
61
|
-
self.__available_optimizers = (
|
|
62
|
-
method
|
|
63
|
-
for method in dir(Optimizers)
|
|
64
|
-
if callable(getattr(Optimizers, method)) and not method.startswith("__")
|
|
65
|
-
)
|
|
66
|
-
Conversation.intro = (
|
|
67
|
-
AwesomePrompts().get_act(
|
|
68
|
-
act, raise_not_found=True, default=None, case_insensitive=True
|
|
69
|
-
)
|
|
70
|
-
if act
|
|
71
|
-
else intro or Conversation.intro
|
|
72
|
-
)
|
|
73
|
-
self.conversation = Conversation(
|
|
74
|
-
is_conversation, self.max_tokens_to_sample, filepath, update_file
|
|
75
|
-
)
|
|
76
|
-
self.conversation.history_offset = history_offset
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
def ask(
|
|
80
|
-
self,
|
|
81
|
-
prompt: str,
|
|
82
|
-
stream: bool = False,
|
|
83
|
-
raw: bool = False,
|
|
84
|
-
optimizer: str = None,
|
|
85
|
-
conversationally: bool = False,
|
|
86
|
-
) -> Union[Dict, Generator]:
|
|
87
|
-
"""Sends a chat completion request to the Minitool AI API."""
|
|
88
|
-
|
|
89
|
-
conversation_prompt = self.conversation.gen_complete_prompt(prompt)
|
|
90
|
-
if optimizer:
|
|
91
|
-
if optimizer in self.__available_optimizers:
|
|
92
|
-
conversation_prompt = getattr(Optimizers, optimizer)(
|
|
93
|
-
conversation_prompt if conversationally else prompt
|
|
94
|
-
)
|
|
95
|
-
else:
|
|
96
|
-
raise Exception(f"Optimizer is not one of {self.__available_optimizers}")
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
payload = {"utoken": secrets.token_hex(32), "message": conversation_prompt}
|
|
100
|
-
|
|
101
|
-
def for_stream():
|
|
102
|
-
# MinitoolAI doesn't support streaming; emulate with a single yield
|
|
103
|
-
try:
|
|
104
|
-
response = self.session.post(self.url, json=payload, timeout=self.timeout)
|
|
105
|
-
response.raise_for_status()
|
|
106
|
-
data = response.json()
|
|
107
|
-
text = data.get("response", "") # Get response, default to "" if missing
|
|
108
|
-
self.last_response.update({"text": text})
|
|
109
|
-
yield {"text": text} # Yield the entire response
|
|
110
|
-
except requests.exceptions.RequestException as e:
|
|
111
|
-
raise exceptions.FailedToGenerateResponseError(f"Request failed: {e}")
|
|
112
|
-
self.conversation.update_chat_history(prompt, text) #Update chat history
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
def for_non_stream():
|
|
116
|
-
for _ in for_stream(): pass # Update last_response
|
|
117
|
-
return self.last_response
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
return for_stream() if stream else for_non_stream()
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
def chat(
|
|
124
|
-
self,
|
|
125
|
-
prompt: str,
|
|
126
|
-
stream: bool = False,
|
|
127
|
-
optimizer: str = None,
|
|
128
|
-
conversationally: bool = False,
|
|
129
|
-
) -> Union[str, Generator]:
|
|
130
|
-
"""Generate response `str`"""
|
|
131
|
-
def for_stream():
|
|
132
|
-
for response in self.ask(
|
|
133
|
-
prompt, stream=True, optimizer=optimizer, conversationally=conversationally
|
|
134
|
-
):
|
|
135
|
-
yield self.get_message(response)
|
|
136
|
-
|
|
137
|
-
def for_non_stream():
|
|
138
|
-
return self.get_message(
|
|
139
|
-
self.ask(
|
|
140
|
-
prompt, stream=False, optimizer=optimizer, conversationally=conversationally
|
|
141
|
-
)
|
|
142
|
-
)
|
|
143
|
-
|
|
144
|
-
return for_stream() if stream else for_non_stream()
|
|
145
|
-
|
|
146
|
-
def get_message(self, response: dict) -> str:
|
|
147
|
-
"""Retrieves message only from response"""
|
|
148
|
-
assert isinstance(response, dict), "Response should be of dict data-type only"
|
|
149
|
-
return response.get("text", "") # Handle missing keys
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
if __name__ == "__main__":
|
|
153
|
-
from rich import print
|
|
154
|
-
bot = GeminiPro()
|
|
155
|
-
try:
|
|
156
|
-
response = bot.chat("hi", stream=True)
|
|
157
|
-
for chunk in response:
|
|
158
|
-
print(chunk, end="", flush=True)
|
|
159
|
-
except Exception as e:
|
|
160
|
-
print(f"An error occurred: {e}")
|