webscout 3.5__py3-none-any.whl → 3.6__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: webscout
3
- Version: 3.5
3
+ Version: 3.6
4
4
  Summary: Search for anything using Google, DuckDuckGo, brave, qwant, 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
5
5
  Author: OEvortex
6
6
  Author-email: helpingai5@gmail.com
@@ -54,6 +54,7 @@ Requires-Dist: Helpingai-T2
54
54
  Requires-Dist: playsound
55
55
  Requires-Dist: poe-api-wrapper
56
56
  Requires-Dist: pyreqwest-impersonate
57
+ Requires-Dist: ballyregan
57
58
  Provides-Extra: dev
58
59
  Requires-Dist: ruff >=0.1.6 ; extra == 'dev'
59
60
  Requires-Dist: pytest >=7.4.2 ; extra == 'dev'
@@ -999,6 +1000,23 @@ prompt = "write a essay on phind"
999
1000
  # Use the 'ask' method to send the prompt and receive a response
1000
1001
  response = ph.ask(prompt)
1001
1002
 
1003
+ # Extract and print the message from the response
1004
+ message = ph.get_message(response)
1005
+ print(message)
1006
+ ```
1007
+ Using phindv2
1008
+ ```python
1009
+ from webscout import Phindv2
1010
+
1011
+ # Create an instance of the PHIND class
1012
+ ph = Phindv2()
1013
+
1014
+ # Define a prompt to send to the AI
1015
+ prompt = ""
1016
+
1017
+ # Use the 'ask' method to send the prompt and receive a response
1018
+ response = ph.ask(prompt)
1019
+
1002
1020
  # Extract and print the message from the response
1003
1021
  message = ph.get_message(response)
1004
1022
  print(message)
@@ -1019,7 +1037,7 @@ print(r)
1019
1037
 
1020
1038
  ```
1021
1039
 
1022
- ### 3. `You.com` - search/chat with you.com
1040
+ ### 3. `You.com` - search/chat with you.com - Not working
1023
1041
  ```python
1024
1042
 
1025
1043
  from webscout import YouChat
@@ -1143,6 +1161,45 @@ while True:
1143
1161
  response_str = opengpt.chat(prompt)
1144
1162
  print(response_str)
1145
1163
  ```
1164
+ ```python
1165
+ from webscout import OPENGPTv2
1166
+
1167
+ # Initialize the bot with all specified settings
1168
+ bot = OPENGPTv2(
1169
+ generate_new_agents=True, # Set to True to generate new IDs, False to load from file
1170
+ assistant_name="My Custom Assistant",
1171
+ retrieval_description="Helpful information from my files.",
1172
+ agent_system_message="",
1173
+ enable_action_server=False, # Assuming you want to disable Action Server by Robocorp
1174
+ enable_ddg_search=False, # Enable DuckDuckGo search tool
1175
+ enable_arxiv=False, # Assuming you want to disable Arxiv
1176
+ enable_press_releases=False, # Assuming you want to disable Press Releases (Kay.ai)
1177
+ enable_pubmed=False, # Assuming you want to disable PubMed
1178
+ enable_sec_filings=False, # Assuming you want to disable SEC Filings (Kay.ai)
1179
+ enable_retrieval=False, # Assuming you want to disable Retrieval
1180
+ enable_search_tavily=False, # Assuming you want to disable Search (Tavily)
1181
+ enable_search_short_answer_tavily=False, # Assuming you want to disable Search (short answer, Tavily)
1182
+ enable_you_com_search=True, # Assuming you want to disable You.com Search
1183
+ enable_wikipedia=False, # Enable Wikipedia tool
1184
+ is_public=True,
1185
+ is_conversation=True,
1186
+ max_tokens=800,
1187
+ timeout=40,
1188
+ filepath="opengpt_conversation_history.txt",
1189
+ update_file=True,
1190
+ history_offset=10250,
1191
+ act=None,
1192
+ )
1193
+
1194
+ # Example interaction loop
1195
+ while True:
1196
+ prompt = input("You: ")
1197
+ if prompt.strip().lower() == 'exit':
1198
+ break
1199
+ response = bot.chat(prompt)
1200
+ print(response)
1201
+
1202
+ ```
1146
1203
  ### 9. `KOBOLDAI` -
1147
1204
  ```python
1148
1205
  from webscout import KOBOLDAI
@@ -1258,8 +1315,26 @@ print(response)
1258
1315
  Usage code similar to other proviers
