mirror of
https://github.com/langbot-app/LangBot.git
synced 2025-11-25 19:37:36 +08:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e5cffb7c9b | ||
|
|
e2becf7777 | ||
|
|
a6b875a242 | ||
|
|
b5e67f3df8 | ||
|
|
2093fb16a7 | ||
|
|
fc9a9d2386 | ||
|
|
5e69f78f7e |
@@ -14,7 +14,7 @@
|
||||

|
||||

|
||||
<br/>
|
||||
<img src="https://img.shields.io/badge/python-3.9 | 3.10 | 3.11-blue.svg" alt="python">
|
||||
<img src="https://img.shields.io/badge/python-3.10 | 3.11 | 3.12-blue.svg" alt="python">
|
||||
<a href="http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=66-aWvn8cbP4c1ut_1YYkvvGVeEtyTH8&authKey=pTaKBK5C%2B8dFzQ4XlENf6MHTCLaHnlKcCRx7c14EeVVlpX2nRSaS8lJm8YeM4mCU&noverify=0&group_code=195992197">
|
||||
<img alt="Static Badge" src="https://img.shields.io/badge/%E5%AE%98%E6%96%B9%E7%BE%A4-195992197-purple">
|
||||
</a>
|
||||
|
||||
13
main.py
13
main.py
@@ -51,17 +51,6 @@ async def main_entry():
|
||||
|
||||
if __name__ == '__main__':
|
||||
import os
|
||||
import psutil
|
||||
|
||||
if os.name == 'nt':
|
||||
allowed_parent_process = ['cmd.exe', 'powershell.exe', 'wsl.exe']
|
||||
|
||||
parent_process = psutil.Process(os.getppid()).name()
|
||||
|
||||
if parent_process not in allowed_parent_process:
|
||||
print("请在命令行中运行此程序。")
|
||||
input("按任意键退出...")
|
||||
exit(0)
|
||||
|
||||
# 检查本目录是否有main.py,且包含QChatGPT字符串
|
||||
invalid_pwd = False
|
||||
@@ -74,7 +63,7 @@ if __name__ == '__main__':
|
||||
if "QChatGPT/main.py" not in content:
|
||||
invalid_pwd = True
|
||||
if invalid_pwd:
|
||||
print("请在QChatGPT项目根目录下运行此程序。")
|
||||
print("请在QChatGPT项目根目录下以命令形式运行此程序。")
|
||||
input("按任意键退出...")
|
||||
exit(0)
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ required_deps = {
|
||||
"tiktoken": "tiktoken",
|
||||
"yaml": "pyyaml",
|
||||
"aiohttp": "aiohttp",
|
||||
"psutil": "psutil",
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -82,8 +82,8 @@ class PlatformManager:
|
||||
|
||||
event_ctx = await self.ap.plugin_mgr.emit_event(
|
||||
event=events.GroupMessageReceived(
|
||||
launcher_type='person',
|
||||
launcher_id=event.sender.id,
|
||||
launcher_type='group',
|
||||
launcher_id=event.group.id,
|
||||
sender_id=event.sender.id,
|
||||
message_chain=event.message_chain,
|
||||
query=None
|
||||
|
||||
@@ -35,7 +35,7 @@ class ToolManager:
|
||||
for plugin in self.ap.plugin_mgr.plugins:
|
||||
for function in plugin.content_functions:
|
||||
if function.name == name:
|
||||
return function, plugin
|
||||
return function, plugin.plugin_inst
|
||||
return None, None
|
||||
|
||||
async def get_all_functions(self) -> list[entities.LLMFunction]:
|
||||
|
||||
@@ -1 +1 @@
|
||||
semantic_version = "v3.1.0.2"
|
||||
semantic_version = "v3.1.0.4"
|
||||
|
||||
@@ -12,4 +12,5 @@ PyYaml
|
||||
aiohttp
|
||||
pydantic
|
||||
websockets
|
||||
urllib3
|
||||
urllib3
|
||||
psutil
|
||||
Reference in New Issue
Block a user