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.

Files changed (134) hide show
  1. webscout/AIutel.py +2 -1
  2. webscout/Bard.py +12 -29
  3. webscout/DWEBS.py +477 -461
  4. webscout/Extra/__init__.py +2 -0
  5. webscout/Extra/autocoder/__init__.py +9 -9
  6. webscout/Extra/autocoder/{rawdog.py → autocoder.py} +849 -790
  7. webscout/Extra/autocoder/autocoder_utiles.py +332 -194
  8. webscout/Extra/gguf.py +682 -682
  9. webscout/Extra/tempmail/__init__.py +26 -0
  10. webscout/Extra/tempmail/async_utils.py +141 -0
  11. webscout/Extra/tempmail/base.py +156 -0
  12. webscout/Extra/tempmail/cli.py +187 -0
  13. webscout/Extra/tempmail/mail_tm.py +361 -0
  14. webscout/Extra/tempmail/temp_mail_io.py +292 -0
  15. webscout/Provider/AI21.py +1 -1
  16. webscout/Provider/AISEARCH/DeepFind.py +2 -2
  17. webscout/Provider/AISEARCH/ISou.py +2 -2
  18. webscout/Provider/AISEARCH/felo_search.py +6 -6
  19. webscout/Provider/AISEARCH/genspark_search.py +1 -1
  20. webscout/Provider/Aitopia.py +292 -0
  21. webscout/Provider/AllenAI.py +1 -1
  22. webscout/Provider/Andi.py +3 -3
  23. webscout/Provider/C4ai.py +1 -1
  24. webscout/Provider/ChatGPTES.py +3 -5
  25. webscout/Provider/ChatGPTGratis.py +4 -4
  26. webscout/Provider/Chatify.py +2 -2
  27. webscout/Provider/Cloudflare.py +3 -2
  28. webscout/Provider/DeepSeek.py +2 -2
  29. webscout/Provider/Deepinfra.py +288 -286
  30. webscout/Provider/ElectronHub.py +709 -634
  31. webscout/Provider/ExaChat.py +325 -0
  32. webscout/Provider/Free2GPT.py +2 -2
  33. webscout/Provider/Gemini.py +167 -179
  34. webscout/Provider/GithubChat.py +1 -1
  35. webscout/Provider/Glider.py +4 -4
  36. webscout/Provider/Groq.py +41 -27
  37. webscout/Provider/HF_space/qwen_qwen2.py +1 -1
  38. webscout/Provider/HeckAI.py +1 -1
  39. webscout/Provider/HuggingFaceChat.py +1 -1
  40. webscout/Provider/Hunyuan.py +1 -1
  41. webscout/Provider/Jadve.py +3 -3
  42. webscout/Provider/Koboldai.py +3 -3
  43. webscout/Provider/LambdaChat.py +3 -2
  44. webscout/Provider/Llama.py +3 -5
  45. webscout/Provider/Llama3.py +4 -12
  46. webscout/Provider/Marcus.py +3 -3
  47. webscout/Provider/OLLAMA.py +8 -8
  48. webscout/Provider/Openai.py +7 -3
  49. webscout/Provider/PI.py +1 -1
  50. webscout/Provider/Perplexitylabs.py +1 -1
  51. webscout/Provider/Phind.py +1 -1
  52. webscout/Provider/PizzaGPT.py +1 -1
  53. webscout/Provider/QwenLM.py +4 -7
  54. webscout/Provider/TTI/FreeAIPlayground/async_freeaiplayground.py +3 -1
  55. webscout/Provider/TTI/FreeAIPlayground/sync_freeaiplayground.py +3 -3
  56. webscout/Provider/TTI/ImgSys/__init__.py +23 -0
  57. webscout/Provider/TTI/ImgSys/async_imgsys.py +202 -0
  58. webscout/Provider/TTI/ImgSys/sync_imgsys.py +195 -0
  59. webscout/Provider/TTI/__init__.py +3 -1
  60. webscout/Provider/TTI/artbit/async_artbit.py +1 -1
  61. webscout/Provider/TTI/artbit/sync_artbit.py +1 -1
  62. webscout/Provider/TTI/huggingface/async_huggingface.py +1 -1
  63. webscout/Provider/TTI/huggingface/sync_huggingface.py +1 -1
  64. webscout/Provider/TTI/piclumen/__init__.py +22 -22
  65. webscout/Provider/TTI/piclumen/sync_piclumen.py +232 -232
  66. webscout/Provider/TTI/pixelmuse/__init__.py +4 -0
  67. webscout/Provider/TTI/pixelmuse/async_pixelmuse.py +249 -0
  68. webscout/Provider/TTI/pixelmuse/sync_pixelmuse.py +182 -0
  69. webscout/Provider/TTI/talkai/sync_talkai.py +1 -1
  70. webscout/Provider/TTS/utils.py +1 -1
  71. webscout/Provider/TeachAnything.py +1 -1
  72. webscout/Provider/TextPollinationsAI.py +232 -230
  73. webscout/Provider/TwoAI.py +1 -2
  74. webscout/Provider/Venice.py +4 -2
  75. webscout/Provider/VercelAI.py +234 -0
  76. webscout/Provider/WebSim.py +3 -2
  77. webscout/Provider/WiseCat.py +10 -12
  78. webscout/Provider/Youchat.py +1 -1
  79. webscout/Provider/__init__.py +10 -4
  80. webscout/Provider/ai4chat.py +1 -1
  81. webscout/Provider/aimathgpt.py +2 -6
  82. webscout/Provider/akashgpt.py +1 -1
  83. webscout/Provider/askmyai.py +4 -4
  84. webscout/Provider/{DARKAI.py → asksteve.py} +56 -77
  85. webscout/Provider/bagoodex.py +2 -2
  86. webscout/Provider/cerebras.py +1 -1
  87. webscout/Provider/chatglm.py +4 -4
  88. webscout/Provider/cleeai.py +1 -0
  89. webscout/Provider/copilot.py +21 -9
  90. webscout/Provider/elmo.py +1 -1
  91. webscout/Provider/flowith.py +1 -1
  92. webscout/Provider/freeaichat.py +64 -31
  93. webscout/Provider/gaurish.py +3 -5
  94. webscout/Provider/geminiprorealtime.py +1 -1
  95. webscout/Provider/granite.py +4 -4
  96. webscout/Provider/hermes.py +5 -5
  97. webscout/Provider/julius.py +1 -1
  98. webscout/Provider/koala.py +1 -1
  99. webscout/Provider/lepton.py +1 -1
  100. webscout/Provider/llama3mitril.py +4 -4
  101. webscout/Provider/llamatutor.py +1 -1
  102. webscout/Provider/llmchat.py +3 -3
  103. webscout/Provider/meta.py +1 -1
  104. webscout/Provider/multichat.py +10 -10
  105. webscout/Provider/promptrefine.py +1 -1
  106. webscout/Provider/searchchat.py +293 -0
  107. webscout/Provider/sonus.py +2 -2
  108. webscout/Provider/talkai.py +2 -2
  109. webscout/Provider/turboseek.py +1 -1
  110. webscout/Provider/tutorai.py +1 -1
  111. webscout/Provider/typegpt.py +5 -42
  112. webscout/Provider/uncovr.py +312 -297
  113. webscout/Provider/x0gpt.py +1 -1
  114. webscout/Provider/yep.py +64 -12
  115. webscout/__init__.py +3 -1
  116. webscout/cli.py +59 -98
  117. webscout/conversation.py +350 -17
  118. webscout/litprinter/__init__.py +59 -667
  119. webscout/optimizers.py +419 -419
  120. webscout/tempid.py +11 -11
  121. webscout/update_checker.py +14 -12
  122. webscout/utils.py +2 -2
  123. webscout/version.py +1 -1
  124. webscout/webscout_search.py +146 -87
  125. webscout/webscout_search_async.py +148 -27
  126. {webscout-7.7.dist-info → webscout-7.9.dist-info}/METADATA +92 -66
  127. webscout-7.9.dist-info/RECORD +248 -0
  128. webscout/Provider/EDITEE.py +0 -192
  129. webscout/litprinter/colors.py +0 -54
  130. webscout-7.7.dist-info/RECORD +0 -234
  131. {webscout-7.7.dist-info → webscout-7.9.dist-info}/LICENSE.md +0 -0
  132. {webscout-7.7.dist-info → webscout-7.9.dist-info}/WHEEL +0 -0
  133. {webscout-7.7.dist-info → webscout-7.9.dist-info}/entry_points.txt +0 -0
  134. {webscout-7.7.dist-info → webscout-7.9.dist-info}/top_level.txt +0 -0
