去除行尾空格

This commit is contained in:
zyckk4
2023-04-02 14:43:34 +08:00
parent aba9d945b5
commit 70386abadd
4 changed files with 11 additions and 11 deletions
+2 -2
View File
@@ -48,8 +48,8 @@ class OpenAIInteract:
# 根据模型选择使用的接口
ai: ModelRequest = create_openai_model_request(
config.completion_api_params['model'],
'user',
config.completion_api_params['model'],
'user',
config.openai_config["http_proxy"] if "http_proxy" in config.openai_config else None
)
ai.request(
+1 -1
View File
@@ -32,7 +32,7 @@ def process_command(session_name: str, text_message: str, mgr, config,
params = text_message[1:].strip().split(' ')[1:]
# 把!~开头的转换成!cfg
# 把!~开头的转换成!cfg
if cmd.startswith('~'):
params = [cmd[1:]] + params
cmd = 'cfg'
+2 -2
View File
@@ -50,8 +50,8 @@ class ReplyFilter:
# 百度云审核URL
baidu_url = "https://aip.baidubce.com/rest/2.0/solution/v1/text_censor/v2/user_defined?access_token=" + \
str(requests.post("https://aip.baidubce.com/oauth/2.0/token",
params={"grant_type": "client_credentials",
str(requests.post("https://aip.baidubce.com/oauth/2.0/token",
params={"grant_type": "client_credentials",
"client_id": self.baidu_api_key,
"client_secret": self.baidu_secret_key}).json().get("access_token"))