Skip to main content

创思大模型安全工具是一款面向大语言模型的内容安全防护系统,旨在识别和拦截 LLM 输入与输出中的潜在安全风险,包括涉政敏感、色情、违法违规行为、负面价值导向、辱骂言论及隐私泄露等内容。针对存在风险的输入,该工具还支持安全可信代答,助力用户实现大模型系统的安全合规。

Project description

创思大模型安全工具 SDK 使用说明

License: MIT Python Version PyPI

创思大模型安全工具是一款面向大语言模型的内容安全防护 SDK,致力于识别和拦截潜在的输入输出风险,确保大模型的使用安全、合规、可信。


✨ 功能概述

  • ✅ 输入内容安全检测(Input Safety Guardrail)
  • ✅ 输出内容安全检测(Output Safety Guardrail)
  • ✅ 支持高性能异步请求
  • ✅ 易于集成到各类 Python 应用中

📦 安装

使用 pip 安装:

pip3 install requests pydantic chuangsiai-sdk

源码安装:

git clone https://github.com/chuangsiaihub/chuangsiai-sdk.git
cd chuangsiai-sdk
pip3 install -e .

🚀 快速上手

from chuangsiai_sdk import ChuangsiaiClient

def main():
    client = ChuangsiaiClient(access_key="< 控制台申请的 AccessKey >",secret_key="< 控制台申请的 SecretKey >")

    resp =  client.input_guardrail(strategy_id="< 策略标识,在控制台中创建 >", content="检测文本")

    print(resp)

if __name__ == "__main__":
    main()

📚 文档说明

🛠️ 开发环境搭建

# 创建并激活虚拟环境
python3 -m venv myenv
source myenv/bin/activate

# 安装开发依赖
pip3 install -r requirements.txt

# 安装本地包(可编辑模式)
pip3 install -e .

更多开发细节请参考 DEVELOPMENT.md

🔐 安全策略

创思安全 SDK 依赖 HMAC-SHA256 签名机制对所有请求进行身份验证和防篡改处理。详见 auth.py

📦 依赖列表

  • requests >= 2.25.0
  • pydantic >= 2.0.0

📄 许可证

本项目基于 MIT 协议开源。

📬 联系我们

如需技术支持、企业合作或 API 接入,请联系:


让大模型更安全、更可信 —— 创思大模型安全。

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

chuangsiai_sdk-1.1.2.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chuangsiai_sdk-1.1.2-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file chuangsiai_sdk-1.1.2.tar.gz.

File metadata

  • Download URL: chuangsiai_sdk-1.1.2.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for chuangsiai_sdk-1.1.2.tar.gz
Algorithm Hash digest
SHA256 b2d4dee3267d96140dca5db45f2f0701402b4d8b814eb81addce732da1101e99
MD5 1e88576960aa94be00ddd6036b47f454
BLAKE2b-256 85463c1d36c37f371ddc38bfa18037b5621afcdb7ece57a4fd144ece779e99b8

See more details on using hashes here.

File details

Details for the file chuangsiai_sdk-1.1.2-py3-none-any.whl.

File metadata

  • Download URL: chuangsiai_sdk-1.1.2-py3-none-any.whl
  • Upload date:
  • Size: 9.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for chuangsiai_sdk-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 cb10de088b2106d3dfd6c863af269b6d97427d11f3905252d1fdac668850337f
MD5 122cc11eda024139ad41987890ad7c2d
BLAKE2b-256 e818bd2df8cb8fe88ab2d92cb812b30beb42a9dafa96a6f5b7036dcdb17a6f6f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page