1259
1316
 
1260
1317
  ### 16. `BasedGPT` - chat with GPT
1261
- Usage code similar to other providers
1318
+ ```
1319
+ from webscout import BasedGPT
1320
+
1321
+ # Initialize the BasedGPT provider
1322
+ basedgpt = BasedGPT(
1323
+ is_conversation=True, # Chat conversationally
1324
+ max_tokens=600, # Maximum tokens to generate
1325
+ timeout=30, # HTTP request timeout
1326
+ intro="You are a helpful and friendly AI.", # Introductory prompt
1327
+ filepath="chat_history.txt", # File to store conversation history
1328
+ update_file=True, # Update the chat history file
1329
+ )
1262
1330
 
1331
+ # Send a prompt to the AI
1332
+ prompt = "What is the meaning of life?"
1333
+ response = basedgpt.chat(prompt)
1334
+
1335
+ # Print the AI's response
1336
+ print(response)
1337
+ ```
1263
1338
  ### 17. `DeepSeek` -chat with deepseek
1264
1339
  ```python
1265
1340
  from webscout import DeepSeek
@@ -1292,7 +1367,7 @@ while True:
1292
1367
  r = ai.chat(prompt)
1293
1368
  print(r)
1294
1369
  ```
1295
- ### 18. Deepinfra
1370
+ ### 18. `Deepinfra`
1296
1371
  ```python
1297
1372
  from webscout import DeepInfra
1298
1373
 
@@ -1318,30 +1393,33 @@ message = ai.get_message(response)
1318
1393
  print(message)
1319
1394
  ```
1320
1395
 
1321
- ### 19. Deepinfra - VLM
1396
+ ### 19. `Deepinfra` - VLM
1322
1397
  ```python
1323
- from webscout import DeepInfra
1398
+ from webscout.Provider import VLM
1324
1399
 
1325
- ai = DeepInfra(
1326
- is_conversation=True,
1327
- model= "Qwen/Qwen2-72B-Instruct",
1328
- max_tokens=800,
1329
- timeout=30,
1330
- intro=None,
1331
- filepath=None,
1332
- update_file=True,
1333
- proxies={},
1334
- history_offset=10250,
1335
- act=None,
1336
- )
1400
+ # Load your image
1401
+ image_path = r"C:\Users\koula\OneDrive\Desktop\Webscout\photo_2024-03-25_19-23-40.jpg"
1337
1402
 
1338
- prompt = "what is meaning of life"
1403
+ 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.")
1404
+ image_base64 = vlm_instance.encode_image_to_base64(image_path)
1339
1405
 
1340
- response = ai.ask(prompt)
1406
+ prompt = {
1407
+ "content": "What is in this image?",
1408
+ "image": image_base64
1409
+ }
1410
+
1411
+ # Generate a response
1412
+ response = vlm_instance.chat(prompt)
1413
+ print(response)
1341
1414
 
1342
- # Extract and print the message from the response
1343
- message = ai.get_message(response)
1344
- print(message)
1415
+ ```
1416
+ ### 20. `VTLchat` - Free gpt3.5
1417
+ ```python
1418
+ from webscout import VTLchat
1419
+
1420
+ provider = VTLchat()
1421
+ response = provider.chat("Hello, how are you?")
1422
+ print(response)
1345
1423
  ```
1346
1424
  ### `LLM`
