mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-06-02 00:57:41 +08:00
Merge branch 'master' of github.com:zhayujie/chatgpt-on-wechat
This commit is contained in:
@@ -73,7 +73,7 @@ class Channel(object):
|
|||||||
Build reply content, using agent if enabled in config
|
Build reply content, using agent if enabled in config
|
||||||
"""
|
"""
|
||||||
# Check if agent mode is enabled
|
# Check if agent mode is enabled
|
||||||
use_agent = conf().get("agent", False)
|
use_agent = conf().get("agent", True)
|
||||||
|
|
||||||
if use_agent:
|
if use_agent:
|
||||||
try:
|
try:
|
||||||
|
|||||||
@@ -1108,7 +1108,7 @@ class ConfigHandler:
|
|||||||
web.header('Content-Type', 'application/json; charset=utf-8')
|
web.header('Content-Type', 'application/json; charset=utf-8')
|
||||||
try:
|
try:
|
||||||
local_config = conf()
|
local_config = conf()
|
||||||
use_agent = local_config.get("agent", False)
|
use_agent = local_config.get("agent", True)
|
||||||
title = "CowAgent" if use_agent else "AI Assistant"
|
title = "CowAgent" if use_agent else "AI Assistant"
|
||||||
|
|
||||||
api_bases = {}
|
api_bases = {}
|
||||||
|
|||||||
@@ -269,7 +269,7 @@ def status():
|
|||||||
channel = ", ".join(channel)
|
channel = ", ".join(channel)
|
||||||
click.echo(f" 通道: {channel}")
|
click.echo(f" 通道: {channel}")
|
||||||
click.echo(f" 模型: {cfg.get('model', 'unknown')}")
|
click.echo(f" 模型: {cfg.get('model', 'unknown')}")
|
||||||
mode = "Agent" if cfg.get("agent") else "Chat"
|
mode = "Chat" if cfg.get("agent") is False else "Agent"
|
||||||
click.echo(f" 模式: {mode}")
|
click.echo(f" 模式: {mode}")
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -366,7 +366,7 @@ def load_config():
|
|||||||
logger.info("[INIT] Model: {}".format(config.get("model", "unknown")))
|
logger.info("[INIT] Model: {}".format(config.get("model", "unknown")))
|
||||||
|
|
||||||
# Agent模式信息
|
# Agent模式信息
|
||||||
if config.get("agent", False):
|
if config.get("agent", True):
|
||||||
workspace = config.get("agent_workspace", "~/cow")
|
workspace = config.get("agent_workspace", "~/cow")
|
||||||
logger.info("[INIT] Mode: Agent (workspace: {})".format(workspace))
|
logger.info("[INIT] Mode: Agent (workspace: {})".format(workspace))
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -271,7 +271,7 @@ class CowCliPlugin(Plugin):
|
|||||||
model_name = cfg.get("model", "unknown")
|
model_name = cfg.get("model", "unknown")
|
||||||
lines.append(f" 模型: {model_name}")
|
lines.append(f" 模型: {model_name}")
|
||||||
|
|
||||||
mode = "Agent" if cfg.get("agent") else "Chat"
|
mode = "Chat" if cfg.get("agent") is False else "Agent"
|
||||||
lines.append(f" 模式: {mode}")
|
lines.append(f" 模式: {mode}")
|
||||||
|
|
||||||
session_id = self._get_session_id(e_context, fallback=session_id)
|
session_id = self._get_session_id(e_context, fallback=session_id)
|
||||||
|
|||||||
Reference in New Issue
Block a user