webscout 1.0.7__py3-none-any.whl → 1.0.8__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/AI.py CHANGED
@@ -14,6 +14,7 @@ from re import findall
14
14
  from requests.exceptions import RequestException
15
15
  from curl_cffi.requests import get, RequestsError
16
16
  import g4f
17
+ #------------------------------------------------------phind--------------------------------------------------------
17
18
  class PhindSearch:
18
19
  def __init__(self, query):
19
20
  self.query = query
@@ -52,7 +53,7 @@ class PhindSearch:
52
53
  """Use webscout.AI."""
53
54
  search_instance = PhindSearch(query)
54
55
  search_instance.search()
55
-
56
+ #------------------------------------------------------yep.com--------------------------------------------------------
56
57
  class YepChat:
57
58
  def __init__(self, message="hello"):
58
59
  self.url = "https://api.yep.com/v1/chat/completions"
@@ -97,11 +98,9 @@ class YepChat:
97
98
  try:
98
99
  myval = eval(myline)
99
100
  if "choices" in myval and "delta" in myval["choices"][0] and "content" in myval["choices"][0]["delta"]:
100
- print(myval["choices"][0]["delta"]["content"], flush=True, end="")
101
101
  myset += myval["choices"][0]["delta"]["content"]
102
102
  except:
103
103
  continue
104
- print(myset)
105
104
  return myset
106
105
 
107
106
  @staticmethod
@@ -109,8 +108,9 @@ class YepChat:
109
108
  """Sends a request to the Yep API and processes the response."""
110
109
  yep_chat = YepChat(message=message)
111
110
  response = yep_chat.send_request()
112
- yep_chat.process_response(response)
113
-
111
+ processed_response = yep_chat.process_response(response)
112
+ print(processed_response)
113
+ #------------------------------------------------------youchat--------------------------------------------------------
114
114
  class youChat:
