Metadata-Version: 2.4
Name: prismind
Version: 0.2.0
Summary: 多视角推理引擎 — 让 AI 从多个棱镜思考问题
License: MIT
Classifier: Development Status :: 4 - Beta
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: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.28
Requires-Dist: pyyaml>=6.0
Provides-Extra: web
Requires-Dist: flask>=2.0; extra == "web"
Provides-Extra: all
Requires-Dist: flask>=2.0; extra == "all"
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: license
Dynamic: license-file
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

<div align="center">

# Prismind

**多视角推理引擎 — 让 AI 从多个棱镜思考问题**

[![PyPI](https://img.shields.io/badge/PyPI-0.2.0-blue)](https://pypi.org/project/prismind/)
[![Python](https://img.shields.io/badge/Python-3.9%2B-green)](https://www.python.org/)
[![License](https://img.shields.io/badge/License-MIT-yellow)](LICENSE)

</div>

```bash
pip install prismind
pip install 'prismind[web]'    # 连带 Web 界面
```

---

## 为什么是 Prismind？

普通 AI 工具 = 问题进去 → 黑箱回答出来

**Prismind** = 问题进去 → 自动匹配分析框架 → 多视角拆解 → 辩论整合 → 结构化输出

内置 **6 种分析视角**（因果/辩论/对比/推演/历史/风险），自动适配模型能力（1.5B → GPT-4o）。

## 快速开始

```python
from prismind import chat

result = chat("分析人工智能对医疗行业的影响",
              model="deepseek-chat",
              ak="sk-xxxxxxxx")
print(result)
```

## 模型自动适配

| 层级 | 典型模型 | 温度 | Token | 棱镜数 | 模式 |
|------|---------|------|-------|--------|------|
| **TINY** | qwen2.5:1.5b | 0.3 | 2048 | 1 | 合并 |
| **SMALL** | qwen2.5:7b | 0.4 | 4096 | 2 | 串行 |
| **FULL** | deepseek-chat, gpt-3.5 | 0.5 | 8192 | 3 | 串行 |
| **PREMIUM** | gpt-4o, claude-3.5 | 0.6 | 16384 | 4 | 串行 |

## 三种模式

| 模式 | 说明 |
|------|------|
| `simple` | 单次直答，最快 |
| `standard` | 智能增强，短→直答 / 复杂→多视角串行+融合 |
| `deep` | 多视角并行 + 辩论 + 综合 + 完整性检查（手动开启） |

## 三种接入

### SDK

```python
from prismind import chat, chat_stream, chat_async, set_mode, ImageLoader

for chunk in chat_stream("量子计算是什么？", ak="..."): print(chunk, end="")
result = await chat_async("分析市场趋势", ak="...")
img = ImageLoader.from_path("chart.jpg")
result = chat("分析这张图表", images=[img], ak="...")
```

### CLI

```bash
prismind --ak sk-xxx --model deepseek-chat --mode standard
```

```
/mode simple|standard|deep   切换推理模式
/clear                        清空会话
/tools                        查看工具
```

### Web

```bash
pip install 'prismind[web]'
prismind-web
# http://127.0.0.1:8081
```

## 配置优先级

```
运行时参数 > PRISMIND_AK 环境变量 > .env > prismind.json > 默认值
```

## 支持供应商

OpenAI / Ollama / Claude / Gemini / 百度 / 阿里 / 智谱

## 许可证

[MIT](LICENSE)
