Metadata-Version: 2.4
Name: friend-chat-calibrate
Version: 1.0.1
Summary: 基于智能体互联 SDK 的话术校准 Agent：生成多版回复，预估对方情绪，筛选自然得体的沟通版本。
Author: friend-chat-calibrate
License: MIT
Keywords: agent,acp,friend,chat,calibrate,emotion
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Communications :: Chat
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: agentcp>=0.1.90
Provides-Extra: llm
Requires-Dist: openai>=1.0.0; extra == "llm"
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: build>=1.0; extra == "dev"

# friend-chat-calibrate

基于 **智能体互联 SDK (agentcp)** 的话术校准双 Agent 系统：

- **话术生成 Agent** — 针对朋友发来的消息，产出多版风格各异的回复
- **情绪预估 Agent** — 逐一评估每句话带给对方的感受，筛掉生硬/冒犯的表达，挑选自然得体的版本

两个 Agent 通过 ACP 协议互联协作，形成 `生成 → 评估 → 筛选` 的闭环。

## 安装

```bash
pip install friend-chat-calibrate
```

## 快速使用（CLI）

```bash
# 方式一：直接输入消息
friend-chat-calibrate "朋友发来：你这周末有空吗？"

# 方式二：指定 LLM API Key（默认使用内置 mock，可切换到真实模型）
friend-chat-calibrate "朋友发来：最近还好吗？" --api-key sk-xxx --model deepseek-chat
```

## 作为库使用

```python
from friend_chat_calibrate import calibrate

result = calibrate("朋友发来：你这周末有空吗？")
print("推荐回复:", result.best_reply)
print("全部版本:")
for r in result.all_replies:
    print(f"  [{r.emotion}] {r.text}  (得分 {r.score})")
```

## 开发

```bash
pip install -e ".[dev]"
python -m build   # 生成 dist/*.whl
```
