webscout 7.5__py3-none-any.whl → 7.7__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 (132) hide show
  1. webscout/AIauto.py +5 -53
  2. webscout/AIutel.py +8 -318
  3. webscout/DWEBS.py +460 -489
  4. webscout/Extra/YTToolkit/YTdownloader.py +14 -53
  5. webscout/Extra/YTToolkit/transcriber.py +12 -13
  6. webscout/Extra/YTToolkit/ytapi/video.py +0 -1
  7. webscout/Extra/__init__.py +0 -1
  8. webscout/Extra/autocoder/__init__.py +9 -9
  9. webscout/Extra/autocoder/autocoder_utiles.py +193 -199
  10. webscout/Extra/autocoder/rawdog.py +789 -677
  11. webscout/Extra/gguf.py +682 -428
  12. webscout/Extra/weather.py +178 -156
  13. webscout/Extra/weather_ascii.py +70 -17
  14. webscout/Litlogger/core/logger.py +1 -2
  15. webscout/Litlogger/handlers/file.py +1 -1
  16. webscout/Litlogger/styles/formats.py +0 -2
  17. webscout/Litlogger/utils/detectors.py +0 -1
  18. webscout/Provider/AISEARCH/DeepFind.py +0 -1
  19. webscout/Provider/AISEARCH/ISou.py +1 -22
  20. webscout/Provider/AISEARCH/felo_search.py +0 -1
  21. webscout/Provider/AllenAI.py +28 -30
  22. webscout/Provider/C4ai.py +29 -11
  23. webscout/Provider/ChatGPTClone.py +226 -0
  24. webscout/Provider/ChatGPTGratis.py +24 -56
  25. webscout/Provider/DeepSeek.py +25 -17
  26. webscout/Provider/Deepinfra.py +115 -48
  27. webscout/Provider/Gemini.py +1 -1
  28. webscout/Provider/Glider.py +33 -12
  29. webscout/Provider/HF_space/qwen_qwen2.py +2 -2
  30. webscout/Provider/HeckAI.py +23 -7
  31. webscout/Provider/Hunyuan.py +272 -0
  32. webscout/Provider/Jadve.py +20 -5
  33. webscout/Provider/LambdaChat.py +391 -0
  34. webscout/Provider/Netwrck.py +42 -19
  35. webscout/Provider/OLLAMA.py +256 -32
  36. webscout/Provider/PI.py +4 -2
  37. webscout/Provider/Perplexitylabs.py +26 -6
  38. webscout/Provider/PizzaGPT.py +10 -51
  39. webscout/Provider/TTI/AiForce/async_aiforce.py +4 -37
  40. webscout/Provider/TTI/AiForce/sync_aiforce.py +41 -38
  41. webscout/Provider/TTI/FreeAIPlayground/__init__.py +9 -9
  42. webscout/Provider/TTI/FreeAIPlayground/async_freeaiplayground.py +179 -206
  43. webscout/Provider/TTI/FreeAIPlayground/sync_freeaiplayground.py +180 -192
  44. webscout/Provider/TTI/MagicStudio/__init__.py +2 -0
  45. webscout/Provider/TTI/MagicStudio/async_magicstudio.py +111 -0
  46. webscout/Provider/TTI/MagicStudio/sync_magicstudio.py +109 -0
  47. webscout/Provider/TTI/PollinationsAI/async_pollinations.py +5 -24
  48. webscout/Provider/TTI/PollinationsAI/sync_pollinations.py +2 -22
  49. webscout/Provider/TTI/__init__.py +2 -3
  50. webscout/Provider/TTI/aiarta/async_aiarta.py +14 -14
  51. webscout/Provider/TTI/aiarta/sync_aiarta.py +52 -21
  52. webscout/Provider/TTI/artbit/async_artbit.py +3 -32
  53. webscout/Provider/TTI/artbit/sync_artbit.py +3 -31
  54. webscout/Provider/TTI/fastflux/__init__.py +22 -0
  55. webscout/Provider/TTI/fastflux/async_fastflux.py +261 -0
  56. webscout/Provider/TTI/fastflux/sync_fastflux.py +252 -0
  57. webscout/Provider/TTI/piclumen/__init__.py +22 -22
  58. webscout/Provider/TTI/piclumen/sync_piclumen.py +232 -232
  59. webscout/Provider/TTS/__init__.py +2 -2
  60. webscout/Provider/TTS/deepgram.py +12 -39
  61. webscout/Provider/TTS/elevenlabs.py +14 -40
  62. webscout/Provider/TTS/gesserit.py +11 -35
  63. webscout/Provider/TTS/murfai.py +13 -39
  64. webscout/Provider/TTS/parler.py +17 -40
  65. webscout/Provider/TTS/speechma.py +180 -0
  66. webscout/Provider/TTS/streamElements.py +17 -44
  67. webscout/Provider/TextPollinationsAI.py +39 -59
  68. webscout/Provider/Venice.py +25 -8
  69. webscout/Provider/WebSim.py +227 -0
  70. webscout/Provider/WiseCat.py +27 -5
  71. webscout/Provider/Youchat.py +64 -37
  72. webscout/Provider/__init__.py +12 -7
  73. webscout/Provider/akashgpt.py +20 -5
  74. webscout/Provider/flowith.py +33 -7
  75. webscout/Provider/freeaichat.py +32 -45
  76. webscout/Provider/koala.py +20 -5
  77. webscout/Provider/labyrinth.py +239 -0
  78. webscout/Provider/learnfastai.py +28 -15
  79. webscout/Provider/llamatutor.py +1 -1
  80. webscout/Provider/llmchat.py +30 -8
  81. webscout/Provider/multichat.py +65 -9
  82. webscout/Provider/sonus.py +208 -0
  83. webscout/Provider/talkai.py +1 -0
  84. webscout/Provider/turboseek.py +3 -0
  85. webscout/Provider/tutorai.py +2 -0
  86. webscout/Provider/typegpt.py +155 -65
  87. webscout/Provider/uncovr.py +297 -0
  88. webscout/Provider/x0gpt.py +3 -1
  89. webscout/Provider/yep.py +102 -20
  90. webscout/__init__.py +3 -0
  91. webscout/cli.py +53 -40
  92. webscout/conversation.py +1 -10
  93. webscout/litagent/__init__.py +2 -2
  94. webscout/litagent/agent.py +356 -20
  95. webscout/litagent/constants.py +34 -5
  96. webscout/litprinter/__init__.py +0 -3
  97. webscout/models.py +181 -0
  98. webscout/optimizers.py +1 -1
  99. webscout/prompt_manager.py +2 -8
  100. webscout/scout/core/scout.py +1 -4
  101. webscout/scout/core/search_result.py +1 -1
  102. webscout/scout/core/text_utils.py +1 -1
  103. webscout/scout/core.py +2 -5
  104. webscout/scout/element.py +1 -1
  105. webscout/scout/parsers/html_parser.py +1 -1
  106. webscout/scout/utils.py +0 -1
  107. webscout/swiftcli/__init__.py +1 -3
  108. webscout/tempid.py +1 -1
  109. webscout/update_checker.py +1 -3
  110. webscout/version.py +1 -1
  111. webscout/webscout_search_async.py +1 -2
  112. webscout/yep_search.py +297 -297
  113. {webscout-7.5.dist-info → webscout-7.7.dist-info}/LICENSE.md +4 -4
  114. {webscout-7.5.dist-info → webscout-7.7.dist-info}/METADATA +127 -405
  115. {webscout-7.5.dist-info → webscout-7.7.dist-info}/RECORD +118 -117
  116. webscout/Extra/autollama.py +0 -231
  117. webscout/Provider/Amigo.py +0 -274
  118. webscout/Provider/Bing.py +0 -243
  119. webscout/Provider/DiscordRocks.py +0 -253
  120. webscout/Provider/TTI/blackbox/__init__.py +0 -4
  121. webscout/Provider/TTI/blackbox/async_blackbox.py +0 -212
  122. webscout/Provider/TTI/blackbox/sync_blackbox.py +0 -199
  123. webscout/Provider/TTI/deepinfra/__init__.py +0 -4
  124. webscout/Provider/TTI/deepinfra/async_deepinfra.py +0 -227
  125. webscout/Provider/TTI/deepinfra/sync_deepinfra.py +0 -199
  126. webscout/Provider/TTI/imgninza/__init__.py +0 -4
  127. webscout/Provider/TTI/imgninza/async_ninza.py +0 -214
  128. webscout/Provider/TTI/imgninza/sync_ninza.py +0 -209
  129. webscout/Provider/TTS/voicepod.py +0 -117
  130. {webscout-7.5.dist-info → webscout-7.7.dist-info}/WHEEL +0 -0
  131. {webscout-7.5.dist-info → webscout-7.7.dist-info}/entry_points.txt +0 -0
  132. {webscout-7.5.dist-info → webscout-7.7.dist-info}/top_level.txt +0 -0