115
115
  """
116
116
  This class provides methods for generating completions based on prompts.
@@ -169,23 +169,15 @@ class youChat:
169
169
  you_chat = youChat()
170
170
  completion = you_chat.create(prompt)
171
171
  print(completion)
172
-
172
+ #------------------------------------------------------Gemini--------------------------------------------------------
173
173
  class Gemini:
174
174
  def __init__(self):
175
- self.messages = [
176
- {
177
- "role": "system",
178
- "content": "You are a helpful assistant.",
179
- }
180
- ]
175
+ self.messages = []
181
176
 
182
177
  def chat(self, *args):
183
178
  assert args != ()
184
179
 
185
- message = ""
186
- for i in args:
187
- message += i
188
-
180
+ message = " ".join(args)
189
181
  self.messages.append({"role": "user", "content": message})
190
182
 
191
183
  response = g4f.ChatCompletion.create(
@@ -197,10 +189,10 @@ class Gemini:
197
189
  ms = ""
198
190
  for message in response:
199
191
  ms += message
200
- print(message, end="", flush=True)
192
+ print(ms.strip(), end="", flush=True) # Ensure no trailing whitespace is printed
201
193
  print()
202
- self.messages.append({"role": "assistant", "content": ms})
203
- return ms
194
+ self.messages.append({"role": "assistant", "content": ms.strip()}) # Strip whitespace from the message content
195
+ return ms.strip() # Return the message without trailing whitespace
204
196
 
205
197
  @staticmethod
206
198
  def chat_cli(message):
webscout/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "1.0.7"
1
+ __version__ = "1.0.8"
@@ -1,8 +1,8 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: webscout
3
- Version: 1.0.7
3
+ Version: 1.0.8
4
4
  Summary: Search for words, documents, images, videos, news, maps and text translation using the DuckDuckGo.com, yep.com, phind.com and you.com Also containes AI models
5
- Author: OEvortex, Zaid
5
+ Author: OEvortex
6
6
  Author-email: helpingai5@gmail.com
7
7
  License: HelpingAI Simplified Universal License
8
8
  Project-URL: Documentation, https://github.com/OE-LUCIFER/Webscout/wiki
@@ -386,8 +386,20 @@ WEBSAI.search()
386
386
  Thanks To Divyansh Shukla for This code
387
387
  ```python
388
388
  from webscout.AI import YepChat
389
- # Example usage of the chat_cli method
390
- YepChat.chat_cli("Hello, how can I help you today?")
389
+
390
+ def main():
391
+ # Initialize the YepChat class with your message
392
+ yep_chat = YepChat(message="who is pm of india")
393
+
394
+ # Send the request and process the response
395
+ response = yep_chat.send_request()
396
+ processed_response = yep_chat.process_response(response)
397
+
398
+ # Print the processed response
399
+ print(processed_response)
400
+
401
+ if __name__ == "__main__":
402
+ main()
391
403
  ```
392
404
 
393
405
  ### 11. `You.com` - search with you.com
@@ -1,16 +1,16 @@
1
- webscout/AI.py,sha256=bymYzd_hGwl3ByX915r_bhnOdj8hrc6rErkx_d3EXBM,7823
1
+ webscout/AI.py,sha256=ylXDsAkdHdcQ-EAKpKlmV_q_x-L8o1q5DAhpnA7VRxs,8229
2
2
  webscout/__init__.py,sha256=vHJGZexYIaWDTHfMimqA7enct9b7zPDf6jLsS7NDBiA,536
3
3
  webscout/__main__.py,sha256=ZtTRgsRjUi2JOvYFLF1ZCh55Sdoz94I-BS-TlJC7WDU,126
4
4
  webscout/cli.py,sha256=9opO5KynQ3LA5gPW2czlmy7-ZdfUae6ccrny3vibqzQ,17757
5
5
  webscout/exceptions.py,sha256=7u52Mt5iyEUCZvaZuEYwQVV8HL8IdZBv1r5s5Ss_xU0,75
6
6
  webscout/models.py,sha256=5iQIdtedT18YuTZ3npoG7kLMwcrKwhQ7928dl_7qZW0,692
7
7
  webscout/utils.py,sha256=M2ocDpYOVd9lTZA3VGdK_p80Xsr-VPeAoUUCFaMWCqk,1610
8
- webscout/version.py,sha256=xYbb67T0bE-s3OjgVTmJzJVvjxFP4YEjxAaBB2nj3zA,23
8
+ webscout/version.py,sha256=uyL3a6o1xccXPZ2OS65zqIN_lbEMT7PcCxErq7cuWwA,23
9
9
  webscout/webscout_search.py,sha256=_kuNpRhbgge6MubxlsRe9kzBKlHoPEH6-93ILMpycfg,2351
10
10
  webscout/webscout_search_async.py,sha256=lNdR18-y8O9HqFsHvlzBYg18qeI12uLEXIzFMP3D_XU,35070
11
- webscout-1.0.7.dist-info/LICENSE.md,sha256=mRVwJuT4SXC5O93BFdsfWBjlXjGn2Np90Zm5SocUzM0,3150
12
- webscout-1.0.7.dist-info/METADATA,sha256=zN3a33AwuXkRx-q_D_lNiTXVt71QEI85SlQ6DZBHV3I,13205
13
- webscout-1.0.7.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
14
- webscout-1.0.7.dist-info/entry_points.txt,sha256=1naMz1lm0onX0Rn0RRBeGaQJIUKT8V6KASIcGJJHz0M,164
15
- webscout-1.0.7.dist-info/top_level.txt,sha256=nYIw7OKBQDr_Z33IzZUKidRD3zQEo8jOJYkMVMeN334,9
16
- webscout-1.0.7.dist-info/RECORD,,
11
+ webscout-1.0.8.dist-info/LICENSE.md,sha256=mRVwJuT4SXC5O93BFdsfWBjlXjGn2Np90Zm5SocUzM0,3150
12
+ webscout-1.0.8.dist-info/METADATA,sha256=en6z_z4hNpmjlCmTgLGMo-wtnZTotgpFtyDMZFHQsT8,13500
13
+ webscout-1.0.8.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
14
+ webscout-1.0.8.dist-info/entry_points.txt,sha256=1naMz1lm0onX0Rn0RRBeGaQJIUKT8V6KASIcGJJHz0M,164
15
+ webscout-1.0.8.dist-info/top_level.txt,sha256=nYIw7OKBQDr_Z33IzZUKidRD3zQEo8jOJYkMVMeN334,9
16
+ webscout-1.0.8.dist-info/RECORD,,