webscout 6.2b0__py3-none-any.whl → 6.4__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 (97) hide show
  1. webscout/AIauto.py +191 -176
  2. webscout/AIbase.py +112 -239
  3. webscout/AIutel.py +488 -1130
  4. webscout/Agents/functioncall.py +248 -198
  5. webscout/Bing_search.py +250 -153
  6. webscout/DWEBS.py +454 -178
  7. webscout/Extra/__init__.py +2 -1
  8. webscout/Extra/autocoder/__init__.py +9 -0
  9. webscout/Extra/autocoder/autocoder_utiles.py +121 -0
  10. webscout/Extra/autocoder/rawdog.py +681 -0
  11. webscout/Extra/autollama.py +246 -195
  12. webscout/Extra/gguf.py +441 -226
  13. webscout/Extra/weather.py +172 -67
  14. webscout/LLM.py +442 -100
  15. webscout/Litlogger/__init__.py +681 -0
  16. webscout/Local/formats.py +4 -2
  17. webscout/Provider/Amigo.py +19 -10
  18. webscout/Provider/Andi.py +0 -33
  19. webscout/Provider/Blackboxai.py +4 -204
  20. webscout/Provider/DARKAI.py +1 -1
  21. webscout/Provider/EDITEE.py +1 -1
  22. webscout/Provider/Llama3.py +1 -1
  23. webscout/Provider/Marcus.py +137 -0
  24. webscout/Provider/NinjaChat.py +1 -1
  25. webscout/Provider/PI.py +221 -207
  26. webscout/Provider/Perplexity.py +598 -598
  27. webscout/Provider/RoboCoders.py +206 -0
  28. webscout/Provider/TTI/AiForce/__init__.py +22 -0
  29. webscout/Provider/TTI/AiForce/async_aiforce.py +257 -0
  30. webscout/Provider/TTI/AiForce/sync_aiforce.py +242 -0
  31. webscout/Provider/TTI/Nexra/__init__.py +22 -0
  32. webscout/Provider/TTI/Nexra/async_nexra.py +286 -0
  33. webscout/Provider/TTI/Nexra/sync_nexra.py +258 -0
  34. webscout/Provider/TTI/PollinationsAI/__init__.py +23 -0
  35. webscout/Provider/TTI/PollinationsAI/async_pollinations.py +330 -0
  36. webscout/Provider/TTI/PollinationsAI/sync_pollinations.py +285 -0
  37. webscout/Provider/TTI/__init__.py +3 -4
  38. webscout/Provider/TTI/artbit/__init__.py +22 -0
  39. webscout/Provider/TTI/artbit/async_artbit.py +184 -0
  40. webscout/Provider/TTI/artbit/sync_artbit.py +176 -0
  41. webscout/Provider/TTI/blackbox/__init__.py +4 -0
  42. webscout/Provider/TTI/blackbox/async_blackbox.py +212 -0
  43. webscout/Provider/TTI/{blackboximage.py → blackbox/sync_blackbox.py} +199 -153
  44. webscout/Provider/TTI/deepinfra/__init__.py +4 -0
  45. webscout/Provider/TTI/deepinfra/async_deepinfra.py +227 -0
  46. webscout/Provider/TTI/deepinfra/sync_deepinfra.py +199 -0
  47. webscout/Provider/TTI/huggingface/__init__.py +22 -0
  48. webscout/Provider/TTI/huggingface/async_huggingface.py +199 -0
  49. webscout/Provider/TTI/huggingface/sync_huggingface.py +195 -0
  50. webscout/Provider/TTI/imgninza/__init__.py +4 -0
  51. webscout/Provider/TTI/imgninza/async_ninza.py +214 -0
  52. webscout/Provider/TTI/{imgninza.py → imgninza/sync_ninza.py} +209 -136
  53. webscout/Provider/TTI/talkai/__init__.py +4 -0
  54. webscout/Provider/TTI/talkai/async_talkai.py +229 -0
  55. webscout/Provider/TTI/talkai/sync_talkai.py +207 -0
  56. webscout/Provider/__init__.py +146 -132
  57. webscout/Provider/askmyai.py +158 -0
  58. webscout/Provider/cerebras.py +227 -206
  59. webscout/Provider/geminiapi.py +208 -198
  60. webscout/Provider/llama3mitril.py +180 -0
  61. webscout/Provider/llmchat.py +203 -0
  62. webscout/Provider/mhystical.py +176 -0
  63. webscout/Provider/perplexitylabs.py +265 -0
  64. webscout/Provider/talkai.py +196 -0
  65. webscout/Provider/twitterclone.py +251 -244
  66. webscout/Provider/typegpt.py +359 -0
  67. webscout/__init__.py +28 -23
  68. webscout/__main__.py +5 -5
  69. webscout/cli.py +327 -347
  70. webscout/conversation.py +227 -0
  71. webscout/exceptions.py +161 -29
  72. webscout/litagent/__init__.py +172 -0
  73. webscout/litprinter/__init__.py +831 -0
  74. webscout/optimizers.py +270 -0
  75. webscout/prompt_manager.py +279 -0
  76. webscout/swiftcli/__init__.py +810 -0
  77. webscout/transcriber.py +479 -551
  78. webscout/update_checker.py +125 -0
  79. webscout/version.py +1 -1
  80. webscout-6.4.dist-info/LICENSE.md +211 -0
  81. {webscout-6.2b0.dist-info → webscout-6.4.dist-info}/METADATA +34 -55
  82. webscout-6.4.dist-info/RECORD +154 -0
  83. webscout/Provider/TTI/AIuncensored.py +0 -103
  84. webscout/Provider/TTI/Nexra.py +0 -120
  85. webscout/Provider/TTI/PollinationsAI.py +0 -138
  86. webscout/Provider/TTI/WebSimAI.py +0 -142
  87. webscout/Provider/TTI/aiforce.py +0 -160
  88. webscout/Provider/TTI/artbit.py +0 -141
  89. webscout/Provider/TTI/deepinfra.py +0 -148
  90. webscout/Provider/TTI/huggingface.py +0 -155
  91. webscout/models.py +0 -23
  92. webscout-6.2b0.dist-info/LICENSE.md +0 -50
  93. webscout-6.2b0.dist-info/RECORD +0 -118
  94. /webscout/{g4f.py → gpt4free.py} +0 -0
  95. {webscout-6.2b0.dist-info → webscout-6.4.dist-info}/WHEEL +0 -0
  96. {webscout-6.2b0.dist-info → webscout-6.4.dist-info}/entry_points.txt +0 -0
  97. {webscout-6.2b0.dist-info → webscout-6.4.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,121 @@
1
+ """AutoCoder utilities module."""
2
+
3
+ import os
4
+ import platform
5
+ import datetime
6
+ import pygetwindow as gw
7
+ import sys
8
+
9
+ from webscout.optimizers import Optimizers
10
+
11
+ def get_current_app():
12
+ """Get the current active application name."""
13
+ try:
14
+ active_window = gw.getActiveWindow()
15
+ return f"{active_window.title if active_window else 'Unknown'}"
16
+ except Exception as e:
17
+ return "Unknown"
18
+
19
+ def get_intro_prompt():
20
+ """Get the introduction prompt for the AutoCoder."""
21
+ current_app = get_current_app()
22
+ python_version = sys.version.split()[0]
23
+
24
+ return f"""
25
+ You are a command-line coding assistant called Rawdog that generates and auto-executes Python scripts.
26
+
27
+ A typical interaction goes like this:
28
+ 1. The user gives you a natural language PROMPT.
29
+ 2. You:
30
+ i. Determine what needs to be done
31
+ ii. Write a short Python SCRIPT to do it
32
+ iii. Communicate back to the user by printing to the console in that SCRIPT
33
+ 3. The compiler extracts the script and then runs it using exec(). If there will be an exception raised,
34
+ it will be send back to you starting with "PREVIOUS SCRIPT EXCEPTION:".
35
+ 4. In case of exception, regenerate error free script.
36
+
37
+ If you need to review script outputs before completing the task, you can print the word "CONTINUE" at the end of your SCRIPT.
38
+ This can be useful for summarizing documents or technical readouts, reading instructions before
39
+ deciding what to do, or other tasks that require multi-step reasoning.
40
+ A typical 'CONTINUE' interaction looks like this:
41
+ 1. The user gives you a natural language PROMPT.
42
+ 2. You:
43
+ i. Determine what needs to be done
44
+ ii. Determine that you need to see the output of some subprocess call to complete the task
45
+ iii. Write a short Python SCRIPT to print that and then print the word "CONTINUE"
46
+ 3. The compiler
47
+ i. Checks and runs your SCRIPT
48
+ ii. Captures the output and appends it to the conversation as "LAST SCRIPT OUTPUT:"
49
+ iii. Finds the word "CONTINUE" and sends control back to you
50
+ 4. You again:
51
+ i. Look at the original PROMPT + the "LAST SCRIPT OUTPUT:" to determine what needs to be done
52
+ ii. Write a short Python SCRIPT to do it
53
+ iii. Communicate back to the user by printing to the console in that SCRIPT
54
+ 5. The compiler...
55
+
56
+ Please follow these conventions carefully:
57
+ - Decline any tasks that seem dangerous, irreversible, or that you don't understand.
58
+ - Always review the full conversation prior to answering and maintain continuity.
59
+ - If asked for information, just print the information clearly and concisely.
60
+ - If asked to do something, print a concise summary of what you've done as confirmation.
61
+ - If asked a question, respond in a friendly, conversational way. Use programmatically-generated and natural language responses as appropriate.
62
+ - If you need clarification, return a SCRIPT that prints your question. In the next interaction, continue based on the user's response.
63
+ - 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.
64
+ - Actively clean up any temporary processes or files you use.
65
+ - When looking through files, use git as available to skip files, and skip hidden files (.env, .git, etc) by default.
66
+ - You can plot anything with matplotlib.
67
+ - 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.
68
+
69
+ Environment Information:
70
+ - System: {platform.system()}
71
+ - Python: {python_version}
72
+ - Directory: {os.getcwd()}
73
+ - Datetime: {datetime.datetime.now()}
74
+ - Active App: {current_app}
75
+ """
76
+
77
+ EXAMPLES = """
78
+ EXAMPLES:
79
+
80
+
81
+ 1. User: Kill the process running on port 3000
82
+
83
+ LLM:
84
+ ```python
85
+ import os
86
+ os.system("kill $(lsof -t -i:3000)")
87
+ print("Process killed")
88
+ ```
89
+
90
+ 2. User: Summarize my essay
91
+
92
+ LLM:
93
+ ```python
94
+ import glob
95
+ files = glob.glob("*essay*.*")
96
+ with open(files[0], "r") as f:
97
+ print(f.read())
98
+ ```
99
+ CONTINUE
100
+
101
+ User:
102
+ LAST SCRIPT OUTPUT:
103
+ John Smith
104
+ Essay 2021-09-01
105
+ ...
106
+
107
+ LLM:
108
+ ```python
109
+ print("The essay is about...")
110
+ ```
111
+
112
+ 3. User: Weather in qazigund
113
+
114
+ LLM:
115
+ ```python
116
+ from webscout import weather as w
117
+ weather = w.get("Qazigund")
118
+ w.print_weather(weather)
119
+ ```
120
+
121
+ """