﻿# 馃幖 Symphony 鏅鸿兘澶氭ā鍨嬪崗浣滅郴缁?## Symphony - Intelligent Multi-Model Collaboration System

---

## 馃殌 绠€浠?| Introduction

**Symphony锛堜氦鍝嶏級** 鈥?鍙蹭笂鏈€寮哄妯″瀷鍗忎綔璋冨害绯荤粺锛?
**Symphony** 鈥?The Most Powerful Multi-Model Collaboration Dispatch System!

---

## 鉁?鏍稿績鐗规€?| Core Features

| 鐗规€?Feature | 璇存槑 Description |
|-------------|-----------------|
| 馃 澶氭ā鍨嬪苟琛?| 鍚屾椂璋冪敤澶氫釜AI妯″瀷锛屽崗鍚屽伐浣?|
| 馃洝锔?鏅鸿兘瀹归敊 | 鑷姩鏁呴殰杞Щ锛岀‘淇濇湇鍔℃案缁?|
| 馃幆 浠诲姟璋冨害 | 鏅鸿兘鍒嗛厤浠诲姟锛屾彁鍗囨晥鐜?|
| 馃攧 妯″瀷鐑彃鎷?| 杩愯鏃跺姩鎬佸垏鎹㈡ā鍨?|
| 馃搳 璐熻浇鍧囪　 | 鍚堢悊鍒嗛厤璁＄畻璧勬簮 |
| 馃寪 璺ㄥ钩鍙版敮鎸?| Windows/Linux/Mac鍏ㄩ潰鍏煎 |

---

## 馃彈锔?杞欢鏋舵瀯 | Software Architecture

### 绯荤粺鏋舵瀯鍥?| System Architecture

```
鈹屸攢鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹?鈹?                     Symphony Core                          鈹?鈹溾攢鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹?鈹? 鈹屸攢鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹? 鈹屸攢鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹? 鈹屸攢鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹?   鈹?鈹? 鈹?  浠诲姟璋冨害   鈹? 鈹?  妯″瀷绠＄悊    鈹? 鈹?  瀹归敊绯荤粺   鈹?   鈹?鈹? 鈹?Task Schedule鈹? 鈹侻odel Manager 鈹? 鈹侳ault Tolerance鈹?   鈹?鈹? 鈹斺攢鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹? 鈹斺攢鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹? 鈹斺攢鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹?   鈹?鈹溾攢鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹?鈹? 鈹屸攢鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹? 鈹屸攢鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹? 鈹屸攢鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹?   鈹?鈹? 鈹? 宸ュ叿鍏变韩绯荤粺 鈹? 鈹?  璁板繂绯荤粺   鈹? 鈹?  鍗忎綔缂栨帓   鈹?   鈹?鈹? 鈹俆ool Sharing  鈹? 鈹侻emory System 鈹? 鈹侰ollaboration 鈹?   鈹?鈹? 鈹斺攢鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹? 鈹斺攢鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹? 鈹斺攢鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹?   鈹?鈹溾攢鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹?鈹?                    Model Providers                         鈹?鈹? 鈹屸攢鈹€鈹€鈹€鈹€鈹€鈹?鈹屸攢鈹€鈹€鈹€鈹€鈹€鈹?鈹屸攢鈹€鈹€鈹€鈹€鈹€鈹?鈹屸攢鈹€鈹€鈹€鈹€鈹€鈹?鈹屸攢鈹€鈹€鈹€鈹€鈹€鈹?鈹屸攢鈹€鈹€鈹€鈹€鈹€鈹? 鈹?鈹? 鈹傛櫤璋? 鈹?鈹傜伀灞? 鈹?鈹侼VIDIA鈹?鈹侻inimax鈹?鈹傞樋閲? 鈹?鈹傝吘璁? 鈹? 鈹?鈹? 鈹俍hipu 鈹?鈹侫rk   鈹?鈹?     鈹?鈹?     鈹?鈹侫li   鈹?鈹俆encent鈹? 鈹?鈹? 鈹斺攢鈹€鈹€鈹€鈹€鈹€鈹?鈹斺攢鈹€鈹€鈹€鈹€鈹€鈹?鈹斺攢鈹€鈹€鈹€鈹€鈹€鈹?鈹斺攢鈹€鈹€鈹€鈹€鈹€鈹?鈹斺攢鈹€鈹€鈹€鈹€鈹€鈹?鈹斺攢鈹€鈹€鈹€鈹€鈹€鈹? 鈹?鈹斺攢鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹?```