@@ -1,200 +1,194 @@
1
- """AutoCoder utilities module."""
2
-
3
- import os
4
- import platform
5
- import datetime
6
- import pygetwindow as gw
7
- import sys
8
- from typing import List, Optional
9
-
10
- from webscout.optimizers import Optimizers
11
- import os
12
- import platform
13
- import subprocess
14
-
15
- def get_current_app() -> str:
16
- """
17
- Get the current active application or window title in a cross-platform manner.
18
-
19
- On Windows, uses the win32gui module from pywin32.
20
- On macOS, uses AppKit to access the active application info.
21
- On Linux, uses xprop to get the active window details.
22
-
23
- Returns:
24
- A string containing the title of the active application/window, or "Unknown" if it cannot be determined.
25
- """
26
- system_name = platform.system()
27
-
28
- if system_name == "Windows":
29
- try:
30
- import win32gui # pywin32 must be installed
31
- window_handle = win32gui.GetForegroundWindow()
32
- title = win32gui.GetWindowText(window_handle)
33
- return title if title else "Unknown"
34
- except Exception:
35
- return "Unknown"
36
-
37
- elif system_name == "Darwin": # macOS
38
- try:
39
- from AppKit import NSWorkspace # type: ignore
40
- active_app = NSWorkspace.sharedWorkspace().activeApplication()
41
- title = active_app.get('NSApplicationName')
42
- return title if title else "Unknown"
43
- except Exception:
44
- return "Unknown"
45
-
46
- elif system_name == "Linux":
47
- try:
48
- # Get the active window id using xprop
49
- result = subprocess.run(
50
- ["xprop", "-root", "_NET_ACTIVE_WINDOW"],
51
- stdout=subprocess.PIPE,
52
- stderr=subprocess.PIPE,
53
- text=True
54
- )
55
- if result.returncode == 0 and result.stdout:
56
- # Expected format: _NET_ACTIVE_WINDOW(WINDOW): window id # 0x1400007
57
- parts = result.stdout.strip().split()
58
- window_id = parts[-1]
59
- if window_id != "0x0":
60
- title_result = subprocess.run(
61
- ["xprop", "-id", window_id, "WM_NAME"],
62
- stdout=subprocess.PIPE,
63
- stderr=subprocess.PIPE,
64
- text=True
65
- )
66
- if title_result.returncode == 0 and title_result.stdout:
67
- # Expected format: WM_NAME(STRING) = "Terminal"
68
- title_parts = title_result.stdout.split(" = ", 1)
69
- if len(title_parts) == 2:
70
- title = title_parts[1].strip().strip('"')
71
- return title if title else "Unknown"
72
- except Exception:
73
- pass
74
- return "Unknown"
75
- else:
76
- return "Unknown"
77
-
78
-
79
- def get_intro_prompt(name: str = "Vortex") -> str:
80
- """Get the introduction prompt for the AutoCoder."""
81
- current_app: str = get_current_app()
82
- python_version: str = sys.version.split()[0]
83
-
84
- return f"""
85
- <system_context>
86
- <purpose>
87
- You are a command-line coding assistant named Rawdog, designed to generate and auto-execute Python scripts for {name}.
88
- Your core function is to understand natural language requests, transform them into executable Python code,
89
- and return results to the user via console output. You must adhere to all instructions.
90
- </purpose>
91
-
92
- <process_description>
93
- A typical interaction unfolds as follows:
94
- 1. The user provides a natural language PROMPT.
95
- 2. You:
96
- i. Analyze the PROMPT to determine required actions.
97
- ii. Craft a short Python SCRIPT to execute those actions.
98
- iii. Provide clear and concise feedback to the user by printing to the console within your SCRIPT.
99
- 3. The compiler will then:
100
- i. Extract and execute the SCRIPT using exec().
101
- ii. Handle any exceptions that arise during script execution. Exceptions are returned to you starting with "PREVIOUS SCRIPT EXCEPTION:".
102
- 4. In cases of exceptions, ensure that you regenerate the script and return one that has no errors.
103
-
104
- <continue_process>
105
- If you need to review script outputs before task completion, include the word "CONTINUE" at the end of your SCRIPT.
106
- This allows multi-step reasoning for tasks like summarizing documents, reviewing instructions, or performing other multi-part operations.
107
- A typical 'CONTINUE' interaction looks like this:
108
- 1. The user gives you a natural language PROMPT.
109
- 2. You:
110
- i. Determine what needs to be done.
111
- ii. Determine that you need to see the output of some subprocess call to complete the task
112
- iii. Write a short Python SCRIPT to print that and then print the word "CONTINUE"
113
- 3. The compiler will:
114
- i. Check and run your SCRIPT.
115
- ii. Capture the output and append it to the conversation as "LAST SCRIPT OUTPUT:".
116
- iii. Find the word "CONTINUE" and return control back to you.
117
- 4. You will then:
118
- i. Review the original PROMPT + the "LAST SCRIPT OUTPUT:" to determine what to do
119
- ii. Write a short Python SCRIPT to complete the task.
120
- iii. Communicate back to the user by printing to the console in that SCRIPT.
121
- 5. The compiler repeats the above process...
122
- </continue_process>
123
-
124
- </process_description>
125
-
126
- <conventions>
127
- - Decline any tasks that seem dangerous, irreversible, or that you don't understand.
128
- - Always review the full conversation prior to answering and maintain continuity.
129
- - If asked for information, just print the information clearly and concisely.
130
- - If asked to do something, print a concise summary of what you've done as confirmation.
131
- - If asked a question, respond in a friendly, conversational way. Use programmatically-generated and natural language responses as appropriate.
132
- - If you need clarification, return a SCRIPT that prints your question. In the next interaction, continue based on the user's response.
133
- - Assume the user would like something concise. For example rather than printing a massive table, filter or summarize it to what's likely of interest.
134
- - Actively clean up any temporary processes or files you use.
135
- - When looking through files, use git as available to skip files, and skip hidden files (.env, .git, etc) by default.
136
- - You can plot anything with matplotlib.
137
- - **IMPORTANT**: ALWAYS Return your SCRIPT inside of a single pair of \`\`\` delimiters. Only the console output of the first such SCRIPT is visible to the user, so make sure that it's complete and don't bother returning anything else.
138
- </conventions>
139
-
140
- <environment_info>
141
- - System: {platform.system()}
142
- - Python: {python_version}
143
- - Directory: {os.getcwd()}
144
- - Datetime: {datetime.datetime.now()}
145
- - Active App: {current_app}
146
- </environment_info>
147
- </system_context>
148
- """
149
-
150
- EXAMPLES: str = """
151
- <examples>
152
- <example>
153
- <user_request>Kill the process running on port 3000</user_request>
154
- <rawdog_response>
155
- ```python
156
- import os
157
- os.system("kill $(lsof -t -i:3000)")
158
- print("Process killed")
159
- ```
160
- </rawdog_response>
161
- </example>
162
- <example>
163
- <user_request>Summarize my essay</user_request>
164
- <rawdog_response>
165
- ```python
166
- import glob
167
- files = glob.glob("*essay*.*")
168
- with open(files[0], "r") as f:
169
- print(f.read())
170
- ```
171
- CONTINUE
172
- </rawdog_response>
173
- <user_response>
174
- LAST SCRIPT OUTPUT:
175
- John Smith
176
- Essay 2021-09-01
177
- ...
178
- </user_response>
179
- <rawdog_response>
180
- ```python
181
- print("The essay is about...")
182
- ```
183
- </rawdog_response>
184
- </example>
185
- <example>
186
- <user_request>Weather in qazigund</user_request>
187
- <rawdog_response>
188
- ```python
189
- from webscout import weather as w
190
- weather = w.get("Qazigund")
191
- w.print_weather(weather)
192
- ```
193
- </rawdog_response>
194
- </example>
195
- </examples>
196
- """
197
-
198
- if __name__ == "__main__":
199
- # Simple test harness to print the current active window title.
1
+ """AutoCoder utilities module."""
2
+
3
+ import os
4
+ import platform
5
+ import datetime
6
+ import sys
7
+ import os
8
+ import platform
9
+ import subprocess
10
+
11
+ def get_current_app() -> str:
12
+ """
13
+ Get the current active application or window title in a cross-platform manner.
14
+
15
+ On Windows, uses the win32gui module from pywin32.
16
+ On macOS, uses AppKit to access the active application info.
17
+ On Linux, uses xprop to get the active window details.
18
+
19
+ Returns:
20
+ A string containing the title of the active application/window, or "Unknown" if it cannot be determined.
21
+ """
22
+ system_name = platform.system()
23
+
24
+ if system_name == "Windows":
25
+ try:
26
+ import win32gui # pywin32 must be installed
27
+ window_handle = win32gui.GetForegroundWindow()
28
+ title = win32gui.GetWindowText(window_handle)
29
+ return title if title else "Unknown"
30
+ except Exception:
31
+ return "Unknown"
32
+
33
+ elif system_name == "Darwin": # macOS
34
+ try:
35
+ from AppKit import NSWorkspace # type: ignore
36
+ active_app = NSWorkspace.sharedWorkspace().activeApplication()
37
+ title = active_app.get('NSApplicationName')
38
+ return title if title else "Unknown"
39
+ except Exception:
40
+ return "Unknown"
41
+
42
+ elif system_name == "Linux":
43
+ try:
44
+ # Get the active window id using xprop
45
+ result = subprocess.run(
46
+ ["xprop", "-root", "_NET_ACTIVE_WINDOW"],
47
+ stdout=subprocess.PIPE,
48
+ stderr=subprocess.PIPE,
49
+ text=True
50
+ )
51
+ if result.returncode == 0 and result.stdout:
52
+ # Expected format: _NET_ACTIVE_WINDOW(WINDOW): window id # 0x1400007
53
+ parts = result.stdout.strip().split()
54
+ window_id = parts[-1]
55
+ if window_id != "0x0":
56
+ title_result = subprocess.run(
57
+ ["xprop", "-id", window_id, "WM_NAME"],
58
+ stdout=subprocess.PIPE,
59
+ stderr=subprocess.PIPE,
60
+ text=True
61
+ )
62
+ if title_result.returncode == 0 and title_result.stdout:
63
+ # Expected format: WM_NAME(STRING) = "Terminal"
64
+ title_parts = title_result.stdout.split(" = ", 1)
65
+ if len(title_parts) == 2:
66
+ title = title_parts[1].strip().strip('"')
67
+ return title if title else "Unknown"
68
+ except Exception:
69
+ pass
70
+ return "Unknown"
71
+ else:
72
+ return "Unknown"
73
+
74
+
75
+ def get_intro_prompt(name: str = "Vortex") -> str:
76
+ """Get the introduction prompt for the AutoCoder."""
77
+ current_app: str = get_current_app()
78
+ python_version: str = sys.version.split()[0]
79
+
80
+ return f"""
81
+ <system_context>
82
+ <purpose>
83
+ You are a command-line coding assistant named Rawdog, designed to generate and auto-execute Python scripts for {name}.
84
+ Your core function is to understand natural language requests, transform them into executable Python code,
85
+ and return results to the user via console output. You must adhere to all instructions.
86
+ </purpose>
87
+
88
+ <process_description>
89
+ A typical interaction unfolds as follows:
90
+ 1. The user provides a natural language PROMPT.
91
+ 2. You:
92
+ i. Analyze the PROMPT to determine required actions.
93
+ ii. Craft a short Python SCRIPT to execute those actions.
94
+ iii. Provide clear and concise feedback to the user by printing to the console within your SCRIPT.
95
+ 3. The compiler will then:
96
+ i. Extract and execute the SCRIPT using exec().
97
+ ii. Handle any exceptions that arise during script execution. Exceptions are returned to you starting with "PREVIOUS SCRIPT EXCEPTION:".
98
+ 4. In cases of exceptions, ensure that you regenerate the script and return one that has no errors.
99
+
100
+ <continue_process>
101
+ If you need to review script outputs before task completion, include the word "CONTINUE" at the end of your SCRIPT.
102
+ This allows multi-step reasoning for tasks like summarizing documents, reviewing instructions, or performing other multi-part operations.
103
+ A typical 'CONTINUE' interaction looks like this:
104
+ 1. The user gives you a natural language PROMPT.
105
+ 2. You:
106
+ i. Determine what needs to be done.
107
+ ii. Determine that you need to see the output of some subprocess call to complete the task
108
+ iii. Write a short Python SCRIPT to print that and then print the word "CONTINUE"
109
+ 3. The compiler will:
110
+ i. Check and run your SCRIPT.
111
+ ii. Capture the output and append it to the conversation as "LAST SCRIPT OUTPUT:".
112
+ iii. Find the word "CONTINUE" and return control back to you.
113
+ 4. You will then:
114
+ i. Review the original PROMPT + the "LAST SCRIPT OUTPUT:" to determine what to do
115
+ ii. Write a short Python SCRIPT to complete the task.
116
+ iii. Communicate back to the user by printing to the console in that SCRIPT.
117
+ 5. The compiler repeats the above process...
118
+ </continue_process>
119
+
120
+ </process_description>
121
+
122
+ <conventions>
123
+ - Decline any tasks that seem dangerous, irreversible, or that you don't understand.
124
+ - Always review the full conversation prior to answering and maintain continuity.
125
+ - If asked for information, just print the information clearly and concisely.
126
+ - If asked to do something, print a concise summary of what you've done as confirmation.
127
+ - If asked a question, respond in a friendly, conversational way. Use programmatically-generated and natural language responses as appropriate.
128
+ - If you need clarification, return a SCRIPT that prints your question. In the next interaction, continue based on the user's response.
129
+ - Assume the user would like something concise. For example rather than printing a massive table, filter or summarize it to what's likely of interest.
130
+ - Actively clean up any temporary processes or files you use.
131
+ - When looking through files, use git as available to skip files, and skip hidden files (.env, .git, etc) by default.
132
+ - You can plot anything with matplotlib.
133
+ - **IMPORTANT**: ALWAYS Return your SCRIPT inside of a single pair of \`\`\` delimiters. Only the console output of the first such SCRIPT is visible to the user, so make sure that it's complete and don't bother returning anything else.
134
+ </conventions>
135
+
136
+ <examples>
137
+ <example>
138
+ <user_request>Kill the process running on port 3000</user_request>
139
+ <rawdog_response>
140
+ ```python
141
+ import os
142
+ os.system("kill $(lsof -t -i:3000)")
143
+ print("Process killed")
144
+ ```
145
+ </rawdog_response>
146
+ </example>
147
+ <example>
148
+ <user_request>Summarize my essay</user_request>
149
+ <rawdog_response>
150
+ ```python
151
+ import glob
152
+ files = glob.glob("*essay*.*")
153
+ with open(files[0], "r") as f:
154
+ print(f.read())
155
+ ```
156
+ CONTINUE
157
+ </rawdog_response>
158
+ <user_response>
159
+ LAST SCRIPT OUTPUT:
160
+ John Smith
161
+ Essay 2021-09-01
162
+ ...
163
+ </user_response>
164
+ <rawdog_response>
165
+ ```python
166
+ print("The essay is about...")
167
+ ```
168
+ </rawdog_response>
169
+ </example>
170
+ <example>
171
+ <user_request>Weather in qazigund</user_request>
172
+ <rawdog_response>
173
+ ```python
174
+ from webscout import weather as w
175
+ weather = w.get("Qazigund")
176
+ w.print_weather(weather)
177
+ ```
178
+ </rawdog_response>
179
+ </example>
180
+ </examples>
181
+
182
+ <environment_info>
183
+ - System: {platform.system()}
184
+ - Python: {python_version}
185
+ - Directory: {os.getcwd()}
186
+ - Datetime: {datetime.datetime.now()}
187
+ - Active App: {current_app}
188
+ </environment_info>
189
+ </system_context>
190
+ """
191
+
192
+ if __name__ == "__main__":
193
+ # Simple test harness to print the current active window title.
200
194
  print("Current Active Window/Application: ", get_current_app())