webscout 6.3__py3-none-any.whl → 6.5__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/AIauto.py +191 -176
- webscout/AIbase.py +0 -197
- webscout/AIutel.py +441 -1130
- webscout/DWEBS.py +189 -35
- webscout/{YTdownloader.py → Extra/YTToolkit/YTdownloader.py} +990 -1103
- webscout/Extra/YTToolkit/__init__.py +3 -0
- webscout/{transcriber.py → Extra/YTToolkit/transcriber.py} +479 -551
- webscout/Extra/YTToolkit/ytapi/__init__.py +6 -0
- webscout/Extra/YTToolkit/ytapi/channel.py +307 -0
- webscout/Extra/YTToolkit/ytapi/errors.py +13 -0
- webscout/Extra/YTToolkit/ytapi/extras.py +45 -0
- webscout/Extra/YTToolkit/ytapi/https.py +88 -0
- webscout/Extra/YTToolkit/ytapi/patterns.py +61 -0
- webscout/Extra/YTToolkit/ytapi/playlist.py +59 -0
- webscout/Extra/YTToolkit/ytapi/pool.py +8 -0
- webscout/Extra/YTToolkit/ytapi/query.py +37 -0
- webscout/Extra/YTToolkit/ytapi/stream.py +60 -0
- webscout/Extra/YTToolkit/ytapi/utils.py +62 -0
- webscout/Extra/YTToolkit/ytapi/video.py +102 -0
- webscout/Extra/__init__.py +3 -1
- webscout/Extra/autocoder/__init__.py +9 -0
- webscout/Extra/autocoder/autocoder_utiles.py +121 -0
- webscout/Extra/autocoder/rawdog.py +680 -0
- webscout/Extra/autollama.py +246 -195
- webscout/Extra/gguf.py +81 -56
- webscout/Extra/markdownlite/__init__.py +862 -0
- webscout/Extra/weather_ascii.py +2 -2
- webscout/LLM.py +206 -43
- webscout/Litlogger/__init__.py +681 -0
- webscout/Provider/DARKAI.py +1 -1
- webscout/Provider/EDITEE.py +1 -1
- webscout/Provider/NinjaChat.py +1 -1
- webscout/Provider/PI.py +120 -35
- webscout/Provider/Perplexity.py +590 -598
- webscout/Provider/Reka.py +0 -1
- webscout/Provider/RoboCoders.py +206 -0
- webscout/Provider/TTI/AiForce/__init__.py +22 -0
- webscout/Provider/TTI/AiForce/async_aiforce.py +257 -0
- webscout/Provider/TTI/AiForce/sync_aiforce.py +242 -0
- webscout/Provider/TTI/Nexra/__init__.py +22 -0
- webscout/Provider/TTI/Nexra/async_nexra.py +286 -0
- webscout/Provider/TTI/Nexra/sync_nexra.py +258 -0
- webscout/Provider/TTI/PollinationsAI/__init__.py +23 -0
- webscout/Provider/TTI/PollinationsAI/async_pollinations.py +330 -0
- webscout/Provider/TTI/PollinationsAI/sync_pollinations.py +285 -0
- webscout/Provider/TTI/__init__.py +2 -4
- webscout/Provider/TTI/artbit/__init__.py +22 -0
- webscout/Provider/TTI/artbit/async_artbit.py +184 -0
- webscout/Provider/TTI/artbit/sync_artbit.py +176 -0
- webscout/Provider/TTI/blackbox/__init__.py +4 -0
- webscout/Provider/TTI/blackbox/async_blackbox.py +212 -0
- webscout/Provider/TTI/{blackboximage.py → blackbox/sync_blackbox.py} +199 -153
- webscout/Provider/TTI/deepinfra/__init__.py +4 -0
- webscout/Provider/TTI/deepinfra/async_deepinfra.py +227 -0
- webscout/Provider/TTI/deepinfra/sync_deepinfra.py +199 -0
- webscout/Provider/TTI/huggingface/__init__.py +22 -0
- webscout/Provider/TTI/huggingface/async_huggingface.py +199 -0
- webscout/Provider/TTI/huggingface/sync_huggingface.py +195 -0
- webscout/Provider/TTI/imgninza/__init__.py +4 -0
- webscout/Provider/TTI/imgninza/async_ninza.py +214 -0
- webscout/Provider/TTI/{imgninza.py → imgninza/sync_ninza.py} +209 -136
- webscout/Provider/TTI/talkai/__init__.py +4 -0
- webscout/Provider/TTI/talkai/async_talkai.py +229 -0
- webscout/Provider/TTI/talkai/sync_talkai.py +207 -0
- webscout/Provider/TTS/__init__.py +5 -1
- webscout/Provider/TTS/deepgram.py +183 -0
- webscout/Provider/TTS/elevenlabs.py +137 -0
- webscout/Provider/TTS/gesserit.py +151 -0
- webscout/Provider/TTS/murfai.py +139 -0
- webscout/Provider/TTS/parler.py +134 -107
- webscout/Provider/TTS/streamElements.py +360 -275
- webscout/Provider/TTS/utils.py +280 -0
- webscout/Provider/TTS/voicepod.py +116 -116
- webscout/Provider/__init__.py +8 -1
- webscout/Provider/askmyai.py +2 -2
- webscout/Provider/cerebras.py +227 -219
- webscout/Provider/llama3mitril.py +0 -1
- webscout/Provider/meta.py +794 -779
- webscout/Provider/mhystical.py +176 -0
- webscout/Provider/perplexitylabs.py +265 -0
- webscout/Provider/twitterclone.py +251 -245
- webscout/Provider/typegpt.py +358 -0
- webscout/__init__.py +9 -8
- webscout/__main__.py +5 -5
- webscout/cli.py +252 -280
- webscout/conversation.py +227 -0
- webscout/exceptions.py +161 -29
- webscout/litagent/__init__.py +172 -0
- webscout/litprinter/__init__.py +832 -0
- webscout/optimizers.py +270 -0
- webscout/prompt_manager.py +279 -0
- webscout/scout/__init__.py +11 -0
- webscout/scout/core.py +884 -0
- webscout/scout/element.py +459 -0
- webscout/scout/parsers/__init__.py +69 -0
- webscout/scout/parsers/html5lib_parser.py +172 -0
- webscout/scout/parsers/html_parser.py +236 -0
- webscout/scout/parsers/lxml_parser.py +178 -0
- webscout/scout/utils.py +38 -0
- webscout/swiftcli/__init__.py +810 -0
- webscout/update_checker.py +125 -0
- webscout/version.py +1 -1
- webscout/zeroart/__init__.py +55 -0
- webscout/zeroart/base.py +61 -0
- webscout/zeroart/effects.py +99 -0
- webscout/zeroart/fonts.py +816 -0
- webscout/zerodir/__init__.py +225 -0
- {webscout-6.3.dist-info → webscout-6.5.dist-info}/METADATA +37 -112
- webscout-6.5.dist-info/RECORD +179 -0
- webscout/Agents/Onlinesearcher.py +0 -182
- webscout/Agents/__init__.py +0 -2
- webscout/Agents/functioncall.py +0 -248
- webscout/Bing_search.py +0 -154
- webscout/Provider/TTI/AIuncensoredimage.py +0 -103
- webscout/Provider/TTI/Nexra.py +0 -120
- webscout/Provider/TTI/PollinationsAI.py +0 -138
- webscout/Provider/TTI/WebSimAI.py +0 -142
- webscout/Provider/TTI/aiforce.py +0 -160
- webscout/Provider/TTI/artbit.py +0 -141
- webscout/Provider/TTI/deepinfra.py +0 -148
- webscout/Provider/TTI/huggingface.py +0 -155
- webscout/Provider/TTI/talkai.py +0 -116
- webscout/g4f.py +0 -666
- webscout/models.py +0 -23
- webscout/requestsHTMLfix.py +0 -775
- webscout/webai.py +0 -2590
- webscout-6.3.dist-info/RECORD +0 -124
- {webscout-6.3.dist-info → webscout-6.5.dist-info}/LICENSE.md +0 -0
- {webscout-6.3.dist-info → webscout-6.5.dist-info}/WHEEL +0 -0
- {webscout-6.3.dist-info → webscout-6.5.dist-info}/entry_points.txt +0 -0
- {webscout-6.3.dist-info → webscout-6.5.dist-info}/top_level.txt +0 -0
webscout/Provider/TTI/talkai.py
DELETED
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
import uuid
|
|
2
|
-
import requests
|
|
3
|
-
import json
|
|
4
|
-
import os
|
|
5
|
-
from typing import Any, Dict, List, Optional
|
|
6
|
-
|
|
7
|
-
from webscout.AIbase import ImageProvider
|
|
8
|
-
from webscout import exceptions
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
class TalkaiImager(ImageProvider):
|
|
12
|
-
"""
|
|
13
|
-
Image provider for Talkai.info.
|
|
14
|
-
"""
|
|
15
|
-
|
|
16
|
-
def __init__(self, timeout: int = 60, proxies: dict = {}):
|
|
17
|
-
"""Initializes the TalkaiImager class.
|
|
18
|
-
|
|
19
|
-
Args:
|
|
20
|
-
timeout (int, optional): HTTP request timeout in seconds. Defaults to 60.
|
|
21
|
-
proxies (dict, optional): HTTP request proxies. Defaults to {}.
|
|
22
|
-
"""
|
|
23
|
-
self.api_endpoint = "https://talkai.info/chat/send/"
|
|
24
|
-
self.headers = {
|
|
25
|
-
'accept': 'application/json',
|
|
26
|
-
'accept-language': 'en-US,en;q=0.9',
|
|
27
|
-
'content-type': 'application/json',
|
|
28
|
-
'origin': 'https://talkai.info',
|
|
29
|
-
'referer': 'https://talkai.info/image/',
|
|
30
|
-
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36',
|
|
31
|
-
}
|
|
32
|
-
self.session = requests.Session()
|
|
33
|
-
self.session.headers.update(self.headers)
|
|
34
|
-
self.session.proxies.update(proxies)
|
|
35
|
-
self.timeout = timeout
|
|
36
|
-
self.prompt: str = "AI-generated image - webscout"
|
|
37
|
-
self.image_extension: str = "png"
|
|
38
|
-
|
|
39
|
-
def generate(self, prompt: str, amount: int = 1) -> List[str]:
|
|
40
|
-
"""Generates image URLs from a prompt."""
|
|
41
|
-
assert bool(prompt), "Prompt cannot be empty."
|
|
42
|
-
assert isinstance(amount, int) and amount > 0, "Amount must be a positive integer."
|
|
43
|
-
|
|
44
|
-
self.prompt = prompt
|
|
45
|
-
image_urls = []
|
|
46
|
-
|
|
47
|
-
try:
|
|
48
|
-
with self.session.post(self.api_endpoint, json=self._create_payload(prompt), timeout=self.timeout) as response:
|
|
49
|
-
response.raise_for_status()
|
|
50
|
-
data = response.json()
|
|
51
|
-
|
|
52
|
-
if 'data' in data and len(data['data']) > 0 and 'url' in data['data'][0]:
|
|
53
|
-
image_urls.append(data['data'][0]['url'])
|
|
54
|
-
else:
|
|
55
|
-
raise exceptions.InvalidResponseError("No image URL found in API response.")
|
|
56
|
-
|
|
57
|
-
except requests.exceptions.RequestException as e:
|
|
58
|
-
raise exceptions.APIConnectionError(f"Error making API request: {e}") from e
|
|
59
|
-
except json.JSONDecodeError as e:
|
|
60
|
-
raise exceptions.InvalidResponseError(f"Invalid JSON response: {e}") from e
|
|
61
|
-
except Exception as e:
|
|
62
|
-
raise exceptions.FailedToGenerateResponseError(f"An unexpected error occurred: {e}") from e
|
|
63
|
-
|
|
64
|
-
return image_urls
|
|
65
|
-
|
|
66
|
-
def _create_payload(self, prompt: str) -> Dict[str, Any]:
|
|
67
|
-
return {
|
|
68
|
-
"type": "image",
|
|
69
|
-
"messagesHistory": [
|
|
70
|
-
{
|
|
71
|
-
"id": str(uuid.uuid4()),
|
|
72
|
-
"from": "you",
|
|
73
|
-
"content": prompt
|
|
74
|
-
}
|
|
75
|
-
],
|
|
76
|
-
"settings": {
|
|
77
|
-
"model": "gpt-4o-mini" # Or another suitable model if available
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
def save(
|
|
83
|
-
self,
|
|
84
|
-
response: List[str],
|
|
85
|
-
name: str = None,
|
|
86
|
-
dir: str = os.getcwd(),
|
|
87
|
-
filenames_prefix: str = "",
|
|
88
|
-
) -> List[str]:
|
|
89
|
-
assert isinstance(response, list), f"Response should be a list, not {type(response)}"
|
|
90
|
-
name = self.prompt if name is None else name
|
|
91
|
-
|
|
92
|
-
filenames = []
|
|
93
|
-
for i, url in enumerate(response):
|
|
94
|
-
try:
|
|
95
|
-
with self.session.get(url, stream=True, timeout=self.timeout) as r:
|
|
96
|
-
r.raise_for_status()
|
|
97
|
-
filename = f"{filenames_prefix}{name}_{i}.{self.image_extension}"
|
|
98
|
-
filepath = os.path.join(dir, filename)
|
|
99
|
-
with open(filepath, 'wb') as f:
|
|
100
|
-
for chunk in r.iter_content(chunk_size=8192):
|
|
101
|
-
f.write(chunk)
|
|
102
|
-
filenames.append(filename)
|
|
103
|
-
except requests.exceptions.RequestException as e:
|
|
104
|
-
print(f"Error downloading image from {url}: {e}")
|
|
105
|
-
filenames.append(None) # Indicate failure to download
|
|
106
|
-
|
|
107
|
-
return filenames
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
if __name__ == "__main__":
|
|
111
|
-
bot = TalkaiImager()
|
|
112
|
-
try:
|
|
113
|
-
resp = bot.generate("A shiny red sports car speeding down a scenic mountain road", 1)
|
|
114
|
-
print(bot.save(resp))
|
|
115
|
-
except Exception as e:
|
|
116
|
-
print(f"An error occurred: {e}")
|