1347
1425
  ```python
@@ -1593,7 +1671,7 @@ class TaskExecutor:
1593
1671
  self._proxy_path: str = None # Path to proxy configuration
1594
1672
 
1595
1673
  # History Management
1596
- self._history_filepath: str = None
1674
+ self._history_filepath: str = "history.txt"
1597
1675
  self._update_history_file: bool = True
1598
1676
  self._history_offset: int = 10250
1599
1677
 
@@ -1604,7 +1682,7 @@ class TaskExecutor:
1604
1682
  # Optional Features
1605
1683
  self._web_search_enabled: bool = False # Enable web search
1606
1684
  self._rawdog_enabled: bool = True
1607
- self._internal_script_execution_enabled: bool = False
1685
+ self._internal_script_execution_enabled: bool = True
1608
1686
  self._script_confirmation_required: bool = False
1609
1687
  self._selected_interpreter: str = "python"
1610
1688
  self._selected_optimizer: str = "code"
@@ -1632,6 +1710,9 @@ class TaskExecutor:
1632
1710
  "chatgptuk": webscout.ChatGPTUK,
1633
1711
  "poe": webscout.POE,
1634
1712
  "basedgpt": webscout.BasedGPT,
1713
+ "deepseek": webscout.DeepSeek,
1714
+ "deepinfra": webscout.DeepInfra,
1715
+ "opengenptv2": webscout.OPENGPTv2
1635
1716
  }
1636
1717
 
1637
1718
  # Initialize Rawdog if enabled
@@ -1761,13 +1842,26 @@ class TaskExecutor:
1761
1842
  """
1762
1843
  try:
1763
1844
  is_feedback = self._rawdog_instance.main(response)
1845
+ if is_feedback and "PREVIOUS SCRIPT EXCEPTION" in is_feedback:
1846
+ self._console.print(Markdown(f"LLM: {is_feedback}"))
1847
+ error_message = is_feedback.split("PREVIOUS SCRIPT EXCEPTION:\n")[1].strip()
1848
+ # Generate a solution for the error and execute it
1849
+ error_solution_query = (
1850
+ f"The following code was executed and resulted in an error:\n\n"
1851
+ f"{response}\n\n"
1852
+ f"Error: {error_message}\n\n"
1853
+ f"Please provide a solution to fix this error in the code and execute it."
1854
+ )
1855
+ try:
1856
+ new_response = self._ai_model.chat(error_solution_query)
1857
+ self._handle_rawdog_response(new_response)
1858
+ except webscout.exceptions.FailedToGenerateResponseError as e:
1859
+ self._console.print(Markdown(f"LLM: [red]Error while generating solution: {e}[/red]"))
1860
+ else:
1861
+ self._console.print(Markdown("LLM: (Script executed successfully)"))
1764
1862
  except Exception as e:
1765
1863
  self._console.print(Markdown(f"LLM: [red]Error: {e}[/red]"))
1766
- return
1767
- if is_feedback:
1768
- self._console.print(Markdown(f"LLM: {is_feedback}"))
1769
- else:
1770
- self._console.print(Markdown("LLM: (Script executed successfully)"))
1864
+
1771
1865
 
1772
1866
  async def process_async_query(self, query: str) -> None:
1773
1867
  """
@@ -1,9 +1,9 @@
1
1
  webscout/AIauto.py,sha256=xPGr_Z0h27XXNh4Wiufjn9TksDOqxqlaGcLUYKNP55w,18246
2
2
  webscout/AIbase.py,sha256=GoHbN8r0gq2saYRZv6LA-Fr9Jlcjv80STKFXUq2ZeGU,4710
3
- webscout/AIutel.py,sha256=0SquAHyAa9zqEfcBdfnplM8hCuQ_7a8CyxK6b83_n5k,33471
3
+ webscout/AIutel.py,sha256=MMfUvTQXYDtaFXsXtwKgv9V_qMK6WgOxdx7Wagdm2Lw,33542
4
4
  webscout/DWEBS.py,sha256=QLuT1IKu0lnwdl7W6c-ctBAO7Jj0Zk3PYm6-13BC7rU,25740
5
5
  webscout/LLM.py,sha256=LbGCZdJf8A5dwfoGS4tyy39tAh5BDdhMZP0ScKaaQfU,4184
6
- webscout/__init__.py,sha256=QX-26QQFOsL_JhUT4bGR7H7JGI58ClFcg4dF6XnlJUQ,1847
6
+ webscout/__init__.py,sha256=ugx2Z3KX710527ri6AWPRwme9HjuiQezAnwyltqzr4c,2038
7
7
  webscout/__main__.py,sha256=ZtTRgsRjUi2JOvYFLF1ZCh55Sdoz94I-BS-TlJC7WDU,126
8
8
  webscout/async_providers.py,sha256=holBv5SxanxVXc_92CBBaXHlB2IakB_fHnhyZaFjYF8,684
9
9
  webscout/cli.py,sha256=enw_dPTCG3sNC1TXt96XccnpRmF4Etr99nh-RbGYags,18784
@@ -18,12 +18,12 @@ webscout/voice.py,sha256=0QjXTHAQmCK07IDZXRc7JXem47cnPJH7u3X0sVP1-UQ,967
18
18
  webscout/webai.py,sha256=qkvhYdyF5wNdmW4rNdH3RbfQxabEWlGvCyAk2SbH04k,86602
19
19
  webscout/webscout_search.py,sha256=lFAot1-Qil_YfXieeLakDVDEX8Ckcima4ueXdOYwiMc,42804
20
20
  webscout/webscout_search_async.py,sha256=dooKGwLm0cwTml55Vy6NHPPY-nymEqX2h8laX94Zg5A,14537
21
- webscout/websx_search.py,sha256=Nz4FfdSiXHaWoUGIUH1x1FzYlm8Ns736MMXM3EKm9_Y,11724
21
+ webscout/websx_search.py,sha256=n-qVwiHozJEF-GFRPcAfh4k1d_tscTmDe1dNL-1ngcU,12094
22
22
  webscout/Local/__init__.py,sha256=RN6klpbabPGNX2YzPm_hdeUcQvieUwvJt22uAO2RKSM,238
23
23
  webscout/Local/_version.py,sha256=hC_EHWR519ZOsyRw9i6gXEfU5IAIR_B9d3THLVmkWXw,83
24
24
  webscout/Local/formats.py,sha256=BiZZSoN3e8S6-S-ykBL9ogSUs0vK11GaZ3ghc9U8GRk,18994
25
25
  webscout/Local/model.py,sha256=T_bzNNrxEyOyLyhp6fKwiuVBBkXC2a37LzJVCxFIxOU,30710
26
- webscout/Local/rawdog.py,sha256=LtA7bck2HyvWmovuaG86Iiquiz7XiMcxBlebo9IuGBY,35744
26
+ webscout/Local/rawdog.py,sha256=ojY_O8Vb1KvR34OwWdfLgllgaAK_7HMf64ElMATvCXs,36689
27
27
  webscout/Local/samplers.py,sha256=qXwU4eLXER-2aCYzcJcTgA6BeFmi5GMpTDUX1C9pTN4,4372
28
28
  webscout/Local/thread.py,sha256=Lyf_N2CaGAn2usSWSiUXLPAgpWub8vUu_tgFgtnvZVA,27408
29
29
  webscout/Local/utils.py,sha256=CSt9IqHhVGk_nJEnKvSFbLhC5nNf01e0MtwpgMmF9pA,6197
@@ -32,27 +32,28 @@ webscout/Provider/Berlin4h.py,sha256=zMpmWmdFCbcE3UWB-F9xbbTWZTfx4GnjnRf6sDoaiC0
32
32
  webscout/Provider/Blackboxai.py,sha256=HUk0moEGsgGvidD1LF9tbfaKdx7bPnGU_SrYPdcfHU8,17182
33
33
  webscout/Provider/ChatGPTUK.py,sha256=qmuCb_a71GNE5LelOb5AKJUBndvj7soebiNey4VdDvE,8570
34
34
  webscout/Provider/Cohere.py,sha256=IXnRosYOaMAA65nvsKmN6ZkJGSdZFYQYBidzuNaCqX8,8711
35
- webscout/Provider/Deepinfra.py,sha256=13H1h4FCon3GzjV9vCrLH_v9NcWHV6nl6i6NgnpXPGQ,18272
36
- webscout/Provider/Deepseek.py,sha256=HKsC-ePLSPqcrQbafy-IzR0BNqId3LfiIEhk9j9oTs4,10285
35
+ webscout/Provider/Deepinfra.py,sha256=kVnWARJdEtIeIsZwGw3POq8B2dO87bDcJso3uOeCeOA,18750
36
+ webscout/Provider/Deepseek.py,sha256=pnOB44ObuOfAsoi_bUGUvha3tfwd0rTJ9rnX-14QkL4,10550
37
37
  webscout/Provider/Gemini.py,sha256=_4DHWvlWuNAmVHPwHB1RjmryjTZZCthLa6lvPEHLvkQ,8451
38
38
  webscout/Provider/Groq.py,sha256=QfgP3hKUcqq5vUA4Pzuu3HAgpJkKwLWNjjsnxtkCYd8,21094
39
39
  webscout/Provider/Koboldai.py,sha256=KwWx2yPlvT9BGx37iNvSbgzWkJ9I8kSOmeg7sL1hb0M,15806
40
40
  webscout/Provider/Leo.py,sha256=wbuDR-vFjLptfRC6yDlk74tINqNvCOzpISsK92lIgGg,19987
41
41
  webscout/Provider/Llama2.py,sha256=gVMotyiBaDSqliwuDtFefHoOBn9V5m5Ze_YVtV0trt8,17525
42
- webscout/Provider/OpenGPT.py,sha256=SJskNkUGNNb3zdZY50xokzW-rwcSlHw8EN6WVv70dg8,18890
42
+ webscout/Provider/OpenGPT.py,sha256=ZymwLgNJSPlGZHW3msMlnRR7NxmALqJw9yuToqrRrhw,35515
43
43
  webscout/Provider/Openai.py,sha256=SjfVOwY94unVnXhvN0Fkome-q2-wi4mPJk_vCGq5Fjc,20617
44
44
  webscout/Provider/Perplexity.py,sha256=CPdKqkdlVejXDcf1uycNO4LPCVNUADSCetvyJEGepSw,8826
45
- webscout/Provider/Phind.py,sha256=NXiYNRs8h_6c3AGOUqFrvN01odBIQ_psSUBPaHiAUoE,19907
45
+ webscout/Provider/Phind.py,sha256=bkgKVtggRJSbJAG1tXviW9BqDvcgqPBlSr88Q6rlFHw,39226
46
46
  webscout/Provider/Poe.py,sha256=ObUxa-Fa2Dq7sJcV0hc65m09StS9uWsB2-bR2rSjXDY,7510
47
47
  webscout/Provider/Reka.py,sha256=F0ZXENkhARprj5biK3mRxwiuPH0BW3ga7EWsi8agbtE,8917
48
48
  webscout/Provider/ThinkAnyAI.py,sha256=_qFjj0djxxrranyEY33w14oizyRjzlVwMv_hzvVtwNc,11616
49
+ webscout/Provider/VTLchat.py,sha256=_sErGr-wOi16ZAfiGOo0bPsAEMkjzzwreEsIqjIZMIU,10041
49
50
  webscout/Provider/Xjai.py,sha256=BIlk2ouz9Kh_0Gg9hPvTqhI7XtcmWdg5vHSX_4uGrIs,9039
50
51
  webscout/Provider/Yepchat.py,sha256=2Eit-A7w1ph1GQKNQuur_yaDzI64r0yBGxCIjDefJxQ,19875
51
52
  webscout/Provider/Youchat.py,sha256=UVGBuGSjv4uRibn1xflmCjYcfrRTKnDvX3adhag6T98,7976
52
- webscout/Provider/__init__.py,sha256=j132gtLgDqUJl9GNNgO4k9GUmKdlYUG0dn4AjpS8fZA,1616
53
- webscout-3.5.dist-info/LICENSE.md,sha256=9P0imsudI7MEvZe2pOcg8rKBn6E5FGHQ-riYozZI-Bk,2942
54
- webscout-3.5.dist-info/METADATA,sha256=I_dj9LHVC_6WMkg0V4K2ilywFffLPElOdLTwgfI1dIQ,63504
55
- webscout-3.5.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
56
- webscout-3.5.dist-info/entry_points.txt,sha256=Hh4YIIjvkqB9SVxZ2ri4DZUkgEu_WF_5_r_nZDIvfG8,73
57
- webscout-3.5.dist-info/top_level.txt,sha256=nYIw7OKBQDr_Z33IzZUKidRD3zQEo8jOJYkMVMeN334,9
58
- webscout-3.5.dist-info/RECORD,,
53
+ webscout/Provider/__init__.py,sha256=RaMdtYv7eQJ2vB8jXUHrkfNbx2DgRjbwc6DI40cOH1A,1809
54
+ webscout-3.6.dist-info/LICENSE.md,sha256=9P0imsudI7MEvZe2pOcg8rKBn6E5FGHQ-riYozZI-Bk,2942
55
+ webscout-3.6.dist-info/METADATA,sha256=YhKU0lcCGrDmUA-L1wy7ETzzmkWmbY5MvEfZg_6GlcU,67341
56
+ webscout-3.6.dist-info/WHEEL,sha256=cpQTJ5IWu9CdaPViMhC9YzF8gZuS5-vlfoFihTBC86A,91
57
+ webscout-3.6.dist-info/entry_points.txt,sha256=Hh4YIIjvkqB9SVxZ2ri4DZUkgEu_WF_5_r_nZDIvfG8,73
58
+ webscout-3.6.dist-info/top_level.txt,sha256=nYIw7OKBQDr_Z33IzZUKidRD3zQEo8jOJYkMVMeN334,9
59
+ webscout-3.6.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.42.0)
2
+ Generator: setuptools (70.1.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5