### 鏍稿績妯″潡 | Core Modules

| 妯″潡 Module | 鍔熻兘 Function | 琛屾暟 Lines |
|------------|--------------|------------|
| `symphony_core.py` | 缁熶竴璋冨害鏍稿績 | ~500 |
| `model_manager.py` | 妯″瀷绠＄悊鍣?| ~400 |
| `fault_tolerance.py` | 瀹归敊绯荤粺 | ~300 |
| `skill_manager.py` | 鎶€鑳界鐞嗗櫒 | ~350 |
| `memory_system.py` | 璁板繂绯荤粺 | ~450 |
| `mcp_manager.py` | MCP宸ュ叿绠＄悊 | ~280 |
| `tool_sharing.py` | 宸ュ叿鍏变韩 | ~250 |

---

## 馃摝 瀹夎璇存槑 | Installation

### 鐜瑕佹眰 | Requirements

| 瑕佹眰 Requirement | 鏈€浣庣増鏈?Minimum Version |
|-----------------|------------------------|
| Python | 3.9+ |
| pip | 20.0+ |
| 鍐呭瓨 RAM | 4GB+ |
| 纾佺洏绌洪棿 | 1GB+ |

### 瀹夎鏂瑰紡 | Installation Methods

#### 鏂瑰紡涓€锛歱ip瀹夎锛堟帹鑽愶級| Method 1: pip (Recommended)

```bash
# 瀹夎鏈€鏂扮増鏈?pip install symphony

# 瀹夎鎸囧畾鐗堟湰
pip install symphony==2.3.1

# 鍗囩骇鍒版渶鏂扮増鏈?pip install --upgrade symphony
```

#### 鏂瑰紡浜岋細浠庢簮鐮佸畨瑁?| Method 2: From Source

```bash
# 鍏嬮殕浠撳簱
git clone https://github.com/songleiwww/symphony.git

# 杩涘叆鐩綍
cd symphony

# 瀹夎渚濊禆
pip install -r requirements.txt

# 閰嶇疆API
cp config.template.py config.py
# 缂栬緫 config.py 濉叆浣犵殑API瀵嗛挜

# 杩愯绀轰緥
python examples/demo.py
```

#### 鏂瑰紡涓夛細Docker瀹夎 | Method 3: Docker

```bash
# 鎷夊彇闀滃儚
docker pull songleiwww/symphony:latest

# 杩愯瀹瑰櫒
docker run -it -v $(pwd)/config.py:/app/config.py songleiwww/symphony
```

### 閰嶇疆璇存槑 | Configuration

```python
# config.py 閰嶇疆绀轰緥
API_KEY = "your_api_key_here"
BASE_URL = "https://ark.cn-beijing.volces.com/api/coding/v3"

# 涓绘ā鍨?PRIMARY_MODEL = "ark-code-latest"

# 澶囩敤妯″瀷鍒楄〃锛堟敮鎸?3涓ā鍨嬶紒锛?FALLBACK_MODELS = [
    "deepseek-v3.2",
    "doubao-seed-2.0-code",
    "glm-4.7",
    "kimi-k2.5",
    "MiniMax-M2.5",
    # ... 鏇村妯″瀷
]
```

---

## 馃幆 蹇€熷紑濮?| Quick Start

### 鍩虹鐢ㄦ硶 | Basic Usage

```python
from symphony import SymphonyCore

# 鍒涘缓浜ゅ搷瀹炰緥
symphony = SymphonyCore()

# 鍙戣捣鍗忎綔浠诲姟
result = symphony.dispatch("甯垜瀹夋帓涓€涓?浜哄洟闃熻璁轰細")

# 浜彈澶氭ā鍨嬪崗浣滅殑鍔涢噺锛?print(result)
```

