Metadata-Version: 2.4
Name: revDeepSeek
Version: 0.0.1
Summary: DeepSeek逆向api
Project-URL: Homepage, https://github.com/old-dream321/revDeepSeek
Author-email: old-dream321 <hzz123123@outlook.com>
License: MIT License
        
        Copyright (c) 2025 旧梦残颜
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.9
Requires-Dist: filetype
Requires-Dist: numpy
Requires-Dist: requests
Requires-Dist: wasmtime
Description-Content-Type: text/markdown

# revDeepSeek
DeepSeek逆向API


## 安装
```bash
pip install revDeepSeek --upgrade
```

## 使用
具体用法可查看方法`Type Hint`

## 1.初始化
```python
from revDeepSeek import Chatbot
chatbot = Chatbot("USER_TOKEN")
```
USER_TOKEN获取:\
1.打开开发者工具，找到应用程序选项卡\
2.如下图
![](.github/res/usertoken.png)

## 2.使用

### 新建会话
```python
res = chatbot.create_session()
session_id = res["id"] #会话ID
```
### 发送消息
```python
res = chatbot.chat(
    conversation_id=session_id, # 会话ID
    prompt="你好", # 消息内容
    parent_message_id=None, # 父消息ID
    search=False, # 启用搜索
    thinking=False, # 启用深度思考
    file=None, # 文件二进制数据(上传文件需添加)
    stream=False, # 启用流式输出
)
```
响应示例:
```json
{
    "content": "内容",
    "type": "text",
    "message_id": 100
}
```

### 获取会话列表
```python
res = chatbot.get_session_list(count=100)
```

### 获取会话历史
```python
res = chatbot.get_session_history(session_id=session_id)
```

### 删除会话
```python
res = chatbot.delete_session(session_id=session_id)
```