@@ -1,179 +1,167 @@
1
-
2
- from os import path
3
- from json import load, dumps
4
- import warnings
5
- from typing import Any, Dict
6
-
7
- # Import internal modules and dependencies
8
- from ..AIutel import Optimizers, Conversation, AwesomePrompts, sanitize_stream
9
- from ..AIbase import Provider, AsyncProvider
10
- from ..Bard import Chatbot, Model
11
-
12
- # Import Logger and related classes (assumed similar to what is in yep.py)
13
- from webscout.Litlogger import Logger, LogFormat
14
-
15
- warnings.simplefilter("ignore", category=UserWarning)
16
-
17
- # Define model aliases for easy usage
18
- MODEL_ALIASES: Dict[str, Model] = {
19
- "unspecified": Model.UNSPECIFIED,
20
- "flash": Model.G_2_0_FLASH,
21
- "flash-exp": Model.G_2_0_FLASH_EXP,
22
- "thinking": Model.G_2_0_FLASH_THINKING,
23
- "thinking-with-apps": Model.G_2_0_FLASH_THINKING_WITH_APPS,
24
- "exp-advanced": Model.G_2_0_EXP_ADVANCED,
25
- "1.5-flash": Model.G_1_5_FLASH,
26
- "1.5-pro": Model.G_1_5_PRO,
27
- "1.5-pro-research": Model.G_1_5_PRO_RESEARCH,
28
- }
29
-
30
- # List of available models (friendly names)
31
- AVAILABLE_MODELS = list(MODEL_ALIASES.keys())
32
-
33
- class GEMINI(Provider):
34
- def __init__(
35
- self,
36
- cookie_file: str,
37
- model, # Accepts either a Model enum or a str alias.
38
- proxy: dict = {},
39
- timeout: int = 30,
40
- logging: bool = False # Flag to enable Logger debugging.
41
- ):
42
- """
43
- Initializes GEMINI with model support and optional debugging.
44
-
45
- Args:
46
- cookie_file (str): Path to the cookies JSON file.
47
- model (Model or str): Selected model for the session. Can be a Model enum
48
- or a string alias. Available aliases: flash, flash-exp, thinking, thinking-with-apps,
49
- exp-advanced, 1.5-flash, 1.5-pro, 1.5-pro-research.
50
- proxy (dict, optional): HTTP request proxy. Defaults to {}.
51
- timeout (int, optional): HTTP request timeout in seconds. Defaults to 30.
52
- logging (bool, optional): Flag to enable Logger debugging. Defaults to False.
53
- """
54
- self.conversation = Conversation(False)
55
-
56
- # Initialize Logger only if logging is enabled; otherwise, set to None.
57
- self.logger = Logger(name="GEMINI", format=LogFormat.MODERN_EMOJI) if logging else None
58
-
59
- # Ensure cookie_file existence.
60
- if not isinstance(cookie_file, str):
61
- raise TypeError(f"cookie_file should be of type str, not '{type(cookie_file)}'")
62
- if not path.isfile(cookie_file):
63
- raise Exception(f"{cookie_file} is not a valid file path")
64
-
65
- # If model is provided as alias (str), convert to Model enum.
66
- if isinstance(model, str):
67
- alias = model.lower()
68
- if alias in MODEL_ALIASES:
69
- selected_model = MODEL_ALIASES[alias]
70
- else:
71
- raise Exception(f"Unknown model alias: '{model}'. Available aliases: {', '.join(AVAILABLE_MODELS)}")
72
- elif isinstance(model, Model):
73
- selected_model = model
74
- else:
75
- raise TypeError("model must be a string alias or an instance of Model")
76
-
77
- # Initialize the Chatbot session using the cookie file.
78
- self.session = Chatbot(cookie_file, proxy, timeout, selected_model)
79
- self.last_response = {}
80
- self.__available_optimizers = (
81
- method for method in dir(Optimizers) if callable(getattr(Optimizers, method)) and not method.startswith("__")
82
- )
83
- if self.logger:
84
- self.logger.debug("GEMINI initialized with model: {}".format(selected_model.model_name))
85
- # Store cookies from Chatbot for later use (e.g. image generation)
86
- self.session_auth1 = self.session.secure_1psid
87
- self.session_auth2 = self.session.secure_1psidts
88
-
89
- def ask(
90
- self,
91
- prompt: str,
92
- stream: bool = False,
93
- raw: bool = False,
94
- optimizer: str = None,
95
- conversationally: bool = False,
96
- ) -> dict:
97
- """Chat with AI.
98
-
99
- Args:
100
- prompt (str): Prompt to be sent.
101
- stream (bool, optional): Flag for streaming response. Defaults to False.
102
- raw (bool, optional): Stream back raw response as received. Defaults to False.
103
- optimizer (str, optional): Prompt optimizer name (e.g., 'code', 'shell_command'). Defaults to None.
104
- conversationally (bool, optional): Chat conversationally when using optimizer. Defaults to False.
105
-
106
- Returns:
107
- dict: Response generated by the underlying Chatbot.
108
- """
109
- conversation_prompt = self.conversation.gen_complete_prompt(prompt)
110
- if optimizer:
111
- if optimizer in self.__available_optimizers:
112
- conversation_prompt = getattr(Optimizers, optimizer)(
113
- conversation_prompt if conversationally else prompt
114
- )
115
- else:
116
- raise Exception(f"Optimizer is not one of {', '.join(self.__available_optimizers)}")
117
-
118
- def for_stream():
119
- response = self.session.ask(prompt)
120
- self.last_response.update(response)
121
- self.conversation.update_chat_history(prompt, self.get_message(self.last_response))
122
- yield dumps(response) if raw else response
123
-
124
- def for_non_stream():
125
- for _ in for_stream():
126
- pass
127
- return self.last_response
128
-
129
- if self.logger:
130
- self.logger.debug(f"Request sent: {prompt}")
131
- return for_stream() if stream else for_non_stream()
132
-
133
- def chat(
134
- self,
135
- prompt: str,
136
- stream: bool = False,
137
- optimizer: str = None,
138
- conversationally: bool = False,
139
- ) -> str:
140
- """Generate response text.
141
-
142
- Args:
143
- prompt (str): Prompt to be sent.
144
- stream (bool, optional): Flag for streaming response. Defaults to False.
145
- optimizer (str, optional): Prompt optimizer name. Defaults to None.
146
- conversationally (bool, optional): Chat conversationally when using optimizer. Defaults to False.
147
-
148
- Returns:
149
- str: Response generated.
150
- """
151
- def for_stream():
152
- for response in self.ask(prompt, True, optimizer=optimizer, conversationally=conversationally):
153
- yield self.get_message(response)
154
-
155
- def for_non_stream():
156
- return self.get_message(self.ask(prompt, False, optimizer=optimizer, conversationally=conversationally))
157
-
158
- return for_stream() if stream else for_non_stream()
159
-
160
- def get_message(self, response: dict) -> str:
161
- """Retrieves message content from the response.
162
-
163
- Args:
164
- response (dict): Response generated by `self.ask`.
165
-
166
- Returns:
167
- str: Extracted message content.
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 = ""
@@ -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
  """
