semvec/pypi-packages huggingface dataset:
callai 0.2.1
一个简单的OpenAI API兼容封装库
License: MIT
Requires Python: >=3.6

# CallAI

CallAI是一个简单易用的OpenAI API封装库，提供了更友好的接口和功能，使开发者能够更方便地使用大型语言模型。

## 安装

```bash
pip install callai
```

## 主要特性

- 兼容OpenAI官方API
- 简化的调用接口
- 支持会话管理
- 内置函数调用功能
- 支持流式响应

## 快速开始

### 基本用法

```python
from callai import AI

# 初始化客户端
ai = AI(api_key="your-api-key", default_model="gpt-3.5-turbo")

# 简单问答
response = ai.ask("请介绍一下Python语言的特点")
print(response)

# 使用系统提示
response = ai.ask("我应该如何入门Python?", system_prompt="你是一位编程教育专家")
print(response)

# 流式输出
for chunk in ai.stream_ask("讲一个关于AI的故事"):
    print(chunk, end="", flush=True)
```

### 会话管理

```python
# 创建会话
session = ai.session(system_prompt="你是一位AI助手")

# 在会话中交流
response = session.ask("你好，请问你是谁?")
print(response)

response = session.ask("我们刚才聊了什么?")
print(response)

# 保存会话
session.save_json("my_session.json")

# 加载会话
restored_session = ai.load_json("my_session.json")
```

### 函数调用

```python
from callai import AI, Tool

# 定义工具函数
@Tool.register
def get_weather(location: str, unit: str = "celsius"):
    """获取指定位置的天气信息
    
    Args:
        location: 位置名称，如"北京"
        unit: 温度单位，可选值为"celsius"或"fahrenheit"
    """
    # 模拟天气API返回
    return {"temperature": 25, "condition": "晴天", "location": location, "unit": unit}

# 使用工具函数
ai = AI(api_key="your-api-key")
result = ai.call_with_tools("北京今天的天气怎么样?")
print(result)
```

## API参考

详细的API文档请访问我们的[官方网站](https://github.com/aixiasang/callai)。

## 许可证

本项目采用MIT许可证。详见LICENSE文件。
mergerz 4.0.3
Blazingly fast module to merge PDFs and slides.
License: MIT
Requires Python: >=3.6

# Introduction

mergerz is a blazingly fast module to merge PDFs and slides.

# Installation

```bash
pip install mergerz
```

# Update

```bash
pip install --upgrade mergerz
```

# Example script
```bash
import mergerz
import colorama
from colorama import Fore, Style
import os

colorama.init()

def clear_console():
    os.system('cls' if os.name == 'nt' else 'clear')

def run_program():
    while True:
        mergerz.main()
        print()
        input(f"{Fore.RED}{Style.BRIGHT}Press Enter to restart program.")
        clear_console()

if __name__ == "__main__":
    run_program()
```
	
# License

MIT License

Copyright (c) 2025 Afnan Tawsif

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.