here is my code:
_bot_username = os.environ.get('ROCKET_USERNAME')
password = os.environ.get('ROCKET_PASSWORD')
server_url = os.environ.get('ROCKET_SERVER_URL')
proxy_dict = None
rocket = RocketChat(bot_username, password, server_url=server_url, proxies=proxy_dict)
rocket.chat_postmessage(response, channel='GENERAL')
and here is error:
_Traceback (most recent call last):
File "/data/lijiaxiang/codes/chatGLM-6B-QLoRA/mychat/myscript.py", line 105, in
rocket.chat_post_message(response, channel='GENERAL')
File "/data/lijiaxiang/anaconda3/lib/python3.11/site-packages/rocketchat_API/APISections/chat.py", line 16, in chat_post_message
return self.call_api_post(
^^^^^^^^^^^^^^^^^^^
File "/data/lijiaxiang/anaconda3/lib/python3.11/site-packages/rocketchat_API/APISections/base.py", line 97, in call_api_post
self.server_url + self.API_path + method,
Is it my misusing this API?
The response include some '\n', dose it matter?
here is my code: _bot_username = os.environ.get('ROCKET_USERNAME') password = os.environ.get('ROCKET_PASSWORD') server_url = os.environ.get('ROCKET_SERVER_URL') proxy_dict = None rocket = RocketChat(bot_username, password, server_url=server_url, proxies=proxy_dict) rocket.chat_postmessage(response, channel='GENERAL')
and here is error: _Traceback (most recent call last): File "/data/lijiaxiang/codes/chatGLM-6B-QLoRA/mychat/myscript.py", line 105, in
rocket.chat_post_message(response, channel='GENERAL')
File "/data/lijiaxiang/anaconda3/lib/python3.11/site-packages/rocketchat_API/APISections/chat.py", line 16, in chat_post_message
return self.call_api_post(
^^^^^^^^^^^^^^^^^^^
File "/data/lijiaxiang/anaconda3/lib/python3.11/site-packages/rocketchat_API/APISections/base.py", line 97, in call_api_post
self.server_url + self.API_path + method,