mirror of
https://github.com/xszyou/Fay.git
synced 2026-03-12 17:51:28 +08:00
1、支持mcp sse服务管理及动态功具调用 --对摩搭社区提供的sse对接的mcp工具做过兼容测试 2、llm模块统一 --严格匹配openai兼容接口范式,包括token计算及流式控制等 --把认知模式作为llm对接的方式,并对认知模型进行了优化升级,可控制各用户聊天认知是否隔离 --使用qwen3-4b作为默认llm,可以平衡速度、角色模拟与MCP工具调用 3、提供配置管理中心,便于多个fay做配置管理 --当根目录中system.conf或config.json不存在,启动时会自动载入config_uitl.py中指定的配置 --配置中心代码支持多项目管理,单项目也支持多fay对接,源码地址:https://github.com/xszyou/fay_config_server 4、多个bug修复 --修复重复反思和重复保存的问题 --修正认知模型的反思和检索算法 --处理pygame报错程序不继续执行问题 --表情不进行tts --运行时再判断加载qt5 --修复文字交互接口流式输出时不会结束问题 --修复文字交互接口流式输出qa不输出问题
29 lines
728 B
Python
29 lines
728 B
Python
from pathlib import Path
|
|
import sys
|
|
import os
|
|
|
|
# 添加项目根目录到系统路径
|
|
BASE_DIR = f"{Path(__file__).resolve().parent.parent}"
|
|
sys.path.append(BASE_DIR)
|
|
|
|
# 导入配置工具
|
|
from utils import config_util as cfg
|
|
|
|
# 确保配置已加载
|
|
cfg.load_config()
|
|
|
|
# 调试模式开关
|
|
DEBUG = False
|
|
|
|
# 从system.conf读取配置
|
|
OPENAI_API_KEY = cfg.key_gpt_api_key
|
|
OPENAI_API_BASE = cfg.gpt_base_url
|
|
|
|
MAX_CHUNK_SIZE = 4
|
|
|
|
# 使用system.conf中的模型配置
|
|
LLM_VERS = cfg.gpt_model_engine
|
|
|
|
## To do: Are the following needed in the new structure? Ideally Populations_Dir is for the user to define.
|
|
POPULATIONS_DIR = f"{BASE_DIR}/agent_bank/populations"
|
|
LLM_PROMPT_DIR = f"{BASE_DIR}/simulation_engine/prompt_template" |