webscout 6.6__tar.gz → 6.7__tar.gz
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-6.6/webscout.egg-info → webscout-6.7}/PKG-INFO +2 -8
- {webscout-6.6 → webscout-6.7}/README.md +1 -7
- {webscout-6.6 → webscout-6.7}/setup.py +1 -1
- {webscout-6.6 → webscout-6.7}/webscout/Extra/weather.py +5 -5
- {webscout-6.6 → webscout-6.7}/webscout/Provider/Netwrck.py +238 -234
- {webscout-6.6 → webscout-6.7}/webscout/Provider/meta.py +1 -1
- {webscout-6.6 → webscout-6.7}/webscout/cli.py +31 -39
- {webscout-6.6 → webscout-6.7}/webscout/litprinter/__init__.py +16 -7
- {webscout-6.6 → webscout-6.7}/webscout/version.py +1 -1
- {webscout-6.6 → webscout-6.7}/webscout/webscout_search.py +1 -1
- {webscout-6.6 → webscout-6.7/webscout.egg-info}/PKG-INFO +2 -8
- {webscout-6.6 → webscout-6.7}/webscout.egg-info/entry_points.txt +1 -1
- {webscout-6.6 → webscout-6.7}/LICENSE.md +0 -0
- {webscout-6.6 → webscout-6.7}/setup.cfg +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/AIauto.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/AIbase.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/AIutel.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Bard.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/DWEBS.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Extra/YTToolkit/YTdownloader.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Extra/YTToolkit/__init__.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Extra/YTToolkit/transcriber.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Extra/YTToolkit/ytapi/__init__.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Extra/YTToolkit/ytapi/channel.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Extra/YTToolkit/ytapi/errors.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Extra/YTToolkit/ytapi/extras.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Extra/YTToolkit/ytapi/https.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Extra/YTToolkit/ytapi/patterns.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Extra/YTToolkit/ytapi/playlist.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Extra/YTToolkit/ytapi/pool.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Extra/YTToolkit/ytapi/query.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Extra/YTToolkit/ytapi/stream.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Extra/YTToolkit/ytapi/utils.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Extra/YTToolkit/ytapi/video.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Extra/__init__.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Extra/autocoder/__init__.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Extra/autocoder/autocoder_utiles.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Extra/autocoder/rawdog.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Extra/autollama.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Extra/gguf.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Extra/markdownlite/__init__.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Extra/weather_ascii.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/LLM.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Litlogger/__init__.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Local/__init__.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Local/_version.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Local/formats.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Local/model.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Local/samplers.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Local/thread.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Local/ui.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Local/utils.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/AI21.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/AISEARCH/__init__.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/AISEARCH/felo_search.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/AISEARCH/ooai.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/Amigo.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/Andi.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/Bing.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/Blackboxai.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/ChatGPTES.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/Chatify.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/Cloudflare.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/Cohere.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/DARKAI.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/Deepinfra.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/Deepseek.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/DiscordRocks.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/EDITEE.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/Farfalle.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/Free2GPT.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/GPTWeb.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/Gemini.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/Groq.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/Jadve.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/Koboldai.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/Llama.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/Llama3.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/Marcus.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/NinjaChat.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/OLLAMA.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/Openai.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/PI.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/Phind.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/PizzaGPT.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/RUBIKSAI.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/Reka.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/TTI/AiForce/__init__.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/TTI/AiForce/async_aiforce.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/TTI/AiForce/sync_aiforce.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/TTI/Nexra/__init__.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/TTI/Nexra/async_nexra.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/TTI/Nexra/sync_nexra.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/TTI/PollinationsAI/__init__.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/TTI/PollinationsAI/async_pollinations.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/TTI/PollinationsAI/sync_pollinations.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/TTI/__init__.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/TTI/artbit/__init__.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/TTI/artbit/async_artbit.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/TTI/artbit/sync_artbit.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/TTI/blackbox/__init__.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/TTI/blackbox/async_blackbox.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/TTI/blackbox/sync_blackbox.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/TTI/deepinfra/__init__.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/TTI/deepinfra/async_deepinfra.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/TTI/deepinfra/sync_deepinfra.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/TTI/huggingface/__init__.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/TTI/huggingface/async_huggingface.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/TTI/huggingface/sync_huggingface.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/TTI/imgninza/__init__.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/TTI/imgninza/async_ninza.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/TTI/imgninza/sync_ninza.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/TTI/talkai/__init__.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/TTI/talkai/async_talkai.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/TTI/talkai/sync_talkai.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/TTS/__init__.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/TTS/deepgram.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/TTS/elevenlabs.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/TTS/gesserit.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/TTS/murfai.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/TTS/parler.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/TTS/streamElements.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/TTS/utils.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/TTS/voicepod.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/TeachAnything.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/Youchat.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/__init__.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/ai4chat.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/aimathgpt.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/askmyai.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/bagoodex.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/cerebras.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/cleeai.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/elmo.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/gaurish.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/geminiapi.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/geminiprorealtime.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/julius.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/koala.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/learnfastai.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/lepton.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/llama3mitril.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/llamatutor.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/llmchat.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/mhystical.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/multichat.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/promptrefine.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/talkai.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/turboseek.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/tutorai.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/typegpt.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/x0gpt.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/Provider/yep.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/__init__.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/__main__.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/conversation.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/exceptions.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/litagent/__init__.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/litprinter/colors.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/optimizers.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/prompt_manager.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/scout/__init__.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/scout/core/__init__.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/scout/core/crawler.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/scout/core/scout.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/scout/core/search_result.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/scout/core/text_analyzer.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/scout/core/text_utils.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/scout/core/web_analyzer.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/scout/core.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/scout/element.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/scout/parsers/__init__.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/scout/parsers/html5lib_parser.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/scout/parsers/html_parser.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/scout/parsers/lxml_parser.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/scout/utils.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/swiftcli/__init__.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/tempid.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/update_checker.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/utils.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/webscout_search_async.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/zeroart/__init__.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/zeroart/base.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/zeroart/effects.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/zeroart/fonts.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout/zerodir/__init__.py +0 -0
- {webscout-6.6 → webscout-6.7}/webscout.egg-info/SOURCES.txt +0 -0
- {webscout-6.6 → webscout-6.7}/webscout.egg-info/dependency_links.txt +0 -0
- {webscout-6.6 → webscout-6.7}/webscout.egg-info/requires.txt +0 -0
- {webscout-6.6 → webscout-6.7}/webscout.egg-info/top_level.txt +0 -0
- {webscout-6.6 → webscout-6.7}/webstoken/__init__.py +0 -0
- {webscout-6.6 → webscout-6.7}/webstoken/classifier.py +0 -0
- {webscout-6.6 → webscout-6.7}/webstoken/keywords.py +0 -0
- {webscout-6.6 → webscout-6.7}/webstoken/language.py +0 -0
- {webscout-6.6 → webscout-6.7}/webstoken/ner.py +0 -0
- {webscout-6.6 → webscout-6.7}/webstoken/normalizer.py +0 -0
- {webscout-6.6 → webscout-6.7}/webstoken/processor.py +0 -0
- {webscout-6.6 → webscout-6.7}/webstoken/sentiment.py +0 -0
- {webscout-6.6 → webscout-6.7}/webstoken/stemmer.py +0 -0
- {webscout-6.6 → webscout-6.7}/webstoken/t.py +0 -0
- {webscout-6.6 → webscout-6.7}/webstoken/tagger.py +0 -0
- {webscout-6.6 → webscout-6.7}/webstoken/tokenizer.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: webscout
|
|
3
|
-
Version: 6.
|
|
3
|
+
Version: 6.7
|
|
4
4
|
Summary: Search for anything using Google, DuckDuckGo, phind.com, Contains AI models, can transcribe yt videos, temporary email and phone number generation, has TTS support, webai (terminal gpt and open interpreter) and offline LLMs and more
|
|
5
5
|
Author: OEvortex
|
|
6
6
|
Author-email: helpingai5@gmail.com
|
|
@@ -232,7 +232,7 @@ python -m webscout --help
|
|
|
232
232
|
```python
|
|
233
233
|
from webscout import weather as w
|
|
234
234
|
weather = w.get("Qazigund")
|
|
235
|
-
|
|
235
|
+
print(weather)
|
|
236
236
|
```
|
|
237
237
|
|
|
238
238
|
### 2. Weather ASCII
|
|
@@ -1321,12 +1321,6 @@ autollama.main(model_path, gguf_file)
|
|
|
1321
1321
|
* The `model_path` in `autollama` is the Hugging Face model ID, and `gguf_file` is the GGUF file ID.
|
|
1322
1322
|
|
|
1323
1323
|
|
|
1324
|
-
## 🌐 `Webai` - Terminal GPT and an Open Interpreter
|
|
1325
|
-
|
|
1326
|
-
```bash
|
|
1327
|
-
python -m webscout.webai webai --provider "phind" --rawdog
|
|
1328
|
-
```
|
|
1329
|
-
|
|
1330
1324
|
<div align="center">
|
|
1331
1325
|
<!-- Replace `#` with your actual links -->
|
|
1332
1326
|
<a href="https://t.me/official_helpingai"><img alt="Telegram" src="https://img.shields.io/badge/Telegram-2CA5E0?style=for-the-badge&logo=telegram&logoColor=white"></a>
|
|
@@ -166,7 +166,7 @@ python -m webscout --help
|
|
|
166
166
|
```python
|
|
167
167
|
from webscout import weather as w
|
|
168
168
|
weather = w.get("Qazigund")
|
|
169
|
-
|
|
169
|
+
print(weather)
|
|
170
170
|
```
|
|
171
171
|
|
|
172
172
|
### 2. Weather ASCII
|
|
@@ -1255,12 +1255,6 @@ autollama.main(model_path, gguf_file)
|
|
|
1255
1255
|
* The `model_path` in `autollama` is the Hugging Face model ID, and `gguf_file` is the GGUF file ID.
|
|
1256
1256
|
|
|
1257
1257
|
|
|
1258
|
-
## 🌐 `Webai` - Terminal GPT and an Open Interpreter
|
|
1259
|
-
|
|
1260
|
-
```bash
|
|
1261
|
-
python -m webscout.webai webai --provider "phind" --rawdog
|
|
1262
|
-
```
|
|
1263
|
-
|
|
1264
1258
|
<div align="center">
|
|
1265
1259
|
<!-- Replace `#` with your actual links -->
|
|
1266
1260
|
<a href="https://t.me/official_helpingai"><img alt="Telegram" src="https://img.shields.io/badge/Telegram-2CA5E0?style=for-the-badge&logo=telegram&logoColor=white"></a>
|
|
@@ -16,7 +16,7 @@ from rich.columns import Columns
|
|
|
16
16
|
# Initialize Rich console with force terminal
|
|
17
17
|
console = Console(force_terminal=True)
|
|
18
18
|
|
|
19
|
-
def
|
|
19
|
+
def get_emoji(condition: str) -> str:
|
|
20
20
|
"""Get appropriate emoji for weather condition"""
|
|
21
21
|
conditions = {
|
|
22
22
|
'sunny': '*', 'clear': '*',
|
|
@@ -61,7 +61,7 @@ def create_current_weather_panel(data):
|
|
|
61
61
|
location_name = f"{location['areaName'][0]['value']}, {location['country'][0]['value']}"
|
|
62
62
|
|
|
63
63
|
weather_desc = current['weatherDesc'][0]['value']
|
|
64
|
-
symbol =
|
|
64
|
+
symbol = get_emoji(weather_desc)
|
|
65
65
|
|
|
66
66
|
# Create weather info table
|
|
67
67
|
table = Table(show_header=False, box=box.ROUNDED, expand=True)
|
|
@@ -98,7 +98,7 @@ def create_forecast_panel(data):
|
|
|
98
98
|
# Get mid-day conditions (noon)
|
|
99
99
|
noon = day['hourly'][4]
|
|
100
100
|
condition = noon['weatherDesc'][0]['value']
|
|
101
|
-
symbol =
|
|
101
|
+
symbol = get_emoji(condition)
|
|
102
102
|
temp_range = f"{day['mintempC']}° - {day['maxtempC']}°"
|
|
103
103
|
rain_chance = f"v {noon['chanceofrain']}%"
|
|
104
104
|
wind = f"> {noon['windspeedKmph']} km/h"
|
|
@@ -113,7 +113,7 @@ def create_forecast_panel(data):
|
|
|
113
113
|
|
|
114
114
|
return Panel(table, title="[bold]3-Day Forecast[/]", border_style="blue")
|
|
115
115
|
|
|
116
|
-
def
|
|
116
|
+
def get(location: str):
|
|
117
117
|
"""Get weather data with progress indicator"""
|
|
118
118
|
with Progress(
|
|
119
119
|
SpinnerColumn(),
|
|
@@ -159,7 +159,7 @@ def main():
|
|
|
159
159
|
console.print("\n[bold cyan]* Weather Information[/]\n")
|
|
160
160
|
location = console.input("[cyan]Enter location: [/]")
|
|
161
161
|
|
|
162
|
-
weather_data =
|
|
162
|
+
weather_data = get(location)
|
|
163
163
|
if weather_data:
|
|
164
164
|
display_weather(weather_data)
|
|
165
165
|
|
|
@@ -1,235 +1,239 @@
|
|
|
1
|
-
import time
|
|
2
|
-
import uuid
|
|
3
|
-
import requests
|
|
4
|
-
import json
|
|
5
|
-
|
|
6
|
-
from typing import Any, Dict, Optional, Generator, Union
|
|
7
|
-
from dataclasses import dataclass, asdict
|
|
8
|
-
from datetime import date
|
|
9
|
-
|
|
10
|
-
from webscout.AIutel import Optimizers, Conversation, AwesomePrompts
|
|
11
|
-
from webscout.AIbase import Provider
|
|
12
|
-
from webscout import exceptions
|
|
13
|
-
from webscout.Litlogger import LitLogger, LogFormat, ColorScheme
|
|
14
|
-
from webscout.litagent import LitAgent
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
class Netwrck(Provider):
|
|
18
|
-
"""
|
|
19
|
-
A class to interact with the Netwrck.com API. Supports streaming.
|
|
20
|
-
"""
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
self.
|
|
57
|
-
self.
|
|
58
|
-
self.
|
|
59
|
-
self.
|
|
60
|
-
self.
|
|
61
|
-
self.
|
|
62
|
-
self.
|
|
63
|
-
self.
|
|
64
|
-
self.
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
'
|
|
72
|
-
'accept
|
|
73
|
-
'
|
|
74
|
-
'
|
|
75
|
-
'
|
|
76
|
-
'
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
self.
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
self.conversation
|
|
88
|
-
self.
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
def ask(
|
|
99
|
-
self,
|
|
100
|
-
prompt: str,
|
|
101
|
-
stream: bool = False,
|
|
102
|
-
raw: bool = False,
|
|
103
|
-
optimizer: Optional[str] = None,
|
|
104
|
-
conversationally: bool = False,
|
|
105
|
-
) -> Union[Dict[str, Any], Generator]:
|
|
106
|
-
"""Sends a prompt to the Netwrck API and returns the response."""
|
|
107
|
-
|
|
108
|
-
if self.logger:
|
|
109
|
-
self.logger.debug(f"ask() called with prompt: {prompt}")
|
|
110
|
-
|
|
111
|
-
conversation_prompt = self.conversation.gen_complete_prompt(prompt)
|
|
112
|
-
if optimizer:
|
|
113
|
-
if optimizer in self.__available_optimizers:
|
|
114
|
-
conversation_prompt = getattr(Optimizers, optimizer)(
|
|
115
|
-
conversation_prompt if conversationally else prompt
|
|
116
|
-
)
|
|
117
|
-
else:
|
|
118
|
-
if self.logger:
|
|
119
|
-
self.logger.error(f"Invalid optimizer: {optimizer}")
|
|
120
|
-
raise exceptions.FailedToGenerateResponseError(
|
|
121
|
-
f"Optimizer is not one of {self.__available_optimizers}"
|
|
122
|
-
)
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
"
|
|
126
|
-
"
|
|
127
|
-
"
|
|
128
|
-
"
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
decoded_line
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
self.
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
response
|
|
233
|
-
|
|
234
|
-
|
|
1
|
+
import time
|
|
2
|
+
import uuid
|
|
3
|
+
import requests
|
|
4
|
+
import json
|
|
5
|
+
|
|
6
|
+
from typing import Any, Dict, Optional, Generator, Union
|
|
7
|
+
from dataclasses import dataclass, asdict
|
|
8
|
+
from datetime import date
|
|
9
|
+
|
|
10
|
+
from webscout.AIutel import Optimizers, Conversation, AwesomePrompts
|
|
11
|
+
from webscout.AIbase import Provider
|
|
12
|
+
from webscout import exceptions
|
|
13
|
+
from webscout.Litlogger import LitLogger, LogFormat, ColorScheme
|
|
14
|
+
from webscout.litagent import LitAgent
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class Netwrck(Provider):
|
|
18
|
+
"""
|
|
19
|
+
A class to interact with the Netwrck.com API. Supports streaming.
|
|
20
|
+
"""
|
|
21
|
+
greeting = """An unknown multiverse phenomenon occurred, and you found yourself in a dark space. You looked around and found a source of light in a distance. You approached the light and *whoosh*....\nChoose your origin:\na) As a baby who just got birthed, your fate unknown\nb) As an amnesic stranded on an uninhabited island with mysterious ruins\nc) As an abandoned product of a forbidden experiment\nd) As a slave being sold at an auction\ne) Extremely Chaotic Randomizer\nOr, dive into your own fantasy."""
|
|
22
|
+
|
|
23
|
+
AVAILABLE_MODELS = {
|
|
24
|
+
"lumimaid": "neversleep/llama-3.1-lumimaid-8b",
|
|
25
|
+
"grok": "x-ai/grok-2",
|
|
26
|
+
"claude": "anthropic/claude-3.5-sonnet:beta",
|
|
27
|
+
"euryale": "sao10k/l3-euryale-70b",
|
|
28
|
+
"gpt4mini": "openai/gpt-4o-mini",
|
|
29
|
+
"mythomax": "gryphe/mythomax-l2-13b",
|
|
30
|
+
"gemini": "google/gemini-pro-1.5",
|
|
31
|
+
"lumimaid70b": "neversleep/llama-3.1-lumimaid-70b",
|
|
32
|
+
"nemotron": "nvidia/llama-3.1-nemotron-70b-instruct",
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
def __init__(
|
|
36
|
+
self,
|
|
37
|
+
model: str = "claude",
|
|
38
|
+
is_conversation: bool = True,
|
|
39
|
+
max_tokens: int = 2048,
|
|
40
|
+
timeout: int = 30,
|
|
41
|
+
intro: Optional[str] = None,
|
|
42
|
+
filepath: Optional[str] = None,
|
|
43
|
+
update_file: bool = False,
|
|
44
|
+
proxies: Optional[dict] = None,
|
|
45
|
+
history_offset: int = 0,
|
|
46
|
+
act: Optional[str] = None,
|
|
47
|
+
system_prompt: str = "You are a helpful assistant.",
|
|
48
|
+
temperature: float = 0.7,
|
|
49
|
+
top_p: float = 0.8,
|
|
50
|
+
logging: bool = False
|
|
51
|
+
):
|
|
52
|
+
"""Initializes the Netwrck API client."""
|
|
53
|
+
if model not in self.AVAILABLE_MODELS:
|
|
54
|
+
raise ValueError(f"Invalid model: {model}. Choose from: {list(self.AVAILABLE_MODELS.keys())}")
|
|
55
|
+
|
|
56
|
+
self.model = model
|
|
57
|
+
self.model_name = self.AVAILABLE_MODELS[model]
|
|
58
|
+
self.system_prompt = system_prompt
|
|
59
|
+
self.session = requests.Session()
|
|
60
|
+
self.is_conversation = is_conversation
|
|
61
|
+
self.max_tokens_to_sample = max_tokens
|
|
62
|
+
self.timeout = timeout
|
|
63
|
+
self.last_response: Dict[str, Any] = {}
|
|
64
|
+
self.temperature = temperature
|
|
65
|
+
self.top_p = top_p
|
|
66
|
+
|
|
67
|
+
# Initialize LitAgent for user agent generation
|
|
68
|
+
self.agent = LitAgent()
|
|
69
|
+
|
|
70
|
+
self.headers = {
|
|
71
|
+
'authority': 'netwrck.com',
|
|
72
|
+
'accept': '*/*',
|
|
73
|
+
'accept-language': 'en-US,en;q=0.9',
|
|
74
|
+
'content-type': 'application/json',
|
|
75
|
+
'origin': 'https://netwrck.com',
|
|
76
|
+
'referer': 'https://netwrck.com/',
|
|
77
|
+
'user-agent': self.agent.random()
|
|
78
|
+
}
|
|
79
|
+
self.session.headers.update(self.headers)
|
|
80
|
+
self.proxies = proxies or {}
|
|
81
|
+
|
|
82
|
+
Conversation.intro = (
|
|
83
|
+
AwesomePrompts().get_act(act, raise_not_found=True, default=None, case_insensitive=True)
|
|
84
|
+
if act
|
|
85
|
+
else intro or Conversation.intro
|
|
86
|
+
)
|
|
87
|
+
self.conversation = Conversation(is_conversation, max_tokens, filepath, update_file)
|
|
88
|
+
self.conversation.history_offset = history_offset
|
|
89
|
+
self.__available_optimizers = (
|
|
90
|
+
method
|
|
91
|
+
for method in dir(Optimizers)
|
|
92
|
+
if callable(getattr(Optimizers, method)) and not method.startswith("__")
|
|
93
|
+
)
|
|
94
|
+
|
|
95
|
+
# Initialize logger
|
|
96
|
+
self.logger = LitLogger(name="Netwrck", format=LogFormat.MODERN_EMOJI, color_scheme=ColorScheme.CYBERPUNK) if logging else None
|
|
97
|
+
|
|
98
|
+
def ask(
|
|
99
|
+
self,
|
|
100
|
+
prompt: str,
|
|
101
|
+
stream: bool = False,
|
|
102
|
+
raw: bool = False,
|
|
103
|
+
optimizer: Optional[str] = None,
|
|
104
|
+
conversationally: bool = False,
|
|
105
|
+
) -> Union[Dict[str, Any], Generator]:
|
|
106
|
+
"""Sends a prompt to the Netwrck API and returns the response."""
|
|
107
|
+
|
|
108
|
+
if self.logger:
|
|
109
|
+
self.logger.debug(f"ask() called with prompt: {prompt}")
|
|
110
|
+
|
|
111
|
+
conversation_prompt = self.conversation.gen_complete_prompt(prompt)
|
|
112
|
+
if optimizer:
|
|
113
|
+
if optimizer in self.__available_optimizers:
|
|
114
|
+
conversation_prompt = getattr(Optimizers, optimizer)(
|
|
115
|
+
conversation_prompt if conversationally else prompt
|
|
116
|
+
)
|
|
117
|
+
else:
|
|
118
|
+
if self.logger:
|
|
119
|
+
self.logger.error(f"Invalid optimizer: {optimizer}")
|
|
120
|
+
raise exceptions.FailedToGenerateResponseError(
|
|
121
|
+
f"Optimizer is not one of {self.__available_optimizers}"
|
|
122
|
+
)
|
|
123
|
+
payload = {
|
|
124
|
+
"query": prompt,
|
|
125
|
+
"context": self.system_prompt,
|
|
126
|
+
"examples": [],
|
|
127
|
+
"model_name": self.model_name,
|
|
128
|
+
"greeting": self.greeting
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
def for_stream():
|
|
132
|
+
try:
|
|
133
|
+
response = self.session.post(
|
|
134
|
+
"https://netwrck.com/api/chatpred_or",
|
|
135
|
+
json=payload,
|
|
136
|
+
headers=self.headers,
|
|
137
|
+
proxies=self.proxies,
|
|
138
|
+
timeout=self.timeout,
|
|
139
|
+
stream=True,
|
|
140
|
+
)
|
|
141
|
+
response.raise_for_status()
|
|
142
|
+
|
|
143
|
+
# Initialize an empty string to accumulate the streaming text
|
|
144
|
+
streaming_text = ""
|
|
145
|
+
for line in response.iter_lines():
|
|
146
|
+
if line:
|
|
147
|
+
decoded_line = line.decode('utf-8').strip('"')
|
|
148
|
+
streaming_text += decoded_line # Accumulate the text
|
|
149
|
+
yield {"text": decoded_line} # Yield each chunk
|
|
150
|
+
|
|
151
|
+
# Optionally, you can update the conversation history with the full streaming text
|
|
152
|
+
self.conversation.update_chat_history(payload["query"], streaming_text)
|
|
153
|
+
|
|
154
|
+
except Exception as e:
|
|
155
|
+
if self.logger:
|
|
156
|
+
self.logger.error(f"Error communicating with Netwrck: {e}")
|
|
157
|
+
raise exceptions.ProviderConnectionError(f"Error communicating with Netwrck: {e}") from e
|
|
158
|
+
|
|
159
|
+
except Exception as e:
|
|
160
|
+
if self.logger:
|
|
161
|
+
self.logger.error(f"Error communicating with Netwrck: {e}")
|
|
162
|
+
raise exceptions.ProviderConnectionError(f"Error communicating with Netwrck: {e}") from e
|
|
163
|
+
|
|
164
|
+
def for_non_stream():
|
|
165
|
+
try:
|
|
166
|
+
response = self.session.post(
|
|
167
|
+
"https://netwrck.com/api/chatpred_or",
|
|
168
|
+
json=payload,
|
|
169
|
+
headers=self.headers,
|
|
170
|
+
proxies=self.proxies,
|
|
171
|
+
timeout=self.timeout,
|
|
172
|
+
)
|
|
173
|
+
response.raise_for_status()
|
|
174
|
+
# print(response.text)
|
|
175
|
+
text = response.text.strip('"')
|
|
176
|
+
self.last_response = {"text": text}
|
|
177
|
+
self.conversation.update_chat_history(prompt, text)
|
|
178
|
+
|
|
179
|
+
return self.last_response
|
|
180
|
+
except Exception as e:
|
|
181
|
+
if self.logger:
|
|
182
|
+
self.logger.error(f"Error communicating with Netwrck: {e}")
|
|
183
|
+
raise exceptions.ProviderConnectionError(f"Error communicating with Netwrck: {e}") from e
|
|
184
|
+
|
|
185
|
+
return for_stream() if stream else for_non_stream()
|
|
186
|
+
|
|
187
|
+
def chat(
|
|
188
|
+
self,
|
|
189
|
+
prompt: str,
|
|
190
|
+
stream: bool = False,
|
|
191
|
+
optimizer: Optional[str] = None,
|
|
192
|
+
conversationally: bool = False,
|
|
193
|
+
) -> str:
|
|
194
|
+
"""Generates a response from the Netwrck API."""
|
|
195
|
+
if self.logger:
|
|
196
|
+
self.logger.debug(f"chat() called with prompt: {prompt}")
|
|
197
|
+
|
|
198
|
+
def for_stream():
|
|
199
|
+
for response in self.ask(
|
|
200
|
+
prompt,
|
|
201
|
+
stream=True,
|
|
202
|
+
optimizer=optimizer,
|
|
203
|
+
conversationally=conversationally
|
|
204
|
+
):
|
|
205
|
+
yield self.get_message(response)
|
|
206
|
+
|
|
207
|
+
def for_non_stream():
|
|
208
|
+
return self.get_message(
|
|
209
|
+
self.ask(
|
|
210
|
+
prompt,
|
|
211
|
+
stream=False,
|
|
212
|
+
optimizer=optimizer,
|
|
213
|
+
conversationally=conversationally,
|
|
214
|
+
)
|
|
215
|
+
)
|
|
216
|
+
|
|
217
|
+
return for_stream() if stream else for_non_stream()
|
|
218
|
+
|
|
219
|
+
def get_message(self, response: Dict[str, Any]) -> str:
|
|
220
|
+
"""Retrieves message only from response"""
|
|
221
|
+
assert isinstance(response, dict), "Response should be of dict data-type only"
|
|
222
|
+
return response["text"]
|
|
223
|
+
|
|
224
|
+
# Example Usage:
|
|
225
|
+
if __name__ == "__main__":
|
|
226
|
+
from rich import print
|
|
227
|
+
|
|
228
|
+
# Non-streaming example
|
|
229
|
+
print("Non-Streaming Response:")
|
|
230
|
+
netwrck = Netwrck(model="claude", logging=True)
|
|
231
|
+
response = netwrck.chat("tell me about Russia")
|
|
232
|
+
print(response)
|
|
233
|
+
|
|
234
|
+
# Streaming example
|
|
235
|
+
print("\nStreaming Response:")
|
|
236
|
+
response = netwrck.chat("tell me about India", stream=True)
|
|
237
|
+
for chunk in response:
|
|
238
|
+
print(chunk, end="", flush=True)
|
|
235
239
|
print() # Add a newline at the end
|