### 楂樼骇鐢ㄦ硶 | Advanced Usage

```python
# 鑷畾涔夋ā鍨嬮厤缃?symphony = SymphonyCore(
    primary_model="ark-code-latest",
    fallback_models=["deepseek-v3.2", "glm-4.7"],
    timeout=60,
    max_retries=3
)

# 骞惰璋冪敤澶氫釜妯″瀷
results = symphony.parallel_dispatch([
    "鍒嗘瀽杩欐浠ｇ爜鐨勬€ц兘闂",
    "浼樺寲杩欎釜绠楁硶鐨勫鏉傚害",
    "娣诲姞鍗曞厓娴嬭瘯"
])

# 鑾峰彇妯″瀷鎶曠エ缁撴灉
vote_result = symphony.vote("Python濂借繕鏄疛ava濂?")
```

---

## 馃専 鐗规妧 | Special Features

### 1. 馃幁 澶氭ā鍨嬩汉鏍煎垏鎹?| Multi-Personality Switching

```python
# 6绉嶄汉鏍兼ā鍨嬶紝浠讳綘鍒囨崲
personalities = {
    "鏋楁€濊繙": "杈撳叆鐞嗚В涓撳",
    "闄堢編鐞?: "瑙嗚璁捐鎬荤洃",
    "鐜嬫旦鐒?: "浜や簰宸ョ▼甯?,
    "鍒樺績鎬?: "鍐呭绛栧垝甯?,
    "寮犳槑杩?: "璐ㄩ噺淇濊瘉涓荤",
    "璧垫晱": "椤圭洰鍗忚皟鍛?
}
```

### 2. 馃 鏅鸿兘璁板繂绯荤粺 | Intelligent Memory System

- 鐭湡璁板繂锛氭渶杩戝璇濅笂涓嬫枃
- 闀挎湡璁板繂锛氶噸瑕佷俊鎭寔涔呭寲
- 宸ヤ綔璁板繂锛氬綋鍓嶄换鍔＄浉鍏?- 鎯呮櫙璁板繂锛氱壒瀹氫簨浠跺拰鏃堕棿

### 3. 馃攧 鑷姩鏁呴殰杞Щ | Automatic Failover

```python
# 涓绘ā鍨嬪け璐ヨ嚜鍔ㄥ垏鎹?try:
    result = symphony.dispatch(task)
except PrimaryModelError:
    # 鑷姩鍒囨崲鍒板鐢ㄦā鍨?    result = symphony.dispatch(task, use_fallback=True)
```

### 4. 馃搳 瀹炴椂鐩戞帶 | Real-time Monitoring

```python
# 鑾峰彇绯荤粺鐘舵€?status = symphony.get_status()
print(f"鍦ㄧ嚎妯″瀷: {status['active_models']}")
print(f"鎴愬姛璋冪敤: {status['successful_calls']}")
print(f"骞冲潎鍝嶅簲鏃堕棿: {status['avg_response_time']}ms")
```

### 5. 馃帹 澧炲己UI杈撳嚭 | Enhanced UI Output

```python
# 缇庤鐨勬秷鎭緭鍑?symphony.display_header("浜ゅ搷 v2.3.0")
symphony.display_success("浠诲姟瀹屾垚锛?)
symphony.display_table(data)
symphony.display_progress(75)
```

### 6. 馃攲 鎻掍欢绯荤粺 | Plugin System

```python
# 鍔犺浇鑷畾涔夋彃浠?symphony.load_plugin("my_custom_plugin")

# 鎻掍欢甯傚満
plugins = symphony.list_plugins()
# 鍙敤鎻掍欢锛氱炕璇戙€佺粯鍥俱€佽闊宠瘑鍒?..
```

---

## 馃 鍙備笌璐＄尞 | Contributing

### 娆㈣繋璐＄尞 | Welcome Contributions

鎴戜滑娆㈣繋浠讳綍褰㈠紡鐨勮础鐚紒

We welcome contributions in any form!

### 璐＄尞鏂瑰紡 | How to Contribute

#### 1. 鎶ュ憡Bug | Report Bugs

