webscout 7.0__py3-none-any.whl → 7.1__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/LLM.py +1 -1
- webscout/Provider/Blackboxai.py +136 -137
- webscout/Provider/Cloudflare.py +92 -78
- webscout/Provider/Deepinfra.py +59 -35
- webscout/Provider/Glider.py +74 -59
- webscout/Provider/Groq.py +26 -18
- webscout/Provider/Jadve.py +108 -77
- webscout/Provider/Llama3.py +117 -94
- webscout/Provider/Marcus.py +65 -10
- webscout/Provider/Netwrck.py +61 -49
- webscout/Provider/PI.py +77 -122
- webscout/Provider/PizzaGPT.py +129 -82
- webscout/Provider/TextPollinationsAI.py +75 -47
- webscout/Provider/__init__.py +1 -3
- webscout/Provider/dgaf.py +68 -39
- webscout/Provider/gaurish.py +106 -66
- webscout/Provider/llamatutor.py +72 -62
- webscout/Provider/llmchat.py +61 -35
- webscout/Provider/meta.py +6 -6
- webscout/Provider/multichat.py +205 -104
- webscout/Provider/typegpt.py +26 -23
- webscout/Provider/yep.py +3 -3
- webscout/version.py +1 -1
- webscout/webscout_search.py +1141 -1140
- webscout/webscout_search_async.py +635 -635
- {webscout-7.0.dist-info → webscout-7.1.dist-info}/METADATA +18 -26
- {webscout-7.0.dist-info → webscout-7.1.dist-info}/RECORD +31 -32
- webscout/Provider/RUBIKSAI.py +0 -272
- {webscout-7.0.dist-info → webscout-7.1.dist-info}/LICENSE.md +0 -0
- {webscout-7.0.dist-info → webscout-7.1.dist-info}/WHEEL +0 -0
- {webscout-7.0.dist-info → webscout-7.1.dist-info}/entry_points.txt +0 -0
- {webscout-7.0.dist-info → webscout-7.1.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: webscout
|
|
3
|
-
Version: 7.
|
|
3
|
+
Version: 7.1
|
|
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
|
|
@@ -55,7 +55,6 @@ Requires-Dist: primp
|
|
|
55
55
|
Requires-Dist: pyreqwest_impersonate
|
|
56
56
|
Requires-Dist: gradio_client
|
|
57
57
|
Requires-Dist: psutil
|
|
58
|
-
Requires-Dist: yaspin
|
|
59
58
|
Requires-Dist: pygetwindow
|
|
60
59
|
Provides-Extra: dev
|
|
61
60
|
Requires-Dist: ruff>=0.1.6; extra == "dev"
|
|
@@ -78,42 +77,35 @@ Dynamic: requires-dist
|
|
|
78
77
|
Dynamic: requires-python
|
|
79
78
|
Dynamic: summary
|
|
80
79
|
|
|
81
|
-
<div align="center">
|
|
82
|
-
<!-- Replace `#` with your actual links -->
|
|
83
|
-
|
|
84
|
-
<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>
|
|
85
|
-
<a href="https://www.instagram.com/oevortex/"><img alt="Instagram" src="https://img.shields.io/badge/Instagram-E4405F?style=for-the-badge&logo=instagram&logoColor=white"></a>
|
|
86
|
-
<a href="https://www.linkedin.com/in/oe-vortex-29a407265/"><img alt="LinkedIn" src="https://img.shields.io/badge/LinkedIn-0077B5?style=for-the-badge&logo=linkedin&logoColor=white"></a>
|
|
87
|
-
<a href="https://buymeacoffee.com/oevortex"><img alt="Buy Me A Coffee" src="https://img.shields.io/badge/Buy%20Me%20A%20Coffee-FFDD00?style=for-the-badge&logo=buymeacoffee&logoColor=black"></a>
|
|
88
|
-
</div>
|
|
89
|
-
|
|
90
|
-
<div align="center">
|
|
91
|
-
<!-- Replace `#` with your actual links -->
|
|
92
|
-
<a href="https://youtube.com/@OEvortex">▶️ Vortex's YouTube Channel</a>
|
|
93
|
-
</div>
|
|
94
|
-
<div align="center">
|
|
95
|
-
<a href="https://youtube.com/@devsdocode">▶️ Devs Do Code's YouTube Channel</a>
|
|
96
|
-
</div>
|
|
97
|
-
<div align="center">
|
|
98
|
-
<a href="https://t.me/ANONYMOUS_56788">📢 Anonymous Coder's Telegram</a>
|
|
99
|
-
</div>
|
|
100
80
|
|
|
81
|
+
[](https://t.me/official_helpingai)
|
|
82
|
+
[](https://www.instagram.com/oevortex/)
|
|
83
|
+
[](https://www.linkedin.com/in/oe-vortex-29a407265/)
|
|
84
|
+
[](https://buymeacoffee.com/oevortex)
|
|
101
85
|
|
|
102
86
|
|
|
103
|
-
|
|
104
|
-
|
|
87
|
+
<div align="center">
|
|
88
|
+
<a href="https://youtube.com/@OEvortex">▶️ Vortex’s YouTube Channel</a> •
|
|
89
|
+
<a href="https://youtube.com/@devsdocode">▶️ Devs Do Code’s YouTube Channel</a> •
|
|
90
|
+
<a href="https://t.me/ANONYMOUS_56788">📢 Anonymous Coder’s Telegram</a>
|
|
105
91
|
</div>
|
|
106
92
|
|
|
93
|
+
---
|
|
94
|
+
|
|
107
95
|
<p align="center">
|
|
108
|
-
|
|
96
|
+
<strong>Webscout</strong> is the all-in-one search and AI toolkit you need.
|
|
97
|
+
<br>
|
|
98
|
+
Discover insights with Google, DuckDuckGo, and Phind; access cutting-edge AI models; transcribe YouTube videos; generate temporary emails and phone numbers; perform text-to-speech conversions; run offline language models; and much more!
|
|
109
99
|
</p>
|
|
110
100
|
|
|
111
101
|
<div align="center">
|
|
112
102
|
<img src="https://img.shields.io/badge/WebScout-API-blue?style=for-the-badge&logo=WebScout" alt="WebScout API Badge">
|
|
113
|
-
<a href="#"><img
|
|
114
|
-
<a href="https://pepy.tech/project/webscout"><img
|
|
103
|
+
<a href="#"><img src="https://img.shields.io/pypi/pyversions/webscout" alt="Python Version"></a>
|
|
104
|
+
<a href="https://pepy.tech/project/webscout"><img src="https://static.pepy.tech/badge/webscout" alt="Downloads"></a>
|
|
115
105
|
</div>
|
|
116
106
|
|
|
107
|
+
---
|
|
108
|
+
|
|
117
109
|
## 🚀 Features
|
|
118
110
|
* **Comprehensive Search:** Leverage Google, DuckDuckGo for diverse search results.
|
|
119
111
|
* **AI Powerhouse:** Access and interact with various AI models, including OpenAI, Cohere, and more.
|
|
@@ -3,7 +3,7 @@ webscout/AIbase.py,sha256=IPOkad6pK4Iak97b7gQD2AsusHsI3YIsnbGJP4uLo4E,3640
|
|
|
3
3
|
webscout/AIutel.py,sha256=gsV08e3F6aH4j7wH5V9X3N9T5Ea5MAIQq4M47vNofuI,12020
|
|
4
4
|
webscout/Bard.py,sha256=CmDhKC67Ki2xA8Rkme6EC-gLmq3PhAAAGd5tcpJ0KJo,13234
|
|
5
5
|
webscout/DWEBS.py,sha256=x12eTaEJRqtq3EU60W3E1C0ASlpYxj9twU33eEeVCFg,19293
|
|
6
|
-
webscout/LLM.py,sha256=
|
|
6
|
+
webscout/LLM.py,sha256=JLS0JksqZnSPgj_bOJUjroICH7FB4Pvo-elohavcztQ,16346
|
|
7
7
|
webscout/__init__.py,sha256=ABIIQ5KBftowGxWHkHoPK1VOQlExJcDypTwbyiUsifM,840
|
|
8
8
|
webscout/__main__.py,sha256=pBm2E3ZZiMcCH37b1YCz7qKdKdX_i_S5En6fZDeJKFw,103
|
|
9
9
|
webscout/cli.py,sha256=3AG2adVRirqKQMvXX312nswNBtRpmW9-2C16eAhfRd4,11994
|
|
@@ -14,9 +14,9 @@ webscout/prompt_manager.py,sha256=Jc0demWN6M6QcwRp14aHZR05r_PVPOaG8PnQkO7pDZ4,98
|
|
|
14
14
|
webscout/tempid.py,sha256=hxzPVBjxAa5GLBQ9fE6ob5ixJpQeU-mgdfTzh33EHvE,4926
|
|
15
15
|
webscout/update_checker.py,sha256=mLFD_OYjtEdUvXUiNt8wSbspmkFRmNlULf5sVyVZi60,5129
|
|
16
16
|
webscout/utils.py,sha256=LVW7U0XcGYqigqxV6D5YXeGMrc_mt7PnNG_YnKf9bBM,3059
|
|
17
|
-
webscout/version.py,sha256=
|
|
18
|
-
webscout/webscout_search.py,sha256
|
|
19
|
-
webscout/webscout_search_async.py,sha256=
|
|
17
|
+
webscout/version.py,sha256=llAEpCdUX11mRfmUvjcUXUSl8vFycU9eE0g86FefnA8,44
|
|
18
|
+
webscout/webscout_search.py,sha256=SIPYtMG8agE4ep7aoHf9ZnoRrjKYGHGsQbpgvqblPuU,45983
|
|
19
|
+
webscout/webscout_search_async.py,sha256=DvfFPs6BETDmCc6w99930XMdXE6WqbmVOwZr7HXeuGg,25301
|
|
20
20
|
webscout/Extra/__init__.py,sha256=FbDnwI3zZdoQFosA5Q2bIYpJlHUKFWiFmFKvnk9xWKY,153
|
|
21
21
|
webscout/Extra/autollama.py,sha256=dqvNj9W_KRhuQKkro8h0Ej0rh3fWXMLUo3w4YsJ7c9Y,7618
|
|
22
22
|
webscout/Extra/gguf.py,sha256=q0GLqYy8Nx7Q39mLXwRUZ7Bt3GUZbCcUBPHfSGDf4mI,15565
|
|
@@ -53,37 +53,36 @@ webscout/Provider/AI21.py,sha256=JBh-xnspxTZNMcl-Gd0Cgseqht9gTM64TUv9I4Imc9k,621
|
|
|
53
53
|
webscout/Provider/Amigo.py,sha256=LkZuvFUwkmdzgMhUEMYvXKpNpLstjznRMe-CQydYO7g,11637
|
|
54
54
|
webscout/Provider/Andi.py,sha256=-vqXWlJcHzhfZ-iW4qJy9yxzctPKp2RdmdW02hf4XLs,8863
|
|
55
55
|
webscout/Provider/Bing.py,sha256=zxIzq7dlqaLskx9LsYppbMJuwfGtYid3Uh0gIhZ0hps,9001
|
|
56
|
-
webscout/Provider/Blackboxai.py,sha256=
|
|
56
|
+
webscout/Provider/Blackboxai.py,sha256=ooumGsT-HeZqx3D0hpmiOcW_ae62yQUmghTJg0Mw0C8,8195
|
|
57
57
|
webscout/Provider/ChatGPTES.py,sha256=t_Qjn1ShNX0uYp5dJzv6Y7DPQM8HUTgvcBauhFz0-Io,8815
|
|
58
58
|
webscout/Provider/Chatify.py,sha256=QYgZAEmhLkEnR7oyr-qUs6OSHoNJm2BgMr41f84Ntbg,6370
|
|
59
|
-
webscout/Provider/Cloudflare.py,sha256=
|
|
59
|
+
webscout/Provider/Cloudflare.py,sha256=pNQ9qEsam_byH3qLta8fsgkVA0pmfMq3uzYy3UB0V-c,11636
|
|
60
60
|
webscout/Provider/Cohere.py,sha256=oL9kAv--RSkEQxwkPTq1Wi57Wkgg0WNvL82CpTj22YY,8264
|
|
61
61
|
webscout/Provider/DARKAI.py,sha256=kVElPYVh_VchfGylR4YzC3orrPJPyPoOpSolc62b5eY,8944
|
|
62
|
-
webscout/Provider/Deepinfra.py,sha256=
|
|
62
|
+
webscout/Provider/Deepinfra.py,sha256=KzRKNbYiKAUgrcnNMjxybVgnIJJcXMtT_hePQ_zkKZg,8285
|
|
63
63
|
webscout/Provider/DiscordRocks.py,sha256=fRkVBCyDMZf0SoaNPK7KXAsh8mQj0JWDb7ifYpL9PQQ,11372
|
|
64
64
|
webscout/Provider/EDITEE.py,sha256=9rq7c84XoIoRBqd0qgW-Ebu3lyffhicSOtUvMtAjO0s,7742
|
|
65
65
|
webscout/Provider/Free2GPT.py,sha256=WQOURmq7MciW9Imh-cMSkQgxsuE8cmxs85aBONtv1Rw,8953
|
|
66
66
|
webscout/Provider/GPTWeb.py,sha256=xh_mnBko6RDyz2v3KhMux-yIipipkZfVVVoUJWkbzcQ,7466
|
|
67
67
|
webscout/Provider/Gemini.py,sha256=Vg2MLqQ_qxHkcN7Zikife1dyVK-y94ik8y6MAu-VzUI,7801
|
|
68
|
-
webscout/Provider/Glider.py,sha256=
|
|
69
|
-
webscout/Provider/Groq.py,sha256=
|
|
70
|
-
webscout/Provider/Jadve.py,sha256=
|
|
68
|
+
webscout/Provider/Glider.py,sha256=GlRUoMT1E2CEdBTMqBKdwSAUUJQhARXXm3hyLRfNNQY,8971
|
|
69
|
+
webscout/Provider/Groq.py,sha256=4HD0PeQx4J3Lb0_B917jT-GjFG3kO4jTjO44GgHX4O8,28924
|
|
70
|
+
webscout/Provider/Jadve.py,sha256=YuZVmQ33yfbudR8SD-X9doVVzOk7NuHwVkJfX3l6uDk,10573
|
|
71
71
|
webscout/Provider/Koboldai.py,sha256=gpRgyDe4OQWwNqT7MWnNrJx4dnFmCW23KUx0Ezjgchk,15185
|
|
72
72
|
webscout/Provider/Llama.py,sha256=N01p3ZVD1HgRnNNxhjRhBVD4m_qiextdyF1KDfJlqbE,7703
|
|
73
|
-
webscout/Provider/Llama3.py,sha256=
|
|
74
|
-
webscout/Provider/Marcus.py,sha256=
|
|
75
|
-
webscout/Provider/Netwrck.py,sha256=
|
|
73
|
+
webscout/Provider/Llama3.py,sha256=O2XJKoQD2bYq9T_PyFW36mFy3yNXYMuGSBzlfFzVdo8,8106
|
|
74
|
+
webscout/Provider/Marcus.py,sha256=JHVZdTy_6jre1HD1fxZK-BofNhwEYuGo3bHZnlPrmHg,6882
|
|
75
|
+
webscout/Provider/Netwrck.py,sha256=zZgKapRfQYmaZMmyxJNpRJrN9_LpUwLbcg6AnEW9UyI,9530
|
|
76
76
|
webscout/Provider/OLLAMA.py,sha256=RQXJt-PJYnA15_IXhUy4mM9qwm4PcBMfINaZm2KG6zE,7018
|
|
77
77
|
webscout/Provider/Openai.py,sha256=mpJ9VgIyvW6uo0-jIcx5Qcz4PIUAj3xVLOgKrB1z9pU,20074
|
|
78
|
-
webscout/Provider/PI.py,sha256=
|
|
78
|
+
webscout/Provider/PI.py,sha256=5Ja3xJhjHq_GOI0ESfTX4iMYLufdKAJLR3uHzMqhzdI,11637
|
|
79
79
|
webscout/Provider/Phind.py,sha256=FaE10xQJ_TluRnzA_t7SxXsqgKzTfXR5lLGla2DQVBM,19467
|
|
80
|
-
webscout/Provider/PizzaGPT.py,sha256=
|
|
81
|
-
webscout/Provider/RUBIKSAI.py,sha256=EwynOsqHrxk3dNP-hIMn7AO3MkA-RwNHPzA64Ola5Mo,10940
|
|
80
|
+
webscout/Provider/PizzaGPT.py,sha256=PzcWSoIR9gpxp9xnhFm7yB42a7AhCwWf_U7b2P_hjYE,9137
|
|
82
81
|
webscout/Provider/Reka.py,sha256=dWw4vX91nJhAn-X1SXK72gttRaTqWNGUBFaeRJobTJg,8519
|
|
83
82
|
webscout/Provider/TeachAnything.py,sha256=6scp1tzcc5z_TKUALArQ4APCNElHJ7SzsJoiB71o0V0,7169
|
|
84
|
-
webscout/Provider/TextPollinationsAI.py,sha256=
|
|
83
|
+
webscout/Provider/TextPollinationsAI.py,sha256=z-grxzhOmXtF1KmB20xLa_3rNittd1wfM_jkQVFgfWY,8817
|
|
85
84
|
webscout/Provider/Youchat.py,sha256=LmPskUWaOJlJSYsGeHsu5riD1X6Rp6pFmdApZh_t98I,10205
|
|
86
|
-
webscout/Provider/__init__.py,sha256=
|
|
85
|
+
webscout/Provider/__init__.py,sha256=UGr0caNw7TGNdrbUaFh5YsFgiFmiP-ztPdAIkkSEYDY,2715
|
|
87
86
|
webscout/Provider/ai4chat.py,sha256=av96iS4QPt9IzhcswowmDY2F8IUSLl1YVHZ4bAbfO-s,8140
|
|
88
87
|
webscout/Provider/aimathgpt.py,sha256=BdXNxEHQP11p6m0wl2Q-uben46A6lMKOg89utV1S7aI,7320
|
|
89
88
|
webscout/Provider/askmyai.py,sha256=MX3883xxpMe5GUahyQOwR4ZR_Oa_zAg4N7ksZ4zhB9s,5904
|
|
@@ -91,9 +90,9 @@ webscout/Provider/bagoodex.py,sha256=OdYIyvypX-Vkok9zAr6F5NwFQx_z0bKhiw8U4tTFw5o
|
|
|
91
90
|
webscout/Provider/cerebras.py,sha256=atAhSlTF1FAMDmKRz7oZaB5LP2qbzlvgqvn4KQjuvjo,7997
|
|
92
91
|
webscout/Provider/chatglm.py,sha256=y_9XV5XeENT4zDuZssAieZFXECqvnqwNxBst9_VjLv0,8047
|
|
93
92
|
webscout/Provider/cleeai.py,sha256=ZIPm2dT8H8BxGSLHsgp6aDWn3DVOxAOcFfkMNH1UK0I,7979
|
|
94
|
-
webscout/Provider/dgaf.py,sha256=
|
|
93
|
+
webscout/Provider/dgaf.py,sha256=2zRhbzRYnwn8EKjrpXckxkVp57mVBC2szguU8WIV5K4,8948
|
|
95
94
|
webscout/Provider/elmo.py,sha256=I7qq2YvKht28Z2KFTxj3wNyekJM6gAJCExilB-_UkzQ,9308
|
|
96
|
-
webscout/Provider/gaurish.py,sha256=
|
|
95
|
+
webscout/Provider/gaurish.py,sha256=TzW698VssiXdSElHQsPgMTSwFb9LXlJBN0kWp4JJmeg,10146
|
|
97
96
|
webscout/Provider/geminiapi.py,sha256=c2zvwqkRgscI8vU1FU4qb_4fPe374LIQJ_uHNM9lmF8,8297
|
|
98
97
|
webscout/Provider/geminiprorealtime.py,sha256=DQdChZRryg9bvXiKpos7wFlu0Q6QNq9lYkbb-FJubWk,5766
|
|
99
98
|
webscout/Provider/hermes.py,sha256=AF53q5_gpR4UIyTFYYEypimWmo87AyTo2YGLCQiptU4,8234
|
|
@@ -102,17 +101,17 @@ webscout/Provider/koala.py,sha256=qBtqjTvhoMQdDE8qUH0XuNa_x2bic77d7CUjIVboask,10
|
|
|
102
101
|
webscout/Provider/learnfastai.py,sha256=xANWSHF3e6kTKgwbAHYdjNWIwYvr5Bin0NDENmJvruE,9763
|
|
103
102
|
webscout/Provider/lepton.py,sha256=ocex934Pb0AXiDrTLh67KhouoHh4EIl5giQbW6cgeDQ,7513
|
|
104
103
|
webscout/Provider/llama3mitril.py,sha256=ykVZxFI-PJL9pASogjuAw9yRRuC7hjKoV8VPdV6ma_0,6445
|
|
105
|
-
webscout/Provider/llamatutor.py,sha256=
|
|
106
|
-
webscout/Provider/llmchat.py,sha256=
|
|
107
|
-
webscout/Provider/meta.py,sha256=
|
|
108
|
-
webscout/Provider/multichat.py,sha256=
|
|
104
|
+
webscout/Provider/llamatutor.py,sha256=GjTVCDafkTuvQySuAaP6IW2PkaBcdoTC5tIsSudYArU,8724
|
|
105
|
+
webscout/Provider/llmchat.py,sha256=LT3evOGDGda5YZJrtlUnLwv349fhp_4u0zIXLcTq974,8872
|
|
106
|
+
webscout/Provider/meta.py,sha256=sYhR1PeUphYUq89Gcf9yNUXKaJZGEIhI4UpeOqpJXZU,29914
|
|
107
|
+
webscout/Provider/multichat.py,sha256=bEyhaxdMdbxAqWHbWto7h4E6OTUWSpj-FP5ySC2ezUY,12456
|
|
109
108
|
webscout/Provider/promptrefine.py,sha256=W0Ka59yRRKCOBXfF_hF-iF30F0AR45OPxgCCZ6mZzuA,7722
|
|
110
109
|
webscout/Provider/talkai.py,sha256=FHBZzBdHrOVn41nkhhJmjhHuR1NKTOBE7lGgYDV-0dk,7598
|
|
111
110
|
webscout/Provider/turboseek.py,sha256=uEoL5eJFvnpDCymTufrC8O9Ni3i8acb0GBy4JweFeIE,8474
|
|
112
111
|
webscout/Provider/tutorai.py,sha256=hgjYrI1zqNRhHEoi8t1OU8m9i80EQCay5UtmKqbNS9w,11205
|
|
113
|
-
webscout/Provider/typegpt.py,sha256=
|
|
112
|
+
webscout/Provider/typegpt.py,sha256=CINbYx1BU9pC9gCdcdn0B_GgMYrpByXdvs53-PD4g-E,13271
|
|
114
113
|
webscout/Provider/x0gpt.py,sha256=eKDEbUIkY1Cc8mCad-CFA4ZgBXOmR7T7rKf89lh16-8,9383
|
|
115
|
-
webscout/Provider/yep.py,sha256=
|
|
114
|
+
webscout/Provider/yep.py,sha256=DXNXMElr-G19EB8GKB2MgAW5iNTI1EGS8lJd937o6Pk,9954
|
|
116
115
|
webscout/Provider/AISEARCH/DeepFind.py,sha256=u7pCCjoORh7URrK3nEujD_wkBUUuHrSKtUS9qBsPsBE,10043
|
|
117
116
|
webscout/Provider/AISEARCH/__init__.py,sha256=oSGWYCOsLGXxBLUN6R_x_ohElenwWlvKGK5BFsja1PM,61
|
|
118
117
|
webscout/Provider/AISEARCH/felo_search.py,sha256=uR89JwDXH5HB_EHdVwHC6CMpPeLvHFYmi6PO-YQmAyw,8879
|
|
@@ -191,9 +190,9 @@ webstoken/sentiment.py,sha256=Bivwm9Wmo2GMXvKYxPxd1vrnyDwDywyjxmOIe6jP6NM,7996
|
|
|
191
190
|
webstoken/stemmer.py,sha256=AYg1frOaS2CWF-KvFwh3_s-VMZUa0olM7CN1UaEpc-8,2551
|
|
192
191
|
webstoken/tagger.py,sha256=RgDxPw0E6VgeXTrAFnnOb4X2J2Hu3snafr-MJeWtHlc,2246
|
|
193
192
|
webstoken/tokenizer.py,sha256=RAaihP3Yq4OFHcXrTNUGBDLbq1-ti_lVUEw0CIPPCww,5858
|
|
194
|
-
webscout-7.
|
|
195
|
-
webscout-7.
|
|
196
|
-
webscout-7.
|
|
197
|
-
webscout-7.
|
|
198
|
-
webscout-7.
|
|
199
|
-
webscout-7.
|
|
193
|
+
webscout-7.1.dist-info/LICENSE.md,sha256=5mkWS6cgjGxJClmN7n--h0beF3uFAOV_Ngr1YTK33Tk,9203
|
|
194
|
+
webscout-7.1.dist-info/METADATA,sha256=fJE888ae-ka6thVAui3elFNsKy7u9MDoWz_BdMco3-E,40011
|
|
195
|
+
webscout-7.1.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
196
|
+
webscout-7.1.dist-info/entry_points.txt,sha256=7thMsVUoHiXGoIH1NeoocKpxlszWflNsNyrnDqGzvO0,70
|
|
197
|
+
webscout-7.1.dist-info/top_level.txt,sha256=KQtbgkA3gxcsADB0hIIx-heydmEYXpAY7xn3LjwDx0E,19
|
|
198
|
+
webscout-7.1.dist-info/RECORD,,
|
webscout/Provider/RUBIKSAI.py
DELETED
|
@@ -1,272 +0,0 @@
|
|
|
1
|
-
import cloudscraper
|
|
2
|
-
import json
|
|
3
|
-
from typing import Any, Dict, Optional
|
|
4
|
-
|
|
5
|
-
from webscout.AIutel import Optimizers
|
|
6
|
-
from webscout.AIutel import Conversation
|
|
7
|
-
from webscout.AIutel import AwesomePrompts, sanitize_stream
|
|
8
|
-
from webscout.AIbase import Provider
|
|
9
|
-
from webscout import exceptions
|
|
10
|
-
|
|
11
|
-
class RUBIKSAI(Provider):
|
|
12
|
-
"""
|
|
13
|
-
A class to interact with the Rubiks.ai API.
|
|
14
|
-
"""
|
|
15
|
-
|
|
16
|
-
AVAILABLE_MODELS = [
|
|
17
|
-
"gpt-4o-mini",
|
|
18
|
-
"gemini-1.5-pro"
|
|
19
|
-
]
|
|
20
|
-
|
|
21
|
-
def __init__(
|
|
22
|
-
self,
|
|
23
|
-
is_conversation: bool = True,
|
|
24
|
-
max_tokens: int = 600,
|
|
25
|
-
timeout: int = 30,
|
|
26
|
-
intro: str = None,
|
|
27
|
-
filepath: str = None,
|
|
28
|
-
update_file: bool = True,
|
|
29
|
-
proxies: dict = {},
|
|
30
|
-
history_offset: int = 10250,
|
|
31
|
-
act: str = None,
|
|
32
|
-
model: str = "gpt-4o-mini",
|
|
33
|
-
temperature: float = 0.6,
|
|
34
|
-
) -> None:
|
|
35
|
-
"""
|
|
36
|
-
Initializes the RUBIKSAI API with given parameters.
|
|
37
|
-
|
|
38
|
-
Args:
|
|
39
|
-
is_conversation (bool, optional): Flag for chatting conversationally. Defaults to True.
|
|
40
|
-
max_tokens (int, optional): Maximum number of tokens to be generated upon completion.
|
|
41
|
-
Defaults to 600.
|
|
42
|
-
timeout (int, optional): Http request timeout. Defaults to 30.
|
|
43
|
-
intro (str, optional): Conversation introductory prompt. Defaults to None.
|
|
44
|
-
filepath (str, optional): Path to file containing conversation history. Defaults to None.
|
|
45
|
-
update_file (bool, optional): Add new prompts and responses to the file. Defaults to True.
|
|
46
|
-
proxies (dict, optional): Http request proxies. Defaults to {}.
|
|
47
|
-
history_offset (int, optional): Limit conversation history to this number of last texts.
|
|
48
|
-
Defaults to 10250.
|
|
49
|
-
act (str|int, optional): Awesome prompt key or index. (Used as intro). Defaults to None.
|
|
50
|
-
model (str, optional): AI model to use. Defaults to "gpt-4o-mini".
|
|
51
|
-
Available models: "gpt-4o-mini", "gemini-1.5-pro"
|
|
52
|
-
temperature (float, optional): Sampling temperature. Defaults to 0.6.
|
|
53
|
-
"""
|
|
54
|
-
if model not in self.AVAILABLE_MODELS:
|
|
55
|
-
raise ValueError(f"Invalid model: {model}. Choose from: {self.AVAILABLE_MODELS}")
|
|
56
|
-
|
|
57
|
-
self.temperature = temperature
|
|
58
|
-
self.session = cloudscraper.create_scraper()
|
|
59
|
-
self.api_endpoint = "https://rubiks.ai/search/api/"
|
|
60
|
-
|
|
61
|
-
# Updated headers with all necessary fields
|
|
62
|
-
self.headers = {
|
|
63
|
-
"authority": "rubiks.ai",
|
|
64
|
-
"accept": "*/*",
|
|
65
|
-
"accept-encoding": "gzip, deflate, br, zstd",
|
|
66
|
-
"accept-language": "en-US,en;q=0.9,en-IN;q=0.8",
|
|
67
|
-
"content-type": "application/json",
|
|
68
|
-
"dnt": "1",
|
|
69
|
-
"origin": "https://rubiks.ai",
|
|
70
|
-
"referer": f"https://rubiks.ai/search/?q=&model={model}",
|
|
71
|
-
"sec-ch-ua": '"Microsoft Edge";v="131", "Chromium";v="131", "Not_A Brand";v="24"',
|
|
72
|
-
"sec-ch-ua-mobile": "?0",
|
|
73
|
-
"sec-ch-ua-platform": '"Windows"',
|
|
74
|
-
"sec-fetch-dest": "empty",
|
|
75
|
-
"sec-fetch-mode": "cors",
|
|
76
|
-
"sec-fetch-site": "same-origin",
|
|
77
|
-
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0"
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
# Get initial cookies
|
|
81
|
-
init_response = self.session.get("https://rubiks.ai/search/")
|
|
82
|
-
if not init_response.ok:
|
|
83
|
-
raise exceptions.FailedToGenerateResponseError("Failed to initialize session")
|
|
84
|
-
|
|
85
|
-
# Extract cf_clearance and other cookies
|
|
86
|
-
self.cookies = {
|
|
87
|
-
'cf_clearance': init_response.cookies.get('cf_clearance', ''),
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
# Update session with cookies and headers
|
|
91
|
-
self.session.headers.update(self.headers)
|
|
92
|
-
self.session.cookies.update(self.cookies)
|
|
93
|
-
|
|
94
|
-
self.is_conversation = is_conversation
|
|
95
|
-
self.max_tokens_to_sample = max_tokens
|
|
96
|
-
self.stream_chunk_size = 64
|
|
97
|
-
self.timeout = timeout
|
|
98
|
-
self.last_response = {}
|
|
99
|
-
self.model = model
|
|
100
|
-
|
|
101
|
-
self.__available_optimizers = (
|
|
102
|
-
method
|
|
103
|
-
for method in dir(Optimizers)
|
|
104
|
-
if callable(getattr(Optimizers, method)) and not method.startswith("__")
|
|
105
|
-
)
|
|
106
|
-
self.session.headers.update(self.headers)
|
|
107
|
-
Conversation.intro = (
|
|
108
|
-
AwesomePrompts().get_act(
|
|
109
|
-
act, raise_not_found=True, default=None, case_insensitive=True
|
|
110
|
-
)
|
|
111
|
-
if act
|
|
112
|
-
else intro or Conversation.intro
|
|
113
|
-
)
|
|
114
|
-
self.conversation = Conversation(
|
|
115
|
-
is_conversation, self.max_tokens_to_sample, filepath, update_file
|
|
116
|
-
)
|
|
117
|
-
self.conversation.history_offset = history_offset
|
|
118
|
-
self.session.proxies = proxies
|
|
119
|
-
|
|
120
|
-
def ask(
|
|
121
|
-
self,
|
|
122
|
-
prompt: str,
|
|
123
|
-
stream: bool = False,
|
|
124
|
-
raw: bool = False,
|
|
125
|
-
optimizer: str = None,
|
|
126
|
-
conversationally: bool = False,
|
|
127
|
-
) -> Dict[str, Any]:
|
|
128
|
-
"""
|
|
129
|
-
Sends a prompt to the Rubiks.ai API and returns the response.
|
|
130
|
-
|
|
131
|
-
Args:
|
|
132
|
-
prompt: The text prompt to generate text from.
|
|
133
|
-
stream (bool, optional): Whether to stream the response. Defaults to False.
|
|
134
|
-
raw (bool, optional): Whether to return the raw response. Defaults to False.
|
|
135
|
-
optimizer (str, optional): The name of the optimizer to use. Defaults to None.
|
|
136
|
-
conversationally (bool, optional): Whether to chat conversationally. Defaults to False.
|
|
137
|
-
|
|
138
|
-
Returns:
|
|
139
|
-
The response from the API.
|
|
140
|
-
"""
|
|
141
|
-
conversation_prompt = self.conversation.gen_complete_prompt(prompt)
|
|
142
|
-
if optimizer:
|
|
143
|
-
if optimizer in self.__available_optimizers:
|
|
144
|
-
conversation_prompt = getattr(Optimizers, optimizer)(
|
|
145
|
-
conversation_prompt if conversationally else prompt
|
|
146
|
-
)
|
|
147
|
-
else:
|
|
148
|
-
raise Exception(
|
|
149
|
-
f"Optimizer is not one of {self.__available_optimizers}"
|
|
150
|
-
)
|
|
151
|
-
|
|
152
|
-
payload = {
|
|
153
|
-
"model": self.model,
|
|
154
|
-
"stream": True,
|
|
155
|
-
"messages": [{"role": "user", "content": conversation_prompt}],
|
|
156
|
-
"temperature": self.temperature,
|
|
157
|
-
"search": ""
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
def for_stream():
|
|
161
|
-
try:
|
|
162
|
-
response = self.session.post(
|
|
163
|
-
self.api_endpoint,
|
|
164
|
-
json=payload,
|
|
165
|
-
stream=True,
|
|
166
|
-
timeout=self.timeout
|
|
167
|
-
)
|
|
168
|
-
|
|
169
|
-
if response.status_code == 403:
|
|
170
|
-
# Try to refresh the session
|
|
171
|
-
init_response = self.session.get("https://rubiks.ai/search/")
|
|
172
|
-
self.cookies['cf_clearance'] = init_response.cookies.get('cf_clearance', '')
|
|
173
|
-
self.session.cookies.update(self.cookies)
|
|
174
|
-
|
|
175
|
-
# Retry the request
|
|
176
|
-
response = self.session.post(
|
|
177
|
-
self.api_endpoint,
|
|
178
|
-
json=payload,
|
|
179
|
-
stream=True,
|
|
180
|
-
timeout=self.timeout
|
|
181
|
-
)
|
|
182
|
-
|
|
183
|
-
if not response.ok:
|
|
184
|
-
raise exceptions.FailedToGenerateResponseError(
|
|
185
|
-
f"Failed to generate response - ({response.status_code}, {response.reason})"
|
|
186
|
-
)
|
|
187
|
-
|
|
188
|
-
# ...rest of the streaming code...
|
|
189
|
-
streaming_response = ""
|
|
190
|
-
for line in response.iter_lines(decode_unicode=True):
|
|
191
|
-
if line:
|
|
192
|
-
if line.startswith("data: "):
|
|
193
|
-
json_data = line[6:]
|
|
194
|
-
if json_data == "[DONE]":
|
|
195
|
-
break
|
|
196
|
-
try:
|
|
197
|
-
data = json.loads(json_data)
|
|
198
|
-
if "choices" in data and len(data["choices"]) > 0:
|
|
199
|
-
content = data["choices"][0]["delta"].get("content", "")
|
|
200
|
-
streaming_response += content
|
|
201
|
-
yield content if raw else dict(text=content)
|
|
202
|
-
except json.decoder.JSONDecodeError:
|
|
203
|
-
continue
|
|
204
|
-
|
|
205
|
-
self.last_response.update(dict(text=streaming_response))
|
|
206
|
-
self.conversation.update_chat_history(
|
|
207
|
-
prompt, self.get_message(self.last_response)
|
|
208
|
-
)
|
|
209
|
-
|
|
210
|
-
except Exception as e:
|
|
211
|
-
raise exceptions.FailedToGenerateResponseError(f"Request failed: {str(e)}")
|
|
212
|
-
|
|
213
|
-
def for_non_stream():
|
|
214
|
-
for _ in for_stream():
|
|
215
|
-
pass
|
|
216
|
-
return self.last_response
|
|
217
|
-
|
|
218
|
-
return for_stream() if stream else for_non_stream()
|
|
219
|
-
|
|
220
|
-
def chat(
|
|
221
|
-
self,
|
|
222
|
-
prompt: str,
|
|
223
|
-
stream: bool = False,
|
|
224
|
-
optimizer: str = None,
|
|
225
|
-
conversationally: bool = False,
|
|
226
|
-
) -> str:
|
|
227
|
-
"""Generate response `str`
|
|
228
|
-
Args:
|
|
229
|
-
prompt (str): Prompt to be send.
|
|
230
|
-
stream (bool, optional): Flag for streaming response. Defaults to False.
|
|
231
|
-
optimizer (str, optional): Prompt optimizer name - `[code, shell_command]`. Defaults to None.
|
|
232
|
-
conversationally (bool, optional): Chat conversationally when using optimizer. Defaults to False.
|
|
233
|
-
Returns:
|
|
234
|
-
str: Response generated
|
|
235
|
-
"""
|
|
236
|
-
|
|
237
|
-
def for_stream():
|
|
238
|
-
for response in self.ask(
|
|
239
|
-
prompt, True, optimizer=optimizer, conversationally=conversationally
|
|
240
|
-
):
|
|
241
|
-
yield self.get_message(response)
|
|
242
|
-
|
|
243
|
-
def for_non_stream():
|
|
244
|
-
return self.get_message(
|
|
245
|
-
self.ask(
|
|
246
|
-
prompt,
|
|
247
|
-
False,
|
|
248
|
-
optimizer=optimizer,
|
|
249
|
-
conversationally=conversationally,
|
|
250
|
-
)
|
|
251
|
-
)
|
|
252
|
-
|
|
253
|
-
return for_stream() if stream else for_non_stream()
|
|
254
|
-
|
|
255
|
-
def get_message(self, response: dict) -> str:
|
|
256
|
-
"""Retrieves message only from response
|
|
257
|
-
|
|
258
|
-
Args:
|
|
259
|
-
response (dict): Response generated by `self.ask`
|
|
260
|
-
|
|
261
|
-
Returns:
|
|
262
|
-
str: Message extracted
|
|
263
|
-
"""
|
|
264
|
-
assert isinstance(response, dict), "Response should be of dict data-type only"
|
|
265
|
-
return response["text"]
|
|
266
|
-
if __name__ == '__main__':
|
|
267
|
-
|
|
268
|
-
from rich import print
|
|
269
|
-
ai = RUBIKSAI(timeout=5000)
|
|
270
|
-
response = ai.chat("write a poem about AI", stream=True)
|
|
271
|
-
for chunk in response:
|
|
272
|
-
print(chunk, end="", flush=True)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|