webscout 8.2__py3-none-any.whl → 8.2.2__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.
- webscout/Bard.py +5 -0
- webscout/Extra/tempmail/__init__.py +2 -0
- webscout/Extra/tempmail/base.py +6 -1
- webscout/Extra/tempmail/emailnator.py +84 -0
- webscout/Local/__init__.py +8 -2
- webscout/Local/cli.py +178 -0
- webscout/Local/llm.py +104 -5
- webscout/Local/model_manager.py +48 -0
- webscout/Local/server.py +547 -13
- webscout/Provider/Gemini.py +2 -0
- webscout/Provider/OPENAI/__init__.py +2 -1
- webscout/Provider/OPENAI/c4ai.py +22 -2
- webscout/Provider/OPENAI/deepinfra.py +1 -13
- webscout/Provider/OPENAI/e2b.py +1350 -0
- webscout/Provider/OPENAI/exaai.py +1 -16
- webscout/Provider/OPENAI/freeaichat.py +1 -4
- webscout/Provider/OPENAI/typegpt.py +1 -16
- webscout/Provider/OPENAI/venice.py +1 -16
- webscout/Provider/OPENAI/writecream.py +2 -4
- webscout/Provider/OPENAI/x0gpt.py +2 -20
- webscout/Provider/OPENAI/yep.py +2 -4
- webscout/version.py +1 -1
- {webscout-8.2.dist-info → webscout-8.2.2.dist-info}/METADATA +1 -1
- {webscout-8.2.dist-info → webscout-8.2.2.dist-info}/RECORD +28 -26
- {webscout-8.2.dist-info → webscout-8.2.2.dist-info}/LICENSE.md +0 -0
- {webscout-8.2.dist-info → webscout-8.2.2.dist-info}/WHEEL +0 -0
- {webscout-8.2.dist-info → webscout-8.2.2.dist-info}/entry_points.txt +0 -0
- {webscout-8.2.dist-info → webscout-8.2.2.dist-info}/top_level.txt +0 -0
webscout/Provider/OPENAI/c4ai.py
CHANGED
|
@@ -13,8 +13,28 @@ from .utils import (
|
|
|
13
13
|
get_system_prompt, get_last_user_message, format_prompt # Import format_prompt
|
|
14
14
|
)
|
|
15
15
|
|
|
16
|
-
#
|
|
17
|
-
|
|
16
|
+
# Attempt to import LitAgent, fallback if not available
|
|
17
|
+
try:
|
|
18
|
+
from webscout.litagent import LitAgent
|
|
19
|
+
except ImportError:
|
|
20
|
+
# Define a dummy LitAgent if webscout is not installed or accessible
|
|
21
|
+
class LitAgent:
|
|
22
|
+
def generate_fingerprint(self, browser: str = "chrome") -> Dict[str, Any]:
|
|
23
|
+
# Return minimal default headers if LitAgent is unavailable
|
|
24
|
+
print("Warning: LitAgent not found. Using default minimal headers.")
|
|
25
|
+
return {
|
|
26
|
+
"accept": "*/*",
|
|
27
|
+
"accept_language": "en-US,en;q=0.9",
|
|
28
|
+
"platform": "Windows",
|
|
29
|
+
"sec_ch_ua": '"Not/A)Brand";v="99", "Google Chrome";v="127", "Chromium";v="127"',
|
|
30
|
+
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36",
|
|
31
|
+
"browser_type": browser,
|
|
32
|
+
}
|
|
33
|
+
def random(self) -> str:
|
|
34
|
+
# Return a default user agent if LitAgent is unavailable
|
|
35
|
+
print("Warning: LitAgent not found. Using default user agent.")
|
|
36
|
+
return "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36"
|
|
37
|
+
|
|
18
38
|
|
|
19
39
|
class Completions(BaseCompletions):
|
|
20
40
|
def __init__(self, client: 'C4AI'):
|
|
@@ -15,19 +15,7 @@ from .utils import (
|
|
|
15
15
|
try:
|
|
16
16
|
from webscout.litagent import LitAgent
|
|
17
17
|
except ImportError:
|
|
18
|
-
|
|
19
|
-
class LitAgent:
|
|
20
|
-
def generate_fingerprint(self, browser: str = "chrome") -> Dict[str, Any]:
|
|
21
|
-
# Return minimal default headers if LitAgent is unavailable
|
|
22
|
-
print("Warning: LitAgent not found. Using default minimal headers.")
|
|
23
|
-
return {
|
|
24
|
-
"accept": "*/*",
|
|
25
|
-
"accept_language": "en-US,en;q=0.9",
|
|
26
|
-
"platform": "Windows",
|
|
27
|
-
"sec_ch_ua": '"Not/A)Brand";v="99", "Google Chrome";v="127", "Chromium";v="127"',
|
|
28
|
-
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36",
|
|
29
|
-
"browser_type": browser,
|
|
30
|
-
}
|
|
18
|
+
pass
|
|
31
19
|
|
|
32
20
|
# --- DeepInfra Client ---
|
|
33
21
|
|