diff --git a/README.md b/README.md index eb691d1..99b3a21 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ 简体中文| English| Project Homepage | - Documentation + Documentation

> [!IMPORTANT] @@ -37,6 +37,15 @@ > [!IMPORTANT] > ### WeClone is currently not partnered with any platform and has not issued any cryptocurrency. The only official website is: [weclone.love](https://www.weclone.love). Beware of imitations. +### Chat Platform Support + +| Platform | Text | Images | Voice | Video | Animated Emojis | Links (Sharing) | Quote | Forward | Location | Files | +|----------|------|--------|-------|-------|-----------------|-----------------|-------|---------|----------|-------| +| WeChat | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| Telegram | ✅ | ✅ | ❌ | ❌ | ⚠️Convert to Emoji | ❌ | ❌ | ✅ | ✅ | ❌ | + + + > [!IMPORTANT] > - WeClone is still in rapid iteration phase, current performance does not represent final results. > - LLM fine-tuning effectiveness largely depends on model size, quantity and quality of chat data. Theoretically, larger models with more data yield better results. diff --git a/README_zh.md b/README_zh.md index a16e8e2..6d2a875 100644 --- a/README_zh.md +++ b/README_zh.md @@ -21,7 +21,7 @@

项目主页 | - 项目文档 | + 项目文档 Windows部署指南 Linux部署指南【保姆级】

@@ -39,6 +39,13 @@ > [!IMPORTANT] > ### WeClone 目前未与任何平台合作,未发行任何数字货币。唯一官方网站:[weclone.love](https://www.weclone.love),谨防仿冒。 +### 聊天平台适配 + +| 平台 | 文字 | 图片 | 语音 | 视频 | 动画表情 | 链接(分享) | 引用 | 转发 | 位置 | 文件 | +|------|------|------|------|------|----------|-----------|------|------|------|------| +| 微信 | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| Telegram | ✅ | ✅ | ❌ | ❌ | ⚠️转为Emjoy | ❌ | ❌ | ✅ | ✅ | ❌ | + > [!IMPORTANT] > - WeClone仍在快速迭代期,当前效果不代表最终效果。 > - 微调LLM效果很大程度取决于模型大小、聊天数据的数量和质量,理论上模型越大,数据越多,效果越好。 diff --git a/pyproject.toml b/pyproject.toml index bd19c50..5ca7191 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ requires-python = ">=3.10,<3.11" dependencies = [ "pandas", - "commentjson", + "pyjson5", "omegaconf", "click", "tqdm", @@ -40,6 +40,8 @@ main = [ "transformers==4.52.1", "accelerate==1.7.0", "triton==3.3.0; platform_system == 'Linux'", + "presidio_analyzer[transformers]", + "presidio_anonymizer", ] sparktts = [ "einops>=0.8.1", diff --git a/weclone/cli.py b/weclone/cli.py index 3940193..df34992 100644 --- a/weclone/cli.py +++ b/weclone/cli.py @@ -5,7 +5,7 @@ from pathlib import Path from typing import cast import click -import commentjson +import pyjson5 from weclone.utils.config import load_config from weclone.utils.config_models import CliArgs @@ -168,7 +168,7 @@ def _check_versions(): if SETTINGS_PATH.exists(): try: with open(SETTINGS_PATH, "r", encoding="utf-8") as f: - settings_data = commentjson.load(f) + settings_data = pyjson5.load(f) settings_version = settings_data.get("version") except Exception as e: logger.error(f"错误:无法读取或解析 {SETTINGS_PATH}: {e}") diff --git a/weclone/data/models.py b/weclone/data/models.py index 2cf98a5..8e87233 100644 --- a/weclone/data/models.py +++ b/weclone/data/models.py @@ -12,16 +12,16 @@ from weclone.utils.i18n import MultiLangList @dataclass class ChatMessage: id: int # 顺序id - MsgSvrID: int - type_name: str + MsgSvrID: str # 消息平台原始id + type_name: str # 消息类型 参考cut_type_data和skip_type_data is_sender: int # 0: 对方 1: 自己 - talker: str - msg: str - src: str - CreateTime: Timestamp - room_name: Optional[str] = None - is_forward: bool = False - modality: Optional[DataModality] = None + talker: str # 消息发送者 + msg: str # 消息内容 + src: str # 媒体文件路径、额外信息字段 + CreateTime: Timestamp # 消息发送时间 + room_name: Optional[str] = None # 聊天室名称 + is_forward: bool = False # 是否是转发消息 + modality: Optional[DataModality] = None # 消息模态 set in qa_generator.py @dataclass diff --git a/weclone/utils/config.py b/weclone/utils/config.py index fc5f8a0..10b9a4e 100644 --- a/weclone/utils/config.py +++ b/weclone/utils/config.py @@ -2,7 +2,7 @@ import os import sys from typing import Any, Dict, cast -import commentjson +import pyjson5 from omegaconf import OmegaConf from pydantic import BaseModel @@ -23,7 +23,7 @@ def load_base_config() -> WcConfig: try: with open(config_path, "r", encoding="utf-8") as f: - s_config_dict: Dict[str, Any] = commentjson.load(f) + s_config_dict: Dict[str, Any] = pyjson5.load(f) except FileNotFoundError: logger.error(f"Configuration file not found: {config_path}") sys.exit(1)