webscout 7.7__py3-none-any.whl → 7.9__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/AIutel.py +2 -1
- webscout/Bard.py +12 -29
- webscout/DWEBS.py +477 -461
- webscout/Extra/__init__.py +2 -0
- webscout/Extra/autocoder/__init__.py +9 -9
- webscout/Extra/autocoder/{rawdog.py → autocoder.py} +849 -790
- webscout/Extra/autocoder/autocoder_utiles.py +332 -194
- webscout/Extra/gguf.py +682 -682
- webscout/Extra/tempmail/__init__.py +26 -0
- webscout/Extra/tempmail/async_utils.py +141 -0
- webscout/Extra/tempmail/base.py +156 -0
- webscout/Extra/tempmail/cli.py +187 -0
- webscout/Extra/tempmail/mail_tm.py +361 -0
- webscout/Extra/tempmail/temp_mail_io.py +292 -0
- webscout/Provider/AI21.py +1 -1
- webscout/Provider/AISEARCH/DeepFind.py +2 -2
- webscout/Provider/AISEARCH/ISou.py +2 -2
- webscout/Provider/AISEARCH/felo_search.py +6 -6
- webscout/Provider/AISEARCH/genspark_search.py +1 -1
- webscout/Provider/Aitopia.py +292 -0
- webscout/Provider/AllenAI.py +1 -1
- webscout/Provider/Andi.py +3 -3
- webscout/Provider/C4ai.py +1 -1
- webscout/Provider/ChatGPTES.py +3 -5
- webscout/Provider/ChatGPTGratis.py +4 -4
- webscout/Provider/Chatify.py +2 -2
- webscout/Provider/Cloudflare.py +3 -2
- webscout/Provider/DeepSeek.py +2 -2
- webscout/Provider/Deepinfra.py +288 -286
- webscout/Provider/ElectronHub.py +709 -634
- webscout/Provider/ExaChat.py +325 -0
- webscout/Provider/Free2GPT.py +2 -2
- webscout/Provider/Gemini.py +167 -179
- webscout/Provider/GithubChat.py +1 -1
- webscout/Provider/Glider.py +4 -4
- webscout/Provider/Groq.py +41 -27
- webscout/Provider/HF_space/qwen_qwen2.py +1 -1
- webscout/Provider/HeckAI.py +1 -1
- webscout/Provider/HuggingFaceChat.py +1 -1
- webscout/Provider/Hunyuan.py +1 -1
- webscout/Provider/Jadve.py +3 -3
- webscout/Provider/Koboldai.py +3 -3
- webscout/Provider/LambdaChat.py +3 -2
- webscout/Provider/Llama.py +3 -5
- webscout/Provider/Llama3.py +4 -12
- webscout/Provider/Marcus.py +3 -3
- webscout/Provider/OLLAMA.py +8 -8
- webscout/Provider/Openai.py +7 -3
- webscout/Provider/PI.py +1 -1
- webscout/Provider/Perplexitylabs.py +1 -1
- webscout/Provider/Phind.py +1 -1
- webscout/Provider/PizzaGPT.py +1 -1
- webscout/Provider/QwenLM.py +4 -7
- webscout/Provider/TTI/FreeAIPlayground/async_freeaiplayground.py +3 -1
- webscout/Provider/TTI/FreeAIPlayground/sync_freeaiplayground.py +3 -3
- webscout/Provider/TTI/ImgSys/__init__.py +23 -0
- webscout/Provider/TTI/ImgSys/async_imgsys.py +202 -0
- webscout/Provider/TTI/ImgSys/sync_imgsys.py +195 -0
- webscout/Provider/TTI/__init__.py +3 -1
- webscout/Provider/TTI/artbit/async_artbit.py +1 -1
- webscout/Provider/TTI/artbit/sync_artbit.py +1 -1
- webscout/Provider/TTI/huggingface/async_huggingface.py +1 -1
- webscout/Provider/TTI/huggingface/sync_huggingface.py +1 -1
- webscout/Provider/TTI/piclumen/__init__.py +22 -22
- webscout/Provider/TTI/piclumen/sync_piclumen.py +232 -232
- webscout/Provider/TTI/pixelmuse/__init__.py +4 -0
- webscout/Provider/TTI/pixelmuse/async_pixelmuse.py +249 -0
- webscout/Provider/TTI/pixelmuse/sync_pixelmuse.py +182 -0
- webscout/Provider/TTI/talkai/sync_talkai.py +1 -1
- webscout/Provider/TTS/utils.py +1 -1
- webscout/Provider/TeachAnything.py +1 -1
- webscout/Provider/TextPollinationsAI.py +232 -230
- webscout/Provider/TwoAI.py +1 -2
- webscout/Provider/Venice.py +4 -2
- webscout/Provider/VercelAI.py +234 -0
- webscout/Provider/WebSim.py +3 -2
- webscout/Provider/WiseCat.py +10 -12
- webscout/Provider/Youchat.py +1 -1
- webscout/Provider/__init__.py +10 -4
- webscout/Provider/ai4chat.py +1 -1
- webscout/Provider/aimathgpt.py +2 -6
- webscout/Provider/akashgpt.py +1 -1
- webscout/Provider/askmyai.py +4 -4
- webscout/Provider/{DARKAI.py → asksteve.py} +56 -77
- webscout/Provider/bagoodex.py +2 -2
- webscout/Provider/cerebras.py +1 -1
- webscout/Provider/chatglm.py +4 -4
- webscout/Provider/cleeai.py +1 -0
- webscout/Provider/copilot.py +21 -9
- webscout/Provider/elmo.py +1 -1
- webscout/Provider/flowith.py +1 -1
- webscout/Provider/freeaichat.py +64 -31
- webscout/Provider/gaurish.py +3 -5
- webscout/Provider/geminiprorealtime.py +1 -1
- webscout/Provider/granite.py +4 -4
- webscout/Provider/hermes.py +5 -5
- webscout/Provider/julius.py +1 -1
- webscout/Provider/koala.py +1 -1
- webscout/Provider/lepton.py +1 -1
- webscout/Provider/llama3mitril.py +4 -4
- webscout/Provider/llamatutor.py +1 -1
- webscout/Provider/llmchat.py +3 -3
- webscout/Provider/meta.py +1 -1
- webscout/Provider/multichat.py +10 -10
- webscout/Provider/promptrefine.py +1 -1
- webscout/Provider/searchchat.py +293 -0
- webscout/Provider/sonus.py +2 -2
- webscout/Provider/talkai.py +2 -2
- webscout/Provider/turboseek.py +1 -1
- webscout/Provider/tutorai.py +1 -1
- webscout/Provider/typegpt.py +5 -42
- webscout/Provider/uncovr.py +312 -297
- webscout/Provider/x0gpt.py +1 -1
- webscout/Provider/yep.py +64 -12
- webscout/__init__.py +3 -1
- webscout/cli.py +59 -98
- webscout/conversation.py +350 -17
- webscout/litprinter/__init__.py +59 -667
- webscout/optimizers.py +419 -419
- webscout/tempid.py +11 -11
- webscout/update_checker.py +14 -12
- webscout/utils.py +2 -2
- webscout/version.py +1 -1
- webscout/webscout_search.py +146 -87
- webscout/webscout_search_async.py +148 -27
- {webscout-7.7.dist-info → webscout-7.9.dist-info}/METADATA +92 -66
- webscout-7.9.dist-info/RECORD +248 -0
- webscout/Provider/EDITEE.py +0 -192
- webscout/litprinter/colors.py +0 -54
- webscout-7.7.dist-info/RECORD +0 -234
- {webscout-7.7.dist-info → webscout-7.9.dist-info}/LICENSE.md +0 -0
- {webscout-7.7.dist-info → webscout-7.9.dist-info}/WHEEL +0 -0
- {webscout-7.7.dist-info → webscout-7.9.dist-info}/entry_points.txt +0 -0
- {webscout-7.7.dist-info → webscout-7.9.dist-info}/top_level.txt +0 -0
webscout/Provider/Gemini.py
CHANGED
|
@@ -1,179 +1,167 @@
|
|
|
1
|
-
|
|
2
|
-
from
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
from ..
|
|
9
|
-
from ..
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
"
|
|
23
|
-
"thinking
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
#
|
|
60
|
-
if
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
#
|
|
78
|
-
self.
|
|
79
|
-
self.
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
"""
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
""
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
"""
|
|
169
|
-
if not isinstance(response, dict):
|
|
170
|
-
raise TypeError("Response should be of type dict")
|
|
171
|
-
return response["content"]
|
|
172
|
-
|
|
173
|
-
def reset(self):
|
|
174
|
-
"""Reset the current conversation."""
|
|
175
|
-
self.session.async_chatbot.conversation_id = ""
|
|
176
|
-
self.session.async_chatbot.response_id = ""
|
|
177
|
-
self.session.async_chatbot.choice_id = ""
|
|
178
|
-
if self.logger:
|
|
179
|
-
self.logger.debug("Conversation reset")
|
|
1
|
+
from os import path
|
|
2
|
+
from json import load, dumps
|
|
3
|
+
import warnings
|
|
4
|
+
from typing import Union, Any, Dict
|
|
5
|
+
|
|
6
|
+
# Import internal modules and dependencies
|
|
7
|
+
from ..AIutel import Optimizers, Conversation, AwesomePrompts, sanitize_stream
|
|
8
|
+
from ..AIbase import Provider, AsyncProvider
|
|
9
|
+
from ..Bard import Chatbot, Model
|
|
10
|
+
|
|
11
|
+
warnings.simplefilter("ignore", category=UserWarning)
|
|
12
|
+
|
|
13
|
+
# Define model aliases for easy usage
|
|
14
|
+
MODEL_ALIASES: Dict[str, Model] = {
|
|
15
|
+
"unspecified": Model.UNSPECIFIED,
|
|
16
|
+
"gemini-2.0-flash": Model.G_2_0_FLASH,
|
|
17
|
+
"gemini-2.0-flash-thinking": Model.G_2_0_FLASH_THINKING,
|
|
18
|
+
"gemini-2.5-pro": Model.G_2_5_PRO,
|
|
19
|
+
"gemini-2.0-exp-advanced": Model.G_2_0_EXP_ADVANCED,
|
|
20
|
+
"gemini-2.5-exp-advanced": Model.G_2_5_EXP_ADVANCED,
|
|
21
|
+
# Add shorter aliases for convenience
|
|
22
|
+
"flash": Model.G_2_0_FLASH,
|
|
23
|
+
"thinking": Model.G_2_0_FLASH_THINKING,
|
|
24
|
+
"pro": Model.G_2_5_PRO,
|
|
25
|
+
"advanced": Model.G_2_0_EXP_ADVANCED,
|
|
26
|
+
"advanced-2.5": Model.G_2_5_EXP_ADVANCED,
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
# List of available models (friendly names)
|
|
30
|
+
AVAILABLE_MODELS = list(MODEL_ALIASES.keys())
|
|
31
|
+
|
|
32
|
+
class GEMINI(Provider):
|
|
33
|
+
def __init__(
|
|
34
|
+
self,
|
|
35
|
+
cookie_file: str,
|
|
36
|
+
model: str = "flash", # Accepts either a Model enum or a str alias.
|
|
37
|
+
proxy: dict = {},
|
|
38
|
+
timeout: int = 30,
|
|
39
|
+
):
|
|
40
|
+
"""
|
|
41
|
+
Initializes GEMINI with model support.
|
|
42
|
+
|
|
43
|
+
Args:
|
|
44
|
+
cookie_file (str): Path to the cookies JSON file.
|
|
45
|
+
model (Model or str): Selected model for the session. Can be a Model enum
|
|
46
|
+
or a string alias. Available aliases: flash, flash-exp, thinking, thinking-with-apps,
|
|
47
|
+
exp-advanced, 2.5-exp-advanced, 2.5-pro, 1.5-flash, 1.5-pro, 1.5-pro-research.
|
|
48
|
+
proxy (dict, optional): HTTP request proxy. Defaults to {}.
|
|
49
|
+
timeout (int, optional): HTTP request timeout in seconds. Defaults to 30.
|
|
50
|
+
"""
|
|
51
|
+
self.conversation = Conversation(False)
|
|
52
|
+
|
|
53
|
+
# Ensure cookie_file existence.
|
|
54
|
+
if not isinstance(cookie_file, str):
|
|
55
|
+
raise TypeError(f"cookie_file should be of type str, not '{type(cookie_file)}'")
|
|
56
|
+
if not path.isfile(cookie_file):
|
|
57
|
+
raise Exception(f"{cookie_file} is not a valid file path")
|
|
58
|
+
|
|
59
|
+
# If model is provided as alias (str), convert to Model enum.
|
|
60
|
+
if isinstance(model, str):
|
|
61
|
+
alias = model.lower()
|
|
62
|
+
if alias in MODEL_ALIASES:
|
|
63
|
+
selected_model = MODEL_ALIASES[alias]
|
|
64
|
+
else:
|
|
65
|
+
raise Exception(f"Unknown model alias: '{model}'. Available aliases: {', '.join(AVAILABLE_MODELS)}")
|
|
66
|
+
elif isinstance(model, Model):
|
|
67
|
+
selected_model = model
|
|
68
|
+
else:
|
|
69
|
+
raise TypeError("model must be a string alias or an instance of Model")
|
|
70
|
+
|
|
71
|
+
# Initialize the Chatbot session using the cookie file.
|
|
72
|
+
self.session = Chatbot(cookie_file, proxy, timeout, selected_model)
|
|
73
|
+
self.last_response = {}
|
|
74
|
+
self.__available_optimizers = (
|
|
75
|
+
method for method in dir(Optimizers) if callable(getattr(Optimizers, method)) and not method.startswith("__")
|
|
76
|
+
)
|
|
77
|
+
# Store cookies from Chatbot for later use (e.g. image generation)
|
|
78
|
+
self.session_auth1 = self.session.secure_1psid
|
|
79
|
+
self.session_auth2 = self.session.secure_1psidts
|
|
80
|
+
|
|
81
|
+
def ask(
|
|
82
|
+
self,
|
|
83
|
+
prompt: str,
|
|
84
|
+
stream: bool = False,
|
|
85
|
+
raw: bool = False,
|
|
86
|
+
optimizer: str = None,
|
|
87
|
+
conversationally: bool = False,
|
|
88
|
+
) -> dict:
|
|
89
|
+
"""Chat with AI.
|
|
90
|
+
|
|
91
|
+
Args:
|
|
92
|
+
prompt (str): Prompt to be sent.
|
|
93
|
+
stream (bool, optional): Flag for streaming response. Defaults to False.
|
|
94
|
+
raw (bool, optional): Stream back raw response as received. Defaults to False.
|
|
95
|
+
optimizer (str, optional): Prompt optimizer name (e.g., 'code', 'shell_command'). Defaults to None.
|
|
96
|
+
conversationally (bool, optional): Chat conversationally when using optimizer. Defaults to False.
|
|
97
|
+
|
|
98
|
+
Returns:
|
|
99
|
+
dict: Response generated by the underlying Chatbot.
|
|
100
|
+
"""
|
|
101
|
+
conversation_prompt = self.conversation.gen_complete_prompt(prompt)
|
|
102
|
+
if optimizer:
|
|
103
|
+
if optimizer in self.__available_optimizers:
|
|
104
|
+
conversation_prompt = getattr(Optimizers, optimizer)(
|
|
105
|
+
conversation_prompt if conversationally else prompt
|
|
106
|
+
)
|
|
107
|
+
else:
|
|
108
|
+
raise Exception(f"Optimizer is not one of {', '.join(self.__available_optimizers)}")
|
|
109
|
+
|
|
110
|
+
def for_stream():
|
|
111
|
+
response = self.session.ask(prompt)
|
|
112
|
+
self.last_response.update(response)
|
|
113
|
+
self.conversation.update_chat_history(prompt, self.get_message(self.last_response))
|
|
114
|
+
yield dumps(response) if raw else response
|
|
115
|
+
|
|
116
|
+
def for_non_stream():
|
|
117
|
+
for _ in for_stream():
|
|
118
|
+
pass
|
|
119
|
+
return self.last_response
|
|
120
|
+
|
|
121
|
+
return for_stream() if stream else for_non_stream()
|
|
122
|
+
|
|
123
|
+
def chat(
|
|
124
|
+
self,
|
|
125
|
+
prompt: str,
|
|
126
|
+
stream: bool = False,
|
|
127
|
+
optimizer: str = None,
|
|
128
|
+
conversationally: bool = False,
|
|
129
|
+
) -> str:
|
|
130
|
+
"""Generate response text.
|
|
131
|
+
|
|
132
|
+
Args:
|
|
133
|
+
prompt (str): Prompt to be sent.
|
|
134
|
+
stream (bool, optional): Flag for streaming response. Defaults to False.
|
|
135
|
+
optimizer (str, optional): Prompt optimizer name. Defaults to None.
|
|
136
|
+
conversationally (bool, optional): Chat conversationally when using optimizer. Defaults to False.
|
|
137
|
+
|
|
138
|
+
Returns:
|
|
139
|
+
str: Response generated.
|
|
140
|
+
"""
|
|
141
|
+
def for_stream():
|
|
142
|
+
for response in self.ask(prompt, True, optimizer=optimizer, conversationally=conversationally):
|
|
143
|
+
yield self.get_message(response)
|
|
144
|
+
|
|
145
|
+
def for_non_stream():
|
|
146
|
+
return self.get_message(self.ask(prompt, False, optimizer=optimizer, conversationally=conversationally))
|
|
147
|
+
|
|
148
|
+
return for_stream() if stream else for_non_stream()
|
|
149
|
+
|
|
150
|
+
def get_message(self, response: dict) -> str:
|
|
151
|
+
"""Retrieves message content from the response.
|
|
152
|
+
|
|
153
|
+
Args:
|
|
154
|
+
response (dict): Response generated by `self.ask`.
|
|
155
|
+
|
|
156
|
+
Returns:
|
|
157
|
+
str: Extracted message content.
|
|
158
|
+
"""
|
|
159
|
+
if not isinstance(response, dict):
|
|
160
|
+
raise TypeError("Response should be of type dict")
|
|
161
|
+
return response["content"]
|
|
162
|
+
|
|
163
|
+
def reset(self):
|
|
164
|
+
"""Reset the current conversation."""
|
|
165
|
+
self.session.async_chatbot.conversation_id = ""
|
|
166
|
+
self.session.async_chatbot.response_id = ""
|
|
167
|
+
self.session.async_chatbot.choice_id = ""
|
webscout/Provider/GithubChat.py
CHANGED
|
@@ -8,7 +8,7 @@ from webscout.AIutel import Optimizers
|
|
|
8
8
|
from webscout.AIutel import AwesomePrompts
|
|
9
9
|
from webscout.AIbase import Provider
|
|
10
10
|
from webscout import exceptions
|
|
11
|
-
from webscout import LitAgent
|
|
11
|
+
from webscout.litagent import LitAgent
|
|
12
12
|
|
|
13
13
|
class GithubChat(Provider):
|
|
14
14
|
"""
|
webscout/Provider/Glider.py
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import requests
|
|
2
2
|
import json
|
|
3
|
-
from typing import Any, Dict, Generator, Optional
|
|
3
|
+
from typing import Union, Any, Dict, Generator, Optional
|
|
4
4
|
|
|
5
5
|
from webscout.AIutel import Optimizers, Conversation, AwesomePrompts
|
|
6
6
|
from webscout.AIbase import Provider
|
|
7
7
|
from webscout import exceptions
|
|
8
|
-
from webscout import LitAgent as Lit
|
|
8
|
+
from webscout.litagent import LitAgent as Lit
|
|
9
9
|
|
|
10
10
|
class GliderAI(Provider):
|
|
11
11
|
"""
|
|
@@ -81,7 +81,7 @@ class GliderAI(Provider):
|
|
|
81
81
|
raw: bool = False,
|
|
82
82
|
optimizer: Optional[str] = None,
|
|
83
83
|
conversationally: bool = False,
|
|
84
|
-
) -> Dict[str, Any]
|
|
84
|
+
) -> Union[Dict[str, Any], Generator[Any, None, None]]:
|
|
85
85
|
"""Chat with AI.
|
|
86
86
|
|
|
87
87
|
Args:
|
|
@@ -151,7 +151,7 @@ class GliderAI(Provider):
|
|
|
151
151
|
stream: bool = False,
|
|
152
152
|
optimizer: Optional[str] = None,
|
|
153
153
|
conversationally: bool = False,
|
|
154
|
-
) -> str
|
|
154
|
+
) -> Union[str, Generator[str, None, None]]:
|
|
155
155
|
"""Generate response as a string.
|
|
156
156
|
|
|
157
157
|
Args:
|
webscout/Provider/Groq.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from typing import Any, AsyncGenerator, Dict, Optional, Callable, List
|
|
1
|
+
from typing import Any, AsyncGenerator, Dict, Optional, Callable, List, Union
|
|
2
2
|
|
|
3
3
|
import httpx
|
|
4
4
|
import requests
|
|
@@ -16,26 +16,31 @@ class GROQ(Provider):
|
|
|
16
16
|
"""
|
|
17
17
|
|
|
18
18
|
AVAILABLE_MODELS = [
|
|
19
|
-
|
|
19
|
+
"distil-whisper-large-v3-en",
|
|
20
|
+
"gemma2-9b-it",
|
|
21
|
+
"llama-3.3-70b-versatile",
|
|
22
|
+
"llama-3.1-8b-instant",
|
|
23
|
+
"llama-guard-3-8b",
|
|
20
24
|
"llama3-70b-8192",
|
|
21
|
-
"
|
|
25
|
+
"llama3-8b-8192",
|
|
26
|
+
"whisper-large-v3",
|
|
27
|
+
"whisper-large-v3-turbo",
|
|
28
|
+
"meta-llama/llama-4-scout-17b-16e-instruct",
|
|
29
|
+
"meta-llama/llama-4-maverick-17b-128e-instruct",
|
|
30
|
+
"playai-tts",
|
|
31
|
+
"playai-tts-arabic",
|
|
32
|
+
"qwen-qwq-32b",
|
|
33
|
+
"mistral-saba-24b",
|
|
22
34
|
"qwen-2.5-coder-32b",
|
|
35
|
+
"qwen-2.5-32b",
|
|
23
36
|
"deepseek-r1-distill-qwen-32b",
|
|
24
37
|
"deepseek-r1-distill-llama-70b",
|
|
38
|
+
"llama-3.3-70b-specdec",
|
|
39
|
+
"llama-3.2-1b-preview",
|
|
25
40
|
"llama-3.2-3b-preview",
|
|
26
|
-
"gemma2-9b-it",
|
|
27
|
-
"llama-3.2-11b-vision-preview",
|
|
28
|
-
"llama3-8b-8192",
|
|
29
|
-
"llama-3.3-70b-versatile",
|
|
30
41
|
"llama-3.2-11b-vision-preview",
|
|
31
|
-
# "distil-whisper-large-v3-en",
|
|
32
|
-
"mixtral-8x7b-32768",
|
|
33
|
-
"llama-3.3-70b-specdec",
|
|
34
42
|
"llama-3.2-90b-vision-preview",
|
|
35
|
-
"
|
|
36
|
-
# "whisper-large-v3-turbo",
|
|
37
|
-
"llama-3.1-8b-instant",
|
|
38
|
-
"llama-guard-3-8b"
|
|
43
|
+
"mixtral-8x7b-32768"
|
|
39
44
|
]
|
|
40
45
|
|
|
41
46
|
def __init__(
|
|
@@ -345,22 +350,31 @@ class AsyncGROQ(AsyncProvider):
|
|
|
345
350
|
"""
|
|
346
351
|
|
|
347
352
|
AVAILABLE_MODELS = [
|
|
348
|
-
|
|
349
|
-
"llama3-70b-8192",
|
|
350
|
-
"llama-3.2-3b-preview",
|
|
353
|
+
"distil-whisper-large-v3-en",
|
|
351
354
|
"gemma2-9b-it",
|
|
352
|
-
"llama-3.2-11b-vision-preview",
|
|
353
|
-
"llama3-8b-8192",
|
|
354
355
|
"llama-3.3-70b-versatile",
|
|
356
|
+
"llama-3.1-8b-instant",
|
|
357
|
+
"llama-guard-3-8b",
|
|
358
|
+
"llama3-70b-8192",
|
|
359
|
+
"llama3-8b-8192",
|
|
360
|
+
"whisper-large-v3",
|
|
361
|
+
"whisper-large-v3-turbo",
|
|
362
|
+
"meta-llama/llama-4-scout-17b-16e-instruct",
|
|
363
|
+
"meta-llama/llama-4-maverick-17b-128e-instruct",
|
|
364
|
+
"playai-tts",
|
|
365
|
+
"playai-tts-arabic",
|
|
366
|
+
"qwen-qwq-32b",
|
|
367
|
+
"mistral-saba-24b",
|
|
368
|
+
"qwen-2.5-coder-32b",
|
|
369
|
+
"qwen-2.5-32b",
|
|
370
|
+
"deepseek-r1-distill-qwen-32b",
|
|
355
371
|
"deepseek-r1-distill-llama-70b",
|
|
356
|
-
# "distil-whisper-large-v3-en",
|
|
357
|
-
"mixtral-8x7b-32768",
|
|
358
372
|
"llama-3.3-70b-specdec",
|
|
359
|
-
"llama-3.2-90b-vision-preview",
|
|
360
373
|
"llama-3.2-1b-preview",
|
|
361
|
-
|
|
362
|
-
"llama-3.
|
|
363
|
-
"llama-
|
|
374
|
+
"llama-3.2-3b-preview",
|
|
375
|
+
"llama-3.2-11b-vision-preview",
|
|
376
|
+
"llama-3.2-90b-vision-preview",
|
|
377
|
+
"mixtral-8x7b-32768"
|
|
364
378
|
]
|
|
365
379
|
|
|
366
380
|
def __init__(
|
|
@@ -459,7 +473,7 @@ class AsyncGROQ(AsyncProvider):
|
|
|
459
473
|
optimizer: str = None,
|
|
460
474
|
conversationally: bool = False,
|
|
461
475
|
tools: Optional[List[Dict[str, Any]]] = None,
|
|
462
|
-
) -> dict
|
|
476
|
+
) -> Union[dict, AsyncGenerator]:
|
|
463
477
|
"""Chat with AI asynchronously.
|
|
464
478
|
|
|
465
479
|
Args:
|
|
@@ -606,7 +620,7 @@ class AsyncGROQ(AsyncProvider):
|
|
|
606
620
|
optimizer: str = None,
|
|
607
621
|
conversationally: bool = False,
|
|
608
622
|
tools: Optional[List[Dict[str, Any]]] = None,
|
|
609
|
-
) -> str
|
|
623
|
+
) -> Union[str, AsyncGenerator]:
|
|
610
624
|
"""Generate response `str` asynchronously.
|
|
611
625
|
Args:
|
|
612
626
|
prompt (str): Prompt to be send.
|
webscout/Provider/HeckAI.py
CHANGED
|
@@ -9,7 +9,7 @@ from webscout.AIutel import Conversation
|
|
|
9
9
|
from webscout.AIutel import AwesomePrompts, sanitize_stream
|
|
10
10
|
from webscout.AIbase import Provider, AsyncProvider
|
|
11
11
|
from webscout import exceptions
|
|
12
|
-
from webscout import LitAgent
|
|
12
|
+
from webscout.litagent import LitAgent
|
|
13
13
|
|
|
14
14
|
class HeckAI(Provider):
|
|
15
15
|
"""
|
|
@@ -9,7 +9,7 @@ from typing import Any, Dict, List, Optional, Union, Generator
|
|
|
9
9
|
from webscout.AIutel import Conversation
|
|
10
10
|
from webscout.AIbase import Provider
|
|
11
11
|
from webscout import exceptions
|
|
12
|
-
from webscout import LitAgent
|
|
12
|
+
from webscout.litagent import LitAgent
|
|
13
13
|
|
|
14
14
|
class HuggingFaceChat(Provider):
|
|
15
15
|
"""
|
webscout/Provider/Hunyuan.py
CHANGED
|
@@ -11,7 +11,7 @@ from webscout.AIutel import Conversation
|
|
|
11
11
|
from webscout.AIutel import AwesomePrompts, sanitize_stream
|
|
12
12
|
from webscout.AIbase import Provider, AsyncProvider
|
|
13
13
|
from webscout import exceptions
|
|
14
|
-
from webscout import LitAgent
|
|
14
|
+
from webscout.litagent import LitAgent
|
|
15
15
|
|
|
16
16
|
class Hunyuan(Provider):
|
|
17
17
|
"""
|
webscout/Provider/Jadve.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import requests
|
|
2
2
|
import json
|
|
3
3
|
import re
|
|
4
|
-
from typing import Any, Dict, Optional, Generator
|
|
4
|
+
from typing import Union, Any, Dict, Optional, Generator
|
|
5
5
|
|
|
6
6
|
from webscout.AIutel import Optimizers, Conversation, AwesomePrompts
|
|
7
7
|
from webscout.AIbase import Provider
|
|
@@ -105,7 +105,7 @@ class JadveOpenAI(Provider):
|
|
|
105
105
|
raw: bool = False,
|
|
106
106
|
optimizer: str = None,
|
|
107
107
|
conversationally: bool = False,
|
|
108
|
-
) -> dict
|
|
108
|
+
) -> Union[dict, Generator[dict, None, None]]:
|
|
109
109
|
"""
|
|
110
110
|
Chat with AI.
|
|
111
111
|
|
|
@@ -206,7 +206,7 @@ class JadveOpenAI(Provider):
|
|
|
206
206
|
stream: bool = False,
|
|
207
207
|
optimizer: str = None,
|
|
208
208
|
conversationally: bool = False,
|
|
209
|
-
) -> str
|
|
209
|
+
) -> Union[str, Generator[str, None, None]]:
|
|
210
210
|
"""
|
|
211
211
|
Generate a chat response (string).
|
|
212
212
|
|
webscout/Provider/Koboldai.py
CHANGED
|
@@ -5,7 +5,7 @@ from ..AIutel import Conversation
|
|
|
5
5
|
from ..AIutel import AwesomePrompts, sanitize_stream
|
|
6
6
|
from ..AIbase import Provider, AsyncProvider
|
|
7
7
|
from webscout import exceptions
|
|
8
|
-
from typing import Any, AsyncGenerator, Dict
|
|
8
|
+
from typing import Union, Any, AsyncGenerator, Dict
|
|
9
9
|
import httpx
|
|
10
10
|
#------------------------------------------------------KOBOLDAI-----------------------------------------------------------
|
|
11
11
|
class KOBOLDAI(Provider):
|
|
@@ -266,7 +266,7 @@ class AsyncKOBOLDAI(AsyncProvider):
|
|
|
266
266
|
raw: bool = False,
|
|
267
267
|
optimizer: str = None,
|
|
268
268
|
conversationally: bool = False,
|
|
269
|
-
) -> dict
|
|
269
|
+
) -> Union[dict, AsyncGenerator]:
|
|
270
270
|
"""Chat with AI asynchronously.
|
|
271
271
|
|
|
272
272
|
Args:
|
|
@@ -338,7 +338,7 @@ class AsyncKOBOLDAI(AsyncProvider):
|
|
|
338
338
|
stream: bool = False,
|
|
339
339
|
optimizer: str = None,
|
|
340
340
|
conversationally: bool = False,
|
|
341
|
-
) -> str
|
|
341
|
+
) -> Union[str, AsyncGenerator]:
|
|
342
342
|
"""Generate response `str` asynchronously.
|
|
343
343
|
Args:
|
|
344
344
|
prompt (str): Prompt to be send.
|
webscout/Provider/LambdaChat.py
CHANGED
|
@@ -9,7 +9,7 @@ from typing import Any, Dict, List, Optional, Union, Generator
|
|
|
9
9
|
from webscout.AIutel import Conversation
|
|
10
10
|
from webscout.AIbase import Provider
|
|
11
11
|
from webscout import exceptions
|
|
12
|
-
from webscout import LitAgent
|
|
12
|
+
from webscout.litagent import LitAgent
|
|
13
13
|
|
|
14
14
|
class LambdaChat(Provider):
|
|
15
15
|
"""
|
|
@@ -24,7 +24,8 @@ class LambdaChat(Provider):
|
|
|
24
24
|
"hermes-3-llama-3.1-405b-fp8",
|
|
25
25
|
"llama3.1-nemotron-70b-instruct",
|
|
26
26
|
"lfm-40b",
|
|
27
|
-
"llama3.3-70b-instruct-fp8"
|
|
27
|
+
"llama3.3-70b-instruct-fp8",
|
|
28
|
+
"qwen25-coder-32b-instruct"
|
|
28
29
|
]
|
|
29
30
|
|
|
30
31
|
def __init__(
|
webscout/Provider/Llama.py
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
1
|
import requests
|
|
3
|
-
|
|
4
2
|
import json
|
|
5
3
|
|
|
6
4
|
from webscout.AIutel import Optimizers
|
|
@@ -8,7 +6,7 @@ from webscout.AIutel import Conversation
|
|
|
8
6
|
from webscout.AIutel import AwesomePrompts, sanitize_stream
|
|
9
7
|
from webscout.AIbase import Provider, AsyncProvider
|
|
10
8
|
from webscout import exceptions
|
|
11
|
-
from typing import Any, AsyncGenerator, Dict
|
|
9
|
+
from typing import Any, AsyncGenerator, Dict, Union
|
|
12
10
|
|
|
13
11
|
|
|
14
12
|
class LLAMA(Provider):
|
|
@@ -74,7 +72,7 @@ class LLAMA(Provider):
|
|
|
74
72
|
raw: bool = False,
|
|
75
73
|
optimizer: str = None,
|
|
76
74
|
conversationally: bool = False,
|
|
77
|
-
) -> dict
|
|
75
|
+
) -> Union[dict, AsyncGenerator]:
|
|
78
76
|
"""Chat with AI
|
|
79
77
|
|
|
80
78
|
Args:
|
|
@@ -152,7 +150,7 @@ class LLAMA(Provider):
|
|
|
152
150
|
stream: bool = False,
|
|
153
151
|
optimizer: str = None,
|
|
154
152
|
conversationally: bool = False,
|
|
155
|
-
) -> str
|
|
153
|
+
) -> Union[str, AsyncGenerator]:
|
|
156
154
|
"""Generate response `str`
|
|
157
155
|
Args:
|
|
158
156
|
prompt (str): Prompt to be send.
|