@@ -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] | Generator[Dict[str, Any], None, None]:
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 | Generator[str, None, None]:
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
- # "whisper-large-v3",
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
- "qwen-2.5-32b",
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
- "llama-3.2-1b-preview",
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
- # "whisper-large-v3",
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
- # "whisper-large-v3-turbo",
362
- "llama-3.1-8b-instant",
363
- "llama-guard-3-8b"
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 | AsyncGenerator:
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 | AsyncGenerator:
623
+ ) -> Union[str, AsyncGenerator]:
610
624
  """Generate response `str` asynchronously.
611
625
  Args:
612
626
  prompt (str): Prompt to be send.
@@ -4,7 +4,7 @@ import requests
4
4
  import json
5
5
  import re
6
6
  import uuid
7
- from typing import List, Dict, Generator, Optional, Any, TypedDict, Final
7
+ from typing import Union, List, Dict, Generator, Optional, Any, TypedDict, Final
8
8
 
9
9
  # Type definitions
10
10
  class Role(Enum):
@@ -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
  """
@@ -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
  """
@@ -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 | Generator[dict, None, None]:
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 | Generator[str, None, None]:
209
+ ) -> Union[str, Generator[str, None, None]]:
210
210
  """
211
211
  Generate a chat response (string).
212
212
 
@@ -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 | AsyncGenerator:
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 | AsyncGenerator:
341
+ ) -> Union[str, AsyncGenerator]:
342
342
  """Generate response `str` asynchronously.
343
343
  Args:
344
344
  prompt (str): Prompt to be send.
@@ -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__(
@@ -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 | AsyncGenerator:
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 | AsyncGenerator:
153
+ ) -> Union[str, AsyncGenerator]:
156
154
  """Generate response `str`
157
155
  Args:
158
156
  prompt (str): Prompt to be send.