KingNish commited on
Commit
c4675e4
·
verified ·
1 Parent(s): ff0f0fc

Update webscout.py

Browse files
Files changed (1) hide show
  1. webscout.py +1 -3
webscout.py CHANGED
@@ -226,7 +226,7 @@ class WEBS:
226
  resp_content = self._get_url("POST", "https://duckduckgo.com", data={"q": keywords})
227
  return _extract_vqd(resp_content, keywords)
228
 
229
- def chat(self, keywords: str, model: str = "gpt-3.5", chat_messages: List[Dict[str, str]] = [], timeout: int = 20) -> str:
230
  """Initiates a chat session with DuckDuckGo AI.
231
 
232
  Args:
@@ -250,8 +250,6 @@ class WEBS:
250
  resp = self.client.get("https://duckduckgo.com/duckchat/v1/status", headers={"x-vqd-accept": "1"})
251
  self._chat_vqd = resp.headers.get("x-vqd-4", "")
252
 
253
- chat_messages.append({"role": "user", "content": keywords})
254
-
255
  json_data = {
256
  "model": models[model],
257
  "messages": chat_messages,
 
226
  resp_content = self._get_url("POST", "https://duckduckgo.com", data={"q": keywords})
227
  return _extract_vqd(resp_content, keywords)
228
 
229
+ def chat(self, chat_messages: List[Dict[str, str]] = [],, model: str = "gpt-3.5", timeout: int = 20) -> str:
230
  """Initiates a chat session with DuckDuckGo AI.
231
 
232
  Args:
 
250
  resp = self.client.get("https://duckduckgo.com/duckchat/v1/status", headers={"x-vqd-accept": "1"})
251
  self._chat_vqd = resp.headers.get("x-vqd-4", "")
252
 
 
 
253
  json_data = {
254
  "model": models[model],
255
  "messages": chat_messages,