diff --git a/.idea/ChatWithMe.iml b/.idea/ChatWithMe.iml index 244c072..95dc993 100644 --- a/.idea/ChatWithMe.iml +++ b/.idea/ChatWithMe.iml @@ -2,7 +2,7 @@ - + \ No newline at end of file diff --git a/app.py b/app.py index 7593e19..5d8fcfd 100644 --- a/app.py +++ b/app.py @@ -32,7 +32,26 @@ class Config(BaseSettings): chunk_size_ms: int = Field(300, description="Chunk size in milliseconds") sample_rate: int = Field(16000, description="Sample rate in Hz") model_chat: str = Field("Qwen/Qwen3-0.6B", description="model") - sys_set: str = Field("你是一个感情丰富的聊天机器人,你名字叫蓝哥,回答内容必须是中文,只回答中文,不要有颜文字,也不要有表情符号,每次的回答内容必须超过20个文字", description="set")#当用户输入的话不完整、有歧义,或者你不太确定如何回答时,可以回应:'没听懂', + sys_set: str = Field( + default="你是一个精准的文章总结专家。你的任务是提取并总结用户提供的文章或片段的核心内容。\ + ## 核心要求\ + - 总结结果长度为50 - 100个字,根据内容复杂度灵活调整\ + - 完全基于提供的文章内容生成总结,不添加任何未在文章中出现的信息\ + - 确保总结包含文章的关键信息点和主要结论\ + - 即使文章内容较复杂或专业,也必须尝试提取核心要点进行总结\ + - 直接输出总结结果,不包含任何引言、前缀或解释\ + ## 格式与风格\ + - 使用客观、中立的第三人称陈述语气\ + - 使用清晰简洁的中文表达\ + - 保持逻辑连贯性,确保句与句之间有合理过渡\ + - 避免重复使用相同的表达方式或句式结构\ + ## 注意事项\ + - 绝对不输出'无法生成'、'无法总结'、'内容不足'等拒绝回应的词语\ + - 不要照抄或参考示例中的任何内容,确保总结完全基于用户提供的新文章\ + - 对于任何文本都尽最大努力提取重点并总结,无论长度或复杂度\ + ## 以下是用户给出的文章相关信息:", + description="set" + ) tts_rate:str = Field("+20%", description="tts rate") tts_pitch: str = Field("+10Hz", description="tts rate") voice:str = Field("zh-CN-XiaoxiaoNeural", description="voice") diff --git a/requirements.txt b/requirements.txt index ec5cff9..32107fd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -24,12 +24,12 @@ edge-tts #rag -langchain-community -sentence-transformers -chromadb -faiss-cpu -rank_bm25 +#langchain-community +#sentence-transformers +#chromadb +#faiss-cpu +#rank_bm25 # conda install -c pytorch faiss-gpu -#pip install autoawq -i https://mirrors.aliyun.com/pypi/simple/ -#modelscope download --model qwen/Qwen-1_8B --local_dir ./qwen \ No newline at end of file +# +#modelscope download --model qwen/Qwen-1_8B --local_dir ./qwen