This commit is contained in:
xyj 2024-01-13 11:38:45 +08:00
parent 4e2c7777f7
commit 656f97c0be
3 changed files with 3 additions and 3 deletions

View File

@ -2,7 +2,7 @@
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="jdk" jdkName="chatchat" jdkType="Python SDK" />
<orderEntry type="jdk" jdkName="agri_chatglm3" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="PyDocumentationSettings">

View File

@ -3,5 +3,5 @@
<component name="Black">
<option name="sdkName" value="chatchat" />
</component>
<component name="ProjectRootManager" version="2" project-jdk-name="chatchat" project-jdk-type="Python SDK" />
<component name="ProjectRootManager" version="2" project-jdk-name="agri_chatglm3" project-jdk-type="Python SDK" />
</project>

View File

@ -23,7 +23,7 @@ class MQTTClient:
self.username = username
self.password = password
# 千万不要指定client_id 不然死翘翘
self.client = mqtt.Client()
self.client = mqtt.Client(client_id="测试")
self.client.username_pw_set(self.username, self.password)
self.client.on_connect = self.on_connect
self.client.on_message = self.on_message