Skip to content

Commit

Permalink
feat: support mj client config
Browse files Browse the repository at this point in the history
  • Loading branch information
zhayujie committed May 7, 2024
1 parent fb72b60 commit 71a11b4
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion common/linkai_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def on_config(self, config: dict):
elif reply_voice_mode == "always_reply_voice":
local_config["always_reply_voice"] = True

if config.get("admin_password") and plugin_config["Godcmd"]:
if config.get("admin_password") and plugin_config.get("Godcmd"):
plugin_config["Godcmd"]["password"] = config.get("admin_password")
PluginManager().instances["GODCMD"].reload()

Expand All @@ -56,6 +56,11 @@ def on_config(self, config: dict):
pconf("linkai")["group_app_map"] = local_group_map
PluginManager().instances["LINKAI"].reload()

if config.get("text_to_image") and config.get("text_to_image") == "midjourney" and pconf("linkai"):
if pconf("linkai")["midjourney"]:
pconf("linkai")["midjourney"]["enabled"] = True
pconf("linkai")["midjourney"]["use_image_create_prefix"] = True


def start(channel):
global chat_client
Expand Down
2 changes: 1 addition & 1 deletion config-template.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"voice_reply_voice": false,
"conversation_max_tokens": 2500,
"expires_in_seconds": 3600,
"character_desc": "你是ChatGPT, 一个由OpenAI训练的大型语言模型, 你旨在回答并解决人们的任何问题,并且可以使用多种语言与人交流。",
"character_desc": "你是基于大语言模型的AI智能助手,旨在回答并解决人们的任何问题,并且可以使用多种语言与人交流。",
"temperature": 0.7,
"subscribe_msg": "感谢您的关注!\n这里是AI智能助手,可以自由对话。\n支持语音对话。\n支持图片输入。\n支持图片输出,画字开头的消息将按要求创作图片。\n支持tool、角色扮演和文字冒险等丰富的插件。\n输入{trigger_prefix}#help 查看详细指令。",
"use_linkai": false,
Expand Down
Binary file removed docs/images/aigcopen.png
Binary file not shown.
Binary file removed docs/images/group-chat-sample.jpg
Binary file not shown.
Binary file removed docs/images/image-create-sample.jpg
Binary file not shown.
Binary file removed docs/images/planet.jpg
Binary file not shown.
Binary file removed docs/images/single-chat-sample.jpg
Binary file not shown.

0 comments on commit 71a11b4

Please sign in to comment.