webscout 5.9__py3-none-any.whl → 6.0__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/Provider/Amigo.py +4 -2
- webscout/Provider/ChatHub.py +209 -0
- webscout/Provider/Chatify.py +3 -3
- webscout/Provider/Cloudflare.py +3 -3
- webscout/Provider/DARKAI.py +1 -1
- webscout/Provider/Deepinfra.py +95 -389
- webscout/Provider/Deepseek.py +4 -6
- webscout/Provider/DiscordRocks.py +3 -3
- webscout/Provider/Free2GPT.py +3 -3
- webscout/Provider/OLLAMA.py +4 -4
- webscout/Provider/RUBIKSAI.py +3 -3
- webscout/Provider/Youchat.py +4 -5
- webscout/Provider/__init__.py +5 -5
- webscout/Provider/ai4chat.py +3 -2
- webscout/Provider/bagoodex.py +145 -0
- webscout/Provider/bixin.py +3 -3
- webscout/Provider/cleeai.py +3 -3
- webscout/Provider/elmo.py +2 -5
- webscout/Provider/julius.py +6 -40
- webscout/Provider/llamatutor.py +2 -2
- webscout/Provider/prefind.py +3 -3
- webscout/Provider/promptrefine.py +3 -3
- webscout/Provider/turboseek.py +1 -1
- webscout/Provider/twitterclone.py +25 -41
- webscout/Provider/upstage.py +3 -3
- webscout/Provider/x0gpt.py +6 -6
- webscout/version.py +1 -1
- {webscout-5.9.dist-info → webscout-6.0.dist-info}/METADATA +11 -39
- {webscout-5.9.dist-info → webscout-6.0.dist-info}/RECORD +33 -32
- {webscout-5.9.dist-info → webscout-6.0.dist-info}/WHEEL +1 -1
- webscout/Provider/Poe.py +0 -208
- {webscout-5.9.dist-info → webscout-6.0.dist-info}/LICENSE.md +0 -0
- {webscout-5.9.dist-info → webscout-6.0.dist-info}/entry_points.txt +0 -0
- {webscout-5.9.dist-info → webscout-6.0.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: webscout
|
|
3
|
-
Version:
|
|
3
|
+
Version: 6.0
|
|
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
|
|
@@ -28,15 +28,14 @@ Requires-Dist: docstring-inheritance
|
|
|
28
28
|
Requires-Dist: click
|
|
29
29
|
Requires-Dist: curl-cffi
|
|
30
30
|
Requires-Dist: nest-asyncio
|
|
31
|
-
Requires-Dist: g4f
|
|
31
|
+
Requires-Dist: g4f>=0.2.2.3
|
|
32
32
|
Requires-Dist: g4f[webdriver]
|
|
33
33
|
Requires-Dist: rich
|
|
34
34
|
Requires-Dist: beautifulsoup4
|
|
35
35
|
Requires-Dist: markdownify
|
|
36
|
-
Requires-Dist: pydantic
|
|
37
36
|
Requires-Dist: requests
|
|
38
37
|
Requires-Dist: google-generativeai
|
|
39
|
-
Requires-Dist: lxml
|
|
38
|
+
Requires-Dist: lxml>=5.2.2
|
|
40
39
|
Requires-Dist: termcolor
|
|
41
40
|
Requires-Dist: orjson
|
|
42
41
|
Requires-Dist: PyYAML
|
|
@@ -44,8 +43,6 @@ Requires-Dist: appdirs
|
|
|
44
43
|
Requires-Dist: tls-client
|
|
45
44
|
Requires-Dist: clipman
|
|
46
45
|
Requires-Dist: playsound
|
|
47
|
-
Requires-Dist: poe-api-wrapper
|
|
48
|
-
Requires-Dist: pyreqwest-impersonate
|
|
49
46
|
Requires-Dist: ollama
|
|
50
47
|
Requires-Dist: pyfiglet
|
|
51
48
|
Requires-Dist: pillow
|
|
@@ -57,13 +54,13 @@ Requires-Dist: openai
|
|
|
57
54
|
Requires-Dist: prompt-toolkit
|
|
58
55
|
Requires-Dist: fake-useragent
|
|
59
56
|
Provides-Extra: dev
|
|
60
|
-
Requires-Dist: ruff
|
|
61
|
-
Requires-Dist: pytest
|
|
57
|
+
Requires-Dist: ruff>=0.1.6; extra == "dev"
|
|
58
|
+
Requires-Dist: pytest>=7.4.2; extra == "dev"
|
|
62
59
|
Provides-Extra: local
|
|
63
|
-
Requires-Dist: llama-cpp-python
|
|
64
|
-
Requires-Dist: colorama
|
|
65
|
-
Requires-Dist: numpy
|
|
66
|
-
Requires-Dist: huggingface-hub[cli]
|
|
60
|
+
Requires-Dist: llama-cpp-python; extra == "local"
|
|
61
|
+
Requires-Dist: colorama; extra == "local"
|
|
62
|
+
Requires-Dist: numpy; extra == "local"
|
|
63
|
+
Requires-Dist: huggingface-hub[cli]; extra == "local"
|
|
67
64
|
|
|
68
65
|
<div align="center">
|
|
69
66
|
<!-- Replace `#` with your actual links -->
|
|
@@ -108,7 +105,7 @@ Requires-Dist: huggingface-hub[cli] ; extra == 'local'
|
|
|
108
105
|
* **Text-to-Speech (TTS):** Convert text into natural-sounding speech using various TTS providers.
|
|
109
106
|
* **WebAI:** Experience the power of terminal-based GPT and an open interpreter for code execution and more.
|
|
110
107
|
* **Offline LLMs:** Utilize powerful language models offline with GGUF support.
|
|
111
|
-
* **Extensive Provider Ecosystem:** Explore a vast collection of providers, including
|
|
108
|
+
* **Extensive Provider Ecosystem:** Explore a vast collection of providers, including BasedGPT, DeepSeek, and many others.
|
|
112
109
|
* **Local LLM Execution:** Run GGUF models locally with minimal configuration.
|
|
113
110
|
* **Rawdog Scripting:** Execute Python scripts directly within your terminal using the `rawdog` feature.
|
|
114
111
|
* **GGUF Conversion & Quantization:** Convert and quantize Hugging Face models to GGUF format.
|
|
@@ -1128,10 +1125,6 @@ response_str = a.chat(prompt)
|
|
|
1128
1125
|
print(response_str)
|
|
1129
1126
|
```
|
|
1130
1127
|
|
|
1131
|
-
### `Poe` - Chat with Poe
|
|
1132
|
-
|
|
1133
|
-
Usage code is similar to other providers.
|
|
1134
|
-
|
|
1135
1128
|
### `BasedGPT` - Chat with GPT
|
|
1136
1129
|
|
|
1137
1130
|
```python
|
|
@@ -1210,27 +1203,6 @@ message = ai.get_message(response)
|
|
|
1210
1203
|
print(message)
|
|
1211
1204
|
```
|
|
1212
1205
|
|
|
1213
|
-
### `Deepinfra` - VLM
|
|
1214
|
-
|
|
1215
|
-
```python
|
|
1216
|
-
from webscout.Provider import VLM
|
|
1217
|
-
|
|
1218
|
-
# Load your image
|
|
1219
|
-
image_path = r"C:\Users\koula\OneDrive\Desktop\Webscout\photo_2024-03-25_19-23-40.jpg"
|
|
1220
|
-
|
|
1221
|
-
vlm_instance = VLM(model="llava-hf/llava-1.5-7b-hf", is_conversation=True, max_tokens=600, timeout=30, system_prompt="You are a Helpful AI.")
|
|
1222
|
-
image_base64 = vlm_instance.encode_image_to_base64(image_path)
|
|
1223
|
-
|
|
1224
|
-
prompt = {
|
|
1225
|
-
"content": "What is in this image?",
|
|
1226
|
-
"image": image_base64
|
|
1227
|
-
}
|
|
1228
|
-
|
|
1229
|
-
# Generate a response
|
|
1230
|
-
response = vlm_instance.chat(prompt)
|
|
1231
|
-
print(response)
|
|
1232
|
-
|
|
1233
|
-
```
|
|
1234
1206
|
|
|
1235
1207
|
### `GROQ`
|
|
1236
1208
|
|
|
@@ -1454,7 +1426,7 @@ else:
|
|
|
1454
1426
|
print(f"Error: {function_call_data['error']}")
|
|
1455
1427
|
```
|
|
1456
1428
|
|
|
1457
|
-
### LLAMA3, pizzagpt, RUBIKSAI, Koala, Darkai, AI4Chat, Farfalle, PIAI, Felo, XDASH, Julius, YouChat, YEPCHAT, Cloudflare, TurboSeek, Editee, AI21, Chatify, Cerebras, X0GPT, Lepton, GEMINIAPI, Cleeai, Elmo, Genspark, Upstage, Free2GPT, Bing, DiscordRocks, GPTWeb, AIGameIO, LlamaTutor, PromptRefine, AIUncensored, TutorAI, Bixin, ChatGPTES
|
|
1429
|
+
### LLAMA3, pizzagpt, RUBIKSAI, Koala, Darkai, AI4Chat, Farfalle, PIAI, Felo, XDASH, Julius, YouChat, YEPCHAT, Cloudflare, TurboSeek, Editee, AI21, Chatify, Cerebras, X0GPT, Lepton, GEMINIAPI, Cleeai, Elmo, Genspark, Upstage, Free2GPT, Bing, DiscordRocks, GPTWeb, AIGameIO, LlamaTutor, PromptRefine, AIUncensored, TutorAI, Bixin, ChatGPTES, Bagoodex, ChatHub, AmigoChat
|
|
1458
1430
|
|
|
1459
1431
|
Code is similar to other providers.
|
|
1460
1432
|
|
|
@@ -16,7 +16,7 @@ webscout/requestsHTMLfix.py,sha256=LZ9uynkwpGqVS2uFB5bMjdh6gLjSMerHPEqzVCvICIs,2
|
|
|
16
16
|
webscout/tempid.py,sha256=2a_YDFUCZy3TJVfqEPSLyMvHBjDk9gp5FiFCvJwsOaw,7984
|
|
17
17
|
webscout/transcriber.py,sha256=kRymTd69zCjXdduCf7Gabt93Kz1l5ubsCwfwqs-pHl8,22334
|
|
18
18
|
webscout/utils.py,sha256=2O8_lftBKsv5OEvVaXCN-h0sipup0m3jxzhFdWQrdY8,2873
|
|
19
|
-
webscout/version.py,sha256=
|
|
19
|
+
webscout/version.py,sha256=hYz692BsDXIWGYz2q1utTVLpvToGDFutlNIn3iOIgRs,44
|
|
20
20
|
webscout/webai.py,sha256=MzDWMFv8oI3wmeL3SwvxUrZdBRyh9MMn97kNTvgL5T4,87744
|
|
21
21
|
webscout/webscout_search.py,sha256=AOHkaMLmFvM1mS--wVyLiPrDAb5BPLaURBHjleWOi4w,43743
|
|
22
22
|
webscout/webscout_search_async.py,sha256=2-RCa9Deahhw3Bti78kXfVaX8y3Aygy4L7HeCaITk9M,14519
|
|
@@ -38,62 +38,63 @@ webscout/Local/samplers.py,sha256=qXwU4eLXER-2aCYzcJcTgA6BeFmi5GMpTDUX1C9pTN4,43
|
|
|
38
38
|
webscout/Local/thread.py,sha256=Lyf_N2CaGAn2usSWSiUXLPAgpWub8vUu_tgFgtnvZVA,27408
|
|
39
39
|
webscout/Local/utils.py,sha256=CSt9IqHhVGk_nJEnKvSFbLhC5nNf01e0MtwpgMmF9pA,6197
|
|
40
40
|
webscout/Provider/AI21.py,sha256=JBh-xnspxTZNMcl-Gd0Cgseqht9gTM64TUv9I4Imc9k,6218
|
|
41
|
-
webscout/Provider/Amigo.py,sha256=
|
|
41
|
+
webscout/Provider/Amigo.py,sha256=1dEVPx8HdaPEpOfrB2U1aUTW3ZoPxSycIf4OXzzKG80,11600
|
|
42
42
|
webscout/Provider/Andi.py,sha256=mKhrnN_TR3rVEBy-oZosEcujF83hISiFeBVM1mHYz2k,10107
|
|
43
43
|
webscout/Provider/BasedGPT.py,sha256=u1s72bQ33iuBqf5u7SWdez8_Eu7MTCM_iZoEW91t9CI,8309
|
|
44
44
|
webscout/Provider/Bing.py,sha256=zxIzq7dlqaLskx9LsYppbMJuwfGtYid3Uh0gIhZ0hps,9001
|
|
45
45
|
webscout/Provider/Blackboxai.py,sha256=ioEhw03eiM65tPvgyZKOCGFzqOT8la59W7HydNGILIw,16815
|
|
46
46
|
webscout/Provider/ChatGPTES.py,sha256=t_Qjn1ShNX0uYp5dJzv6Y7DPQM8HUTgvcBauhFz0-Io,8815
|
|
47
|
-
webscout/Provider/
|
|
48
|
-
webscout/Provider/
|
|
47
|
+
webscout/Provider/ChatHub.py,sha256=lM82-FH5fMQcNmKAaQUGfwwX2kMaBZtkCdMALMYYa6w,7343
|
|
48
|
+
webscout/Provider/Chatify.py,sha256=QYgZAEmhLkEnR7oyr-qUs6OSHoNJm2BgMr41f84Ntbg,6370
|
|
49
|
+
webscout/Provider/Cloudflare.py,sha256=KZ2aZj-K5se_Xn8GPozJ3xRx2lJhf36uIu0Tyx-jH54,10801
|
|
49
50
|
webscout/Provider/Cohere.py,sha256=oL9kAv--RSkEQxwkPTq1Wi57Wkgg0WNvL82CpTj22YY,8264
|
|
50
|
-
webscout/Provider/DARKAI.py,sha256=
|
|
51
|
-
webscout/Provider/Deepinfra.py,sha256=
|
|
52
|
-
webscout/Provider/Deepseek.py,sha256=
|
|
53
|
-
webscout/Provider/DiscordRocks.py,sha256=
|
|
51
|
+
webscout/Provider/DARKAI.py,sha256=bogR9SikV0MuYBkyWWvbqV2oeJVSV5oiMrpwiG0HBcw,9061
|
|
52
|
+
webscout/Provider/Deepinfra.py,sha256=djm8LSDj6aummNSym4HrJHZD2CCVJ_er1oxiFLiq1N4,6389
|
|
53
|
+
webscout/Provider/Deepseek.py,sha256=B3ph24Xmv__o3eyyUonFsVQgouO0i4ydIqp5oTe5aXc,9113
|
|
54
|
+
webscout/Provider/DiscordRocks.py,sha256=fRkVBCyDMZf0SoaNPK7KXAsh8mQj0JWDb7ifYpL9PQQ,11372
|
|
54
55
|
webscout/Provider/EDITEE.py,sha256=cGMTQiMROo7ohSBTOzs2vZneUs1Usjh_7ZFQ61JtD-k,7734
|
|
55
56
|
webscout/Provider/Farfalle.py,sha256=eVmSB4Dq6P2epo8dd6CyCtyxvOMFwvk6f0Ikb9nZ2d0,9017
|
|
56
|
-
webscout/Provider/Free2GPT.py,sha256=
|
|
57
|
+
webscout/Provider/Free2GPT.py,sha256=Lf8dd9iacry_GRr6CT86Cjcp-oNzLyw1O_TWIPDFDxk,9037
|
|
57
58
|
webscout/Provider/GPTWeb.py,sha256=egVGQ8cptr4wlCfrCNA2DM0oXYqhRcje9zxYK5txb2s,7429
|
|
58
59
|
webscout/Provider/Gemini.py,sha256=Vg2MLqQ_qxHkcN7Zikife1dyVK-y94ik8y6MAu-VzUI,7801
|
|
59
60
|
webscout/Provider/Groq.py,sha256=iqyewnxWwN7fMG-dqAR_SyUqImfyZS880lO5iaXso9c,28636
|
|
60
61
|
webscout/Provider/Koboldai.py,sha256=gpRgyDe4OQWwNqT7MWnNrJx4dnFmCW23KUx0Ezjgchk,15185
|
|
61
62
|
webscout/Provider/Llama.py,sha256=N01p3ZVD1HgRnNNxhjRhBVD4m_qiextdyF1KDfJlqbE,7703
|
|
62
63
|
webscout/Provider/Llama3.py,sha256=9jXo8k4ReFGkF01InzaBgUCKUJ0O5Zix3A0pHWRGtJU,7617
|
|
63
|
-
webscout/Provider/OLLAMA.py,sha256=
|
|
64
|
+
webscout/Provider/OLLAMA.py,sha256=NO23OqRcVj0RhU5bnd4y21m_Yfh6JYxc3azxHgzKvmg,7017
|
|
64
65
|
webscout/Provider/Openai.py,sha256=32uxZmZOovzshMQmqDcJ39If7N_UW4B3EeYmaxP_GwE,19983
|
|
65
66
|
webscout/Provider/PI.py,sha256=IodVvGR_RIZpGJ0ypFF4U6NBMZAZ5O1BlRFMelot8so,8364
|
|
66
67
|
webscout/Provider/Perplexity.py,sha256=vcTjwFPi2WC-ck91V3QE_EtmCwFcWaQHku4aAzMoPPM,21461
|
|
67
68
|
webscout/Provider/Phind.py,sha256=NA_b3B4h-kutX6wdoEg4THPfZggl2UeXPbramzZ6oiU,19297
|
|
68
69
|
webscout/Provider/PizzaGPT.py,sha256=tEuEJAGbv-mTd479i3EgaqHd4NwgkrmMW0fpSsGm_N0,7207
|
|
69
|
-
webscout/Provider/
|
|
70
|
-
webscout/Provider/RUBIKSAI.py,sha256=uJlJfnX6kDU2mXhmmRZIn3U_y_bSntwmPuXmXH66W_8,8484
|
|
70
|
+
webscout/Provider/RUBIKSAI.py,sha256=fHCOAFWGXIESA05Bmuqtx6ZChnWomHOMwndfTLv1Hg8,8517
|
|
71
71
|
webscout/Provider/Reka.py,sha256=RZG1YZ5rd7WWmOTGoM_2IpEAKn1MzemHWYad4US4Q8s,8258
|
|
72
72
|
webscout/Provider/TeachAnything.py,sha256=0pQfktjnzM_7UElYVxWTIiHU2WvgNs57CxEuu89F5aw,6776
|
|
73
|
-
webscout/Provider/Youchat.py,sha256=
|
|
74
|
-
webscout/Provider/__init__.py,sha256=
|
|
75
|
-
webscout/Provider/ai4chat.py,sha256=
|
|
73
|
+
webscout/Provider/Youchat.py,sha256=LZPmQwg71JQFabH5gIXIGzZPafRHYZBP9VVBXh-ZFYQ,9011
|
|
74
|
+
webscout/Provider/__init__.py,sha256=AGfF1pJYOjsguRV68PrnBvEK0i5lphx2WowzzaWSGY4,2771
|
|
75
|
+
webscout/Provider/ai4chat.py,sha256=av96iS4QPt9IzhcswowmDY2F8IUSLl1YVHZ4bAbfO-s,8140
|
|
76
76
|
webscout/Provider/aigames.py,sha256=vGiGYNLvVBfwwsBSWwDKZbvJsFy8SYsFWRKqx7U7ALY,8083
|
|
77
|
-
webscout/Provider/
|
|
77
|
+
webscout/Provider/bagoodex.py,sha256=OdYIyvypX-Vkok9zAr6F5NwFQx_z0bKhiw8U4tTFw5o,5023
|
|
78
|
+
webscout/Provider/bixin.py,sha256=tBelpS34RYFwXwe2XSnlnlskEw6o2sPOFWoN-MJN6hE,10577
|
|
78
79
|
webscout/Provider/cerebras.py,sha256=N9Z7wY9pQRhh7chMSDirgHd1GV8Jwjeb3RmYB1pcww4,7302
|
|
79
|
-
webscout/Provider/cleeai.py,sha256=
|
|
80
|
-
webscout/Provider/elmo.py,sha256=
|
|
80
|
+
webscout/Provider/cleeai.py,sha256=NCivTCZU_BU3umuF-rHweNhdlnJE9Hwsd5A3611bFTM,8050
|
|
81
|
+
webscout/Provider/elmo.py,sha256=6C-j8xLfgyMjmv8jdjey0BPzl_UwEFpMEbBtYobfPd0,9387
|
|
81
82
|
webscout/Provider/felo_search.py,sha256=7yQ4YpjCrlzdb4IENrVATiWoJqYTxR7QduUZK_klDWY,6842
|
|
82
83
|
webscout/Provider/geminiapi.py,sha256=sGg7AncRShMacLTBwn39CzG4zsRz9JSBwVO4LlUdt6g,7869
|
|
83
84
|
webscout/Provider/genspark.py,sha256=h1dTcs50EsDH2-aioYKcPggh28kaJnwHOM7gG4s0FTY,8727
|
|
84
|
-
webscout/Provider/julius.py,sha256=
|
|
85
|
+
webscout/Provider/julius.py,sha256=IxhgYGfCpaPoTIamirsrIJVdzhbFf5hVERMNI6WrdXY,8516
|
|
85
86
|
webscout/Provider/koala.py,sha256=qBtqjTvhoMQdDE8qUH0XuNa_x2bic77d7CUjIVboask,10106
|
|
86
87
|
webscout/Provider/learnfastai.py,sha256=j2hYwCVNpWZM4rN_4my9R0IfStNoAsIXjkvr_CRYcA0,9790
|
|
87
88
|
webscout/Provider/lepton.py,sha256=4RiQ4YNJljX558yhSUqws6pf1Yhf7pWIesa4SRQCry8,7590
|
|
88
|
-
webscout/Provider/llamatutor.py,sha256=
|
|
89
|
+
webscout/Provider/llamatutor.py,sha256=DijA4Y1CVDz-Ks8pACTSb6hnOxdQD2IHw-_ztRqhyPQ,8871
|
|
89
90
|
webscout/Provider/meta.py,sha256=TpoStt2nTUTCYxx4GI3IOQ7gX_Mi36pL7HhtjPvLtZQ,30717
|
|
90
|
-
webscout/Provider/prefind.py,sha256=
|
|
91
|
-
webscout/Provider/promptrefine.py,sha256=
|
|
92
|
-
webscout/Provider/turboseek.py,sha256=
|
|
91
|
+
webscout/Provider/prefind.py,sha256=msw_kXO59Xz-xG5f72O3WIww-HVyUAj-WpByeLiCB1U,9306
|
|
92
|
+
webscout/Provider/promptrefine.py,sha256=_8NEk376wXuB2ws51GGBegmkv-oz4dG7Ll5nHPCdd8c,7460
|
|
93
|
+
webscout/Provider/turboseek.py,sha256=N7Sn9UyMMAfwjz7RUaW8XfihlQO2YTF00YIlDuCFvaY,8571
|
|
93
94
|
webscout/Provider/tutorai.py,sha256=lnuZJ9rN-sYjTXOBTkUuKsjO6LErrBkh-bDhziEGZB8,14743
|
|
94
|
-
webscout/Provider/twitterclone.py,sha256=
|
|
95
|
-
webscout/Provider/upstage.py,sha256=
|
|
96
|
-
webscout/Provider/x0gpt.py,sha256=
|
|
95
|
+
webscout/Provider/twitterclone.py,sha256=xqPcMOIkRLpzs4E1e3vNo_kJt55KfUuYZf_g0cjEePk,9248
|
|
96
|
+
webscout/Provider/upstage.py,sha256=rdH94hIwR98HKfar576WzVmgdB1DU2H8qaChUmJFtPc,9237
|
|
97
|
+
webscout/Provider/x0gpt.py,sha256=Z8U4MQIRfhHpdarHO6_BZ27veXMDEAneguJ7uFSD_HU,6478
|
|
97
98
|
webscout/Provider/xdash.py,sha256=wyn1tBLwe4lo8LBqEFrr0hFDPj84z2p8PONdyzsj5f4,7369
|
|
98
99
|
webscout/Provider/yep.py,sha256=ge7a3cK02G6tbT0_q9glH7ujCx3QlgrqwBuHasQVYfQ,20581
|
|
99
100
|
webscout/Provider/TTI/Nexra.py,sha256=0zyf0nKJEPjOQd4z_2eNur14hfO9Z2JwHILLj9urdJI,4589
|
|
@@ -110,9 +111,9 @@ webscout/Provider/TTS/__init__.py,sha256=uGhNvQUrElyPfxoXs5V9xJpLuIyShe3yKHif5Ma
|
|
|
110
111
|
webscout/Provider/TTS/parler.py,sha256=NbS2IGhyZiTNQ3jNG3v1XWyVioHuBdsP0MIvQq7BKOg,3805
|
|
111
112
|
webscout/Provider/TTS/streamElements.py,sha256=aaE55W_bAzvL3-pl7tHs_xU7dSZB5_V7ix-usoe-4aM,7398
|
|
112
113
|
webscout/Provider/TTS/voicepod.py,sha256=wAAnpcpDyej72UjIRhEnEmcoJnUqp1lPCLiiwJMYJic,4343
|
|
113
|
-
webscout-
|
|
114
|
-
webscout-
|
|
115
|
-
webscout-
|
|
116
|
-
webscout-
|
|
117
|
-
webscout-
|
|
118
|
-
webscout-
|
|
114
|
+
webscout-6.0.dist-info/LICENSE.md,sha256=9P0imsudI7MEvZe2pOcg8rKBn6E5FGHQ-riYozZI-Bk,2942
|
|
115
|
+
webscout-6.0.dist-info/METADATA,sha256=cRYRAEsYqzmx_GwJOs_-TYOfOttah5yFl1jTDDdmwpg,50049
|
|
116
|
+
webscout-6.0.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
|
117
|
+
webscout-6.0.dist-info/entry_points.txt,sha256=Hh4YIIjvkqB9SVxZ2ri4DZUkgEu_WF_5_r_nZDIvfG8,73
|
|
118
|
+
webscout-6.0.dist-info/top_level.txt,sha256=nYIw7OKBQDr_Z33IzZUKidRD3zQEo8jOJYkMVMeN334,9
|
|
119
|
+
webscout-6.0.dist-info/RECORD,,
|
webscout/Provider/Poe.py
DELETED
|
@@ -1,208 +0,0 @@
|
|
|
1
|
-
from poe_api_wrapper import PoeApi
|
|
2
|
-
from poe_api_wrapper.api import BOTS_LIST
|
|
3
|
-
from ..AIbase import Provider
|
|
4
|
-
from ..AIutel import Conversation
|
|
5
|
-
from ..AIutel import Optimizers
|
|
6
|
-
from ..AIutel import AwesomePrompts
|
|
7
|
-
from pathlib import Path
|
|
8
|
-
from json import loads
|
|
9
|
-
from json import dumps
|
|
10
|
-
from loguru import logger
|
|
11
|
-
import logging
|
|
12
|
-
|
|
13
|
-
logger.remove()
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
class POE(Provider):
|
|
17
|
-
def __init__(
|
|
18
|
-
self,
|
|
19
|
-
cookie: str,
|
|
20
|
-
model: str = "Assistant",
|
|
21
|
-
proxy: bool = False,
|
|
22
|
-
timeout: int = 30,
|
|
23
|
-
filepath: str = None,
|
|
24
|
-
update_file: str = True,
|
|
25
|
-
intro: str = None,
|
|
26
|
-
act: str = None,
|
|
27
|
-
init: bool = True,
|
|
28
|
-
):
|
|
29
|
-
"""Initializes POE
|
|
30
|
-
|
|
31
|
-
Args:
|
|
32
|
-
cookie (str): Path to `poe.com.cookies.json` file or 'p-b' cookie-value.
|
|
33
|
-
model (str, optional): Model name. Default to Assistant.
|
|
34
|
-
proxy (bool, optional): Flag for Httpx request proxy. Defaults to False.
|
|
35
|
-
timeout (int, optional): Http request timeout. Defaults to 30.
|
|
36
|
-
filepath (str, optional): Path to save the chat history. Defaults to None.
|
|
37
|
-
update_file (str, optional): Flag for controlling chat history updates. Defaults to True.
|
|
38
|
-
intro (str, optional): Conversation introductory prompt. Defaults to None.
|
|
39
|
-
act (str|int, optional): Awesome prompt key or index. (Used as intro). Defaults to None.
|
|
40
|
-
init (bool, optional): Resend the intro prompt. Defaults to True.
|
|
41
|
-
"""
|
|
42
|
-
assert isinstance(
|
|
43
|
-
cookie, str
|
|
44
|
-
), f"Cookie must be of {str} datatype only not {type(cookie)}"
|
|
45
|
-
assert (
|
|
46
|
-
model in BOTS_LIST.keys()
|
|
47
|
-
), f"model name '{model}' is not one of {', '.join(list(BOTS_LIST.keys()))}"
|
|
48
|
-
cookie_path = Path(cookie)
|
|
49
|
-
|
|
50
|
-
if cookie_path.exists() or any(["/" in cookie, ".json" in cookie]):
|
|
51
|
-
cookie = None
|
|
52
|
-
all_cookies = loads(cookie_path.read_text())
|
|
53
|
-
for entry in all_cookies:
|
|
54
|
-
if entry["name"] == "p-b":
|
|
55
|
-
cookie = entry["value"]
|
|
56
|
-
assert (
|
|
57
|
-
cookie
|
|
58
|
-
), f'Required cookie value cannot be retrieved from the path "{cookie_path.as_posix()}"'
|
|
59
|
-
|
|
60
|
-
if proxy:
|
|
61
|
-
import poe_api_wrapper.proxies as proxies
|
|
62
|
-
|
|
63
|
-
proxies.PROXY = True
|
|
64
|
-
|
|
65
|
-
self.bot = BOTS_LIST[model]
|
|
66
|
-
self.session = PoeApi(cookie)
|
|
67
|
-
self.last_response = {}
|
|
68
|
-
self.__available_optimizers = (
|
|
69
|
-
method
|
|
70
|
-
for method in dir(Optimizers)
|
|
71
|
-
if callable(getattr(Optimizers, method)) and not method.startswith("__")
|
|
72
|
-
)
|
|
73
|
-
Conversation.intro = (
|
|
74
|
-
AwesomePrompts().get_act(
|
|
75
|
-
act, raise_not_found=True, default=None, case_insensitive=True
|
|
76
|
-
)
|
|
77
|
-
if act
|
|
78
|
-
else intro or Conversation.intro
|
|
79
|
-
)
|
|
80
|
-
self.conversation = Conversation(
|
|
81
|
-
status=False, filepath=filepath, update_file=update_file
|
|
82
|
-
)
|
|
83
|
-
if init:
|
|
84
|
-
self.ask(self.conversation.intro) # Init
|
|
85
|
-
|
|
86
|
-
def ask(
|
|
87
|
-
self,
|
|
88
|
-
prompt: str,
|
|
89
|
-
stream: bool = False,
|
|
90
|
-
raw: bool = False,
|
|
91
|
-
optimizer: str = None,
|
|
92
|
-
conversationally: bool = False,
|
|
93
|
-
) -> dict:
|
|
94
|
-
"""Chat with AI
|
|
95
|
-
|
|
96
|
-
Args:
|
|
97
|
-
prompt (str): Prompt to be send.
|
|
98
|
-
stream (bool, optional): Flag for streaming response. Defaults to False.
|
|
99
|
-
raw (bool, optional): Stream back raw response as received. Defaults to False.
|
|
100
|
-
optimizer (str, optional): Prompt optimizer name - `[code, shell_command]`. Defeaults to None
|
|
101
|
-
conversationally (bool, optional): Chat conversationally when using optimizer. Defaults to False.
|
|
102
|
-
Returns:
|
|
103
|
-
dict : {}
|
|
104
|
-
```json
|
|
105
|
-
{
|
|
106
|
-
"id": "TWVzc2FnZToxMTU0MzgyNDQ1ODU=",
|
|
107
|
-
"messageId": 115438244585,
|
|
108
|
-
"creationTime": 1707777376544407,
|
|
109
|
-
"clientNonce": null,
|
|
110
|
-
"state": "complete",
|
|
111
|
-
"text": "Hello! How can I assist you today?",
|
|
112
|
-
"author": "capybara",
|
|
113
|
-
"contentType": "text_markdown",
|
|
114
|
-
"sourceType": "chat_input",
|
|
115
|
-
"attachmentTruncationState": "not_truncated",
|
|
116
|
-
"attachments": [],
|
|
117
|
-
"vote": null,
|
|
118
|
-
"suggestedReplies": [],
|
|
119
|
-
"hasCitations": false,
|
|
120
|
-
"__isNode": "Message",
|
|
121
|
-
"textLengthOnCancellation": null,
|
|
122
|
-
"chatCode": "21a2jn0yrq9phxiy478",
|
|
123
|
-
"chatId": 328236777,
|
|
124
|
-
"title": null,
|
|
125
|
-
"response": ""
|
|
126
|
-
}
|
|
127
|
-
```
|
|
128
|
-
"""
|
|
129
|
-
conversation_prompt = self.conversation.gen_complete_prompt(prompt)
|
|
130
|
-
if optimizer:
|
|
131
|
-
if optimizer in self.__available_optimizers:
|
|
132
|
-
conversation_prompt = getattr(Optimizers, optimizer)(
|
|
133
|
-
conversation_prompt if conversationally else prompt
|
|
134
|
-
)
|
|
135
|
-
else:
|
|
136
|
-
raise Exception(
|
|
137
|
-
f"Optimizer is not one of {self.__available_optimizers}"
|
|
138
|
-
)
|
|
139
|
-
|
|
140
|
-
def for_stream():
|
|
141
|
-
for response in self.session.send_message(self.bot, conversation_prompt):
|
|
142
|
-
if raw:
|
|
143
|
-
yield dumps(response)
|
|
144
|
-
else:
|
|
145
|
-
yield response
|
|
146
|
-
|
|
147
|
-
self.last_response.update(response)
|
|
148
|
-
|
|
149
|
-
self.conversation.update_chat_history(
|
|
150
|
-
prompt,
|
|
151
|
-
self.get_message(self.last_response),
|
|
152
|
-
force=True,
|
|
153
|
-
)
|
|
154
|
-
|
|
155
|
-
def for_non_stream():
|
|
156
|
-
# let's make use of stream
|
|
157
|
-
for _ in for_stream():
|
|
158
|
-
pass
|
|
159
|
-
return self.last_response
|
|
160
|
-
|
|
161
|
-
return for_stream() if stream else for_non_stream()
|
|
162
|
-
|
|
163
|
-
def chat(
|
|
164
|
-
self,
|
|
165
|
-
prompt: str,
|
|
166
|
-
stream: bool = False,
|
|
167
|
-
optimizer: str = None,
|
|
168
|
-
conversationally: bool = False,
|
|
169
|
-
) -> str:
|
|
170
|
-
"""Generate response `str`
|
|
171
|
-
Args:
|
|
172
|
-
prompt (str): Prompt to be send.
|
|
173
|
-
stream (bool, optional): Flag for streaming response. Defaults to False.
|
|
174
|
-
optimizer (str, optional): Prompt optimizer name - `[code, shell_command]`. Defaults to None.
|
|
175
|
-
conversationally (bool, optional): Chat conversationally when using optimizer. Defaults to False.
|
|
176
|
-
Returns:
|
|
177
|
-
str: Response generated
|
|
178
|
-
"""
|
|
179
|
-
|
|
180
|
-
def for_stream():
|
|
181
|
-
for response in self.ask(
|
|
182
|
-
prompt, True, optimizer=optimizer, conversationally=conversationally
|
|
183
|
-
):
|
|
184
|
-
yield self.get_message(response)
|
|
185
|
-
|
|
186
|
-
def for_non_stream():
|
|
187
|
-
return self.get_message(
|
|
188
|
-
self.ask(
|
|
189
|
-
prompt,
|
|
190
|
-
False,
|
|
191
|
-
optimizer=optimizer,
|
|
192
|
-
conversationally=conversationally,
|
|
193
|
-
)
|
|
194
|
-
)
|
|
195
|
-
|
|
196
|
-
return for_stream() if stream else for_non_stream()
|
|
197
|
-
|
|
198
|
-
def get_message(self, response: dict) -> str:
|
|
199
|
-
"""Retrieves message only from response
|
|
200
|
-
|
|
201
|
-
Args:
|
|
202
|
-
response (dict): Response generated by `self.ask`
|
|
203
|
-
|
|
204
|
-
Returns:
|
|
205
|
-
str: Message extracted
|
|
206
|
-
"""
|
|
207
|
-
assert isinstance(response, dict), "Response should be of dict data-type only"
|
|
208
|
-
return response["text"]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|