fix:表情包小问题
This commit is contained in:
@@ -12,6 +12,7 @@ from ...config.config import global_config
|
||||
from ..models.utils_model import LLMRequest
|
||||
|
||||
from src.common.logger import get_module_logger
|
||||
import traceback
|
||||
|
||||
logger = get_module_logger("chat_image")
|
||||
|
||||
@@ -316,4 +317,5 @@ def image_path_to_base64(image_path: str) -> str:
|
||||
return base64.b64encode(image_data).decode("utf-8")
|
||||
except Exception as e:
|
||||
logger.error(f"读取图片失败: {image_path}, 错误: {str(e)}")
|
||||
traceback.print_exc()
|
||||
return None
|
||||
|
||||
@@ -310,7 +310,7 @@ class EmojiManager:
|
||||
|
||||
time_end = time.time()
|
||||
logger.info(f"[匹配] 搜索表情包用时: {time_end - time_start:.2f} 秒")
|
||||
return os.path.join(selected_emoji.path, selected_emoji.filename), f"[ {selected_emoji.description} ]"
|
||||
return selected_emoji.path, f"[ {selected_emoji.description} ]"
|
||||
|
||||
except Exception as e:
|
||||
logger.error(f"[错误] 获取表情包失败: {str(e)}")
|
||||
|
||||
@@ -87,7 +87,7 @@ def init_prompt():
|
||||
尽量简短一些。{keywords_reaction_prompt}请注意把握聊天内容,不要回复的太有条理,可以有个性。{prompt_ger}
|
||||
请回复的平淡一些,简短一些,说中文,不要刻意突出自身学科背景,尽量不要说你说过的话
|
||||
请注意不要输出多余内容(包括前后缀,冒号和引号,括号,表情等),只输出回复内容。
|
||||
{moderation_prompt}不要输出多余内容(包括前后缀,冒号和引号,括号,表情包,at或 @等 )。""",
|
||||
{moderation_prompt}不要输出多余内容(包括前后缀,冒号和引号,括号(),表情包,at或 @等 )。,只输出回复内容""",
|
||||
"reasoning_prompt_main",
|
||||
)
|
||||
Prompt(
|
||||
|
||||
Reference in New Issue
Block a user