From fe2ab69773700b52155acff1a90b47572628d09d Mon Sep 17 00:00:00 2001 From: Soulter <905617992@qq.com> Date: Tue, 19 Dec 2023 18:44:26 +0800 Subject: [PATCH 1/3] =?UTF-8?q?feat:=20bing=E7=BD=91=E9=A1=B5=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E5=A4=B1=E8=B4=A5=E4=B9=8B=E5=90=8E=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E6=90=9C=E7=8B=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- util/gplugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/gplugin.py b/util/gplugin.py index 5795179ff..5be2e402c 100644 --- a/util/gplugin.py +++ b/util/gplugin.py @@ -125,7 +125,7 @@ def web_keyword_search_via_bing(keyword) -> str: time.sleep(1) gu.log("fail to fetch bing info, using sougou.") - return google_web_search(keyword) + return web_keyword_search_via_sougou(keyword) def web_keyword_search_via_sougou(keyword) -> str: headers = { From c5c7e686d0ee1f84a88be61e274f0047500db470 Mon Sep 17 00:00:00 2001 From: Soulter <905617992@qq.com> Date: Wed, 20 Dec 2023 16:14:42 +0800 Subject: [PATCH 2/3] =?UTF-8?q?feat:=20ip=20=E4=BF=A1=E6=81=AF=E6=8C=87?= =?UTF-8?q?=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- model/command/command.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/model/command/command.py b/model/command/command.py index 907bf58f3..8e2df5016 100644 --- a/model/command/command.py +++ b/model/command/command.py @@ -81,6 +81,10 @@ class Command: return True, self.web_search(message) if self.command_start_with(message, "keyword"): return True, self.keyword(message_obj, role) + if self.command_start_with(message, "ip"): + ip = requests.get("https://myip.ipip.net", timeout=5).text + return True, f"机器人 IP 信息:{ip}", "ip" + return False, None From 8ace7b59e3c1181c41bbea408a39f3130781439c Mon Sep 17 00:00:00 2001 From: Soulter <37870767+Soulter@users.noreply.github.com> Date: Sat, 23 Dec 2023 00:21:35 +0800 Subject: [PATCH 3/3] Update requirements.txt --- requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 1ba3529bb..376d16d4f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ pydantic~=1.10.4 requests~=2.28.1 openai~=1.2.3 -qq-botpy +qq-botpy==1.1.2 chardet~=5.1.0 Pillow~=9.4.0 GitPython~=3.1.31 @@ -12,4 +12,4 @@ tiktoken readability-lxml revChatGPT~=6.8.6 baidu-aip~=4.16.9 -websockets \ No newline at end of file +websockets