```bash
# 鍦?GitHub Issues 涓姤鍛?# 璇峰寘鍚細
# - 澶嶇幇姝ラ
# - 棰勬湡琛屼负
# - 瀹為檯琛屼负
# - 鐜淇℃伅
```

#### 2. 鎻愬嚭鏂板姛鑳?| Suggest Features

```bash
# 鍦?GitHub Issues 涓彁浜ょ壒鎬ц姹?# 璇疯鏄庯細
# - 鍔熻兘鎻忚堪
# - 浣跨敤鍦烘櫙
# - 瀹炵幇鎬濊矾
```

#### 3. 鎻愪氦浠ｇ爜 | Submit Code

```bash
# Fork 浠撳簱
git clone https://github.com/songleiwww/symphony.git

# 鍒涘缓鍒嗘敮
git checkout -b feature/your-feature

# 寮€鍙戝苟娴嬭瘯
python -m pytest tests/

# 鎻愪氦 Pull Request
git push origin feature/your-feature
```

### 寮€鍙戣鑼?| Development Standards

| 瑙勮寖 Standard | 瑕佹眰 Requirement |
|--------------|-----------------|
| 浠ｇ爜椋庢牸 | PEP 8 |
| 娉ㄩ噴 | 涓嫳鍙岃 |
| 娴嬭瘯 | 瑕嗙洊鐜?> 80% |
| 鏂囨。 | 鍚屾鏇存柊 |

### 璐＄尞鑰呭悕鍗?| Contributors

| 璐＄尞鑰?Contributor | 瑙掕壊 Role | 璐＄尞 |
|------------------|----------|------|
| 閫犳ⅵ鑰?& 浜や氦 | 鍒涘浜?| 鏍稿績鏋舵瀯 |
| 鏋楁€濊繙 | 杈撳叆鐞嗚В | 绠楁硶浼樺寲 |
| 闄堢編鐞?| 瑙嗚璁捐 | UI澧炲己 |
| 鐜嬫旦鐒?| 浜や簰璁捐 | 鎻掍欢绯荤粺 |

---

## 馃搳 鏀寔鐨勬ā鍨?| Supported Models

| 鎻愪緵鍟?Provider | 妯″瀷鏁伴噺 | 浠ｈ〃妯″瀷 |
|----------------|----------|---------|
| 鏅鸿氨 (Zhipu) | 6涓?| GLM-4.7 |
| 鐏北寮曟搸 (Ark) | 5涓?| ark-code-latest |
| NVIDIA | 7涓?| Nemotron Ultra |
| ModelScope | 10涓?| Qwen绯诲垪 |
| MiniMax | 1涓?| M2.5 |
| **鎬昏** | **23+** | 鈥?|

---

## 馃摓 鑱旂郴鎴戜滑 | Contact Us

| 娓犻亾 Channel | 鍦板潃 Link |
|-------------|----------|
| 馃摟 閭 | songlei_www@qq.com |
| 馃悰 闂鍙嶉 | GitHub Issues |
| 馃挰 浜ゆ祦缇?| 娆㈣繋鍔犲叆璁ㄨ |
| 馃摉 鏂囨。 | ReadTheDocs |

---

## 馃搫 璁稿彲璇?| License

MIT License 鈥?寮€婧愬厤璐瑰晢鐢紒

---

## 馃専 绔嬪嵆浣撻獙 | Get Started Now!

```bash
pip install symphony
```

**璁〢I鍗忎綔鍙樺緱濡傛绠€鍗曪紒**

**Make AI Collaboration So Simple!**

---

## 猸?鏀寔鎴戜滑 | Support Us

濡傛灉浣犺寰桽ymphony鏈夊府鍔╋紝璇凤細

- 猸?缁欎釜 Star
- 馃摙 鍒嗕韩缁欐湅鍙?- 馃摑 鍐欎竴绡囧崥瀹?- 馃挕 鎻愬嚭浣犵殑鎯虫硶

---

*馃殌 鏅洪煹浜ゅ搷锛屽叡鍒涘崕绔?| Symphony of Intelligence, Creating Masterpieces Together*
