Browse Source

feat: support mj client config

master
zhayujie 4 months ago
parent
commit
71a11b4267
7 changed files with 7 additions and 2 deletions
  1. +6
    -1
      common/linkai_client.py
  2. +1
    -1
      config-template.json
  3. BIN
      docs/images/aigcopen.png
  4. BIN
      docs/images/group-chat-sample.jpg
  5. BIN
      docs/images/image-create-sample.jpg
  6. BIN
      docs/images/planet.jpg
  7. BIN
      docs/images/single-chat-sample.jpg

+ 6
- 1
common/linkai_client.py View File

@@ -45,7 +45,7 @@ class ChatClient(LinkAIClient):
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()

@@ -56,6 +56,11 @@ class ChatClient(LinkAIClient):
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


+ 1
- 1
config-template.json View File

@@ -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,


BIN
docs/images/aigcopen.png View File

Before After
Width: 800  |  Height: 800  |  Size: 51KB

BIN
docs/images/group-chat-sample.jpg View File

Before After
Width: 1652  |  Height: 1288  |  Size: 326KB

BIN
docs/images/image-create-sample.jpg View File

Before After
Width: 800  |  Height: 525  |  Size: 382KB

BIN
docs/images/planet.jpg View File

Before After
Width: 963  |  Height: 493  |  Size: 33KB

BIN
docs/images/single-chat-sample.jpg View File

Before After
Width: 1750  |  Height: 1114  |  Size: 180KB

Loading…
Cancel
Save