diff --git a/konabot/common/apis/ali_content_safety.py b/konabot/common/apis/ali_content_safety.py new file mode 100644 index 0000000..d8661b8 --- /dev/null +++ b/konabot/common/apis/ali_content_safety.py @@ -0,0 +1,90 @@ +import asyncio +import json + +from alibabacloud_green20220302.client import Client as AlibabaGreenClient +from alibabacloud_green20220302.models import TextModerationPlusRequest +from alibabacloud_tea_openapi.models import Config as AlibabaTeaConfig +from loguru import logger +from pydantic import BaseModel + +import nonebot + + +class AlibabaGreenPluginConfig(BaseModel): + module_aligreen_enable: bool = False + module_aligreen_access_key_id: str = "" + module_aligreen_access_key_secret: str = "" + module_aligreen_region_id: str = "cn-shenzhen" + module_aligreen_endpoint: str = "green-cip.cn-shenzhen.aliyuncs.com" + module_aligreen_service: str = "llm_query_moderation" + + +class AlibabaGreen: + _client: AlibabaGreenClient | None = None + _config: AlibabaGreenPluginConfig | None = None + + @staticmethod + def get_client() -> AlibabaGreenClient: + assert AlibabaGreen._client is not None + return AlibabaGreen._client + + @staticmethod + def get_config() -> AlibabaGreenPluginConfig: + assert AlibabaGreen._config is not None + return AlibabaGreen._config + + @staticmethod + def init(): + config = nonebot.get_plugin_config(AlibabaGreenPluginConfig) + AlibabaGreen._config = config + if not config.module_aligreen_enable: + logger.info("该环境未启用阿里内容审查,跳过初始化") + return + AlibabaGreen._client = AlibabaGreenClient(AlibabaTeaConfig( + access_key_id=config.module_aligreen_access_key_id, + access_key_secret=config.module_aligreen_access_key_secret, + connect_timeout=10000, + read_timeout=3000, + region_id=config.module_aligreen_region_id, + endpoint=config.module_aligreen_endpoint, + )) + + @staticmethod + def _detect_sync(content: str) -> bool: + if not AlibabaGreen.get_config().module_aligreen_enable: + logger.debug("该环境未启用阿里内容审查,直接跳过") + return True + + client = AlibabaGreen.get_client() + try: + response = client.text_moderation_plus(TextModerationPlusRequest( + service=AlibabaGreen.get_config().module_aligreen_service, + service_parameters=json.dumps({ + "content": content, + }), + )) + if response.status_code == 200: + result = response.body + logger.debug(f"检测违规内容 API 调用成功:{result}") + risk_level: str = result.data.risk_level or "none" + if risk_level == "high": + return False + return True + logger.error(f"检测违规内容 API 调用失败:{response}") + return True + except Exception as e: + logger.error("检测违规内容 API 调用失败") + logger.exception(e) + return True + + @staticmethod + async def detect(content: str) -> bool: + return await asyncio.to_thread(AlibabaGreen._detect_sync, content) + + +driver = nonebot.get_driver() + +@driver.on_startup +async def _(): + AlibabaGreen.init() + diff --git a/konabot/common/llm/__init__.py b/konabot/common/llm/__init__.py index 71c4fbf..3fbafb4 100644 --- a/konabot/common/llm/__init__.py +++ b/konabot/common/llm/__init__.py @@ -59,6 +59,9 @@ def get_llm(llm_model: str | None = None): if llm_model is None: llm_model = llm_config.default_llm if llm_model not in llm_config.llms: - raise NotImplementedError("LLM 未配置,该功能无法使用") + if llm_config.default_llm in llm_config.llms: + logger.warning(f"[LLM] 需求的 LLM 不存在,回退到默认模型 REQUIRED={llm_model}") + return llm_config.llms[llm_config.default_llm] + raise NotImplementedError("[LLM] LLM 未配置,该功能无法使用") return llm_config.llms[llm_model] diff --git a/konabot/plugins/simple_notify/ask_llm.py b/konabot/plugins/simple_notify/ask_llm.py index 7c80689..0b22d94 100644 --- a/konabot/plugins/simple_notify/ask_llm.py +++ b/konabot/plugins/simple_notify/ask_llm.py @@ -4,15 +4,15 @@ import re from loguru import logger +from konabot.common.apis.ali_content_safety import AlibabaGreen from konabot.common.llm import get_llm SYSTEM_PROMPT = """你是一个专门解析提醒请求的助手。请分析用户输入,识别其中是否包含提醒信息,并输出标准化的JSON格式结果。 -输入格式通常是:"现在是zzzz;xxxx提醒我yyyy",其中: -- zzzz 是系统将发给你的当前时间 +输入格式通常是:"xxxx提醒我yyyy",其中: - xxxx 是用户提供的时间信息 -- yyyy 是提醒内容 +- yyyy 是提醒内容。有些时候用户会有一些需求。你可以在合理的范围进行衍生。 输出要求: - 必须是有效的JSON对象 @@ -55,6 +55,9 @@ SYSTEM_PROMPT = """你是一个专门解析提醒请求的助手。请分析用 用户:"什么是提醒功能?" 输出:{"datetime": null, "datetime_delta": null, "datetime_delta_minus": false, "content": "", "is_notice": false} +用户:"过一会会,用可爱的语气提醒我该睡觉了" +输出:{"datetime": null, "datetime_delta": "PT10M", "datetime_delta_minus": false, "content": "呼呼!该睡觉了哦!ヾ(•ω•`)o", "is_notice": true} + 请严格按照上述格式输出JSON,不要添加任何其他文字说明。现在是 DATETIME""" pt_pattern = re.compile( @@ -78,9 +81,13 @@ def tryint(s: str | None): async def ask_ai(expression: str, now: datetime.datetime | None = None) -> tuple[datetime.datetime | None, str]: if now is None: now = datetime.datetime.now() - prompt = SYSTEM_PROMPT.replace("DATETIME", str(now)) + prompt = SYSTEM_PROMPT.replace("DATETIME", f"{now}, 星期 {now.weekday() + 1}") - llm = get_llm() + is_safe = await AlibabaGreen.detect(expression) + if not is_safe: + return None, "" + + llm = get_llm("qwen3-max") message = await llm.chat([ { "role": "system", "content": prompt }, { "role": "user", "content": expression }, diff --git a/poetry.lock b/poetry.lock index af13460..972e6ee 100644 --- a/poetry.lock +++ b/poetry.lock @@ -20,6 +20,23 @@ type = "legacy" url = "https://pypi.tuna.tsinghua.edu.cn/simple" reference = "mirrors" +[[package]] +name = "aiofiles" +version = "24.1.0" +description = "File support for asyncio." +optional = false +python-versions = ">=3.8" +groups = ["main"] +files = [ + {file = "aiofiles-24.1.0-py3-none-any.whl", hash = "sha256:b4ec55f4195e3eb5d7abd1bf7e061763e864dd4954231fb8539a0ef8bb8260e5"}, + {file = "aiofiles-24.1.0.tar.gz", hash = "sha256:22a075c9e5a3810f0c2e48f3008c94d68c65d763b9b03857924c99e57355166c"}, +] + +[package.source] +type = "legacy" +url = "https://pypi.tuna.tsinghua.edu.cn/simple" +reference = "mirrors" + [[package]] name = "aiohappyeyeballs" version = "2.6.1" @@ -233,6 +250,187 @@ type = "legacy" url = "https://pypi.tuna.tsinghua.edu.cn/simple" reference = "mirrors" +[[package]] +name = "alibabacloud-credentials" +version = "1.0.3" +description = "The alibabacloud credentials module of alibabaCloud Python SDK." +optional = false +python-versions = ">=3.7" +groups = ["main"] +files = [ + {file = "alibabacloud-credentials-1.0.3.tar.gz", hash = "sha256:9d8707e96afc6f348e23f5677ed15a21c2dfce7cfe6669776548ee4c80e1dfaf"}, + {file = "alibabacloud_credentials-1.0.3-py3-none-any.whl", hash = "sha256:30c8302f204b663c655d97e1c283ee9f9f84a6257d7901b931477d6cf34445a8"}, +] + +[package.dependencies] +aiofiles = ">=22.1.0,<25.0.0" +alibabacloud-credentials-api = ">=1.0.0,<2.0.0" +alibabacloud-tea = ">=0.4.0" +APScheduler = ">=3.10.0,<4.0.0" + +[package.source] +type = "legacy" +url = "https://pypi.tuna.tsinghua.edu.cn/simple" +reference = "mirrors" + +[[package]] +name = "alibabacloud-credentials-api" +version = "1.0.0" +description = "Alibaba Cloud Gateway SPI SDK Library for Python" +optional = false +python-versions = ">=3.7" +groups = ["main"] +files = [ + {file = "alibabacloud-credentials-api-1.0.0.tar.gz", hash = "sha256:8c340038d904f0218d7214a8f4088c31912bfcf279af2cbc7d9be4897a97dd2f"}, +] + +[package.source] +type = "legacy" +url = "https://pypi.tuna.tsinghua.edu.cn/simple" +reference = "mirrors" + +[[package]] +name = "alibabacloud-endpoint-util" +version = "0.0.4" +description = "The endpoint-util module of alibabaCloud Python SDK." +optional = false +python-versions = "*" +groups = ["main"] +files = [ + {file = "alibabacloud_endpoint_util-0.0.4.tar.gz", hash = "sha256:a593eb8ddd8168d5dc2216cd33111b144f9189fcd6e9ca20e48f358a739bbf90"}, +] + +[package.source] +type = "legacy" +url = "https://pypi.tuna.tsinghua.edu.cn/simple" +reference = "mirrors" + +[[package]] +name = "alibabacloud-gateway-spi" +version = "0.0.3" +description = "Alibaba Cloud Gateway SPI SDK Library for Python" +optional = false +python-versions = ">=3.6" +groups = ["main"] +files = [ + {file = "alibabacloud_gateway_spi-0.0.3.tar.gz", hash = "sha256:10d1c53a3fc5f87915fbd6b4985b98338a776e9b44a0263f56643c5048223b8b"}, +] + +[package.dependencies] +alibabacloud_credentials = ">=0.3.4" + +[package.source] +type = "legacy" +url = "https://pypi.tuna.tsinghua.edu.cn/simple" +reference = "mirrors" + +[[package]] +name = "alibabacloud-green20220302" +version = "3.0.1" +description = "Alibaba Cloud Green (20220302) SDK Library for Python" +optional = false +python-versions = ">=3.6" +groups = ["main"] +files = [ + {file = "alibabacloud_green20220302-3.0.1-py3-none-any.whl", hash = "sha256:01cd4a402f8de45423cf5c52c59fc696255ef5f291c3e1e10ac4985033e3e1d9"}, + {file = "alibabacloud_green20220302-3.0.1.tar.gz", hash = "sha256:083ad03e7c553ec127b69ad5b039f42aaac10730784df319ead2f8a0d8ee928a"}, +] + +[package.dependencies] +alibabacloud-endpoint-util = ">=0.0.4,<1.0.0" +alibabacloud-openapi-util = ">=0.2.2,<1.0.0" +alibabacloud-tea-openapi = ">=0.3.16,<1.0.0" +alibabacloud-tea-util = ">=0.3.13,<1.0.0" + +[package.source] +type = "legacy" +url = "https://pypi.tuna.tsinghua.edu.cn/simple" +reference = "mirrors" + +[[package]] +name = "alibabacloud-openapi-util" +version = "0.2.2" +description = "Aliyun Tea OpenApi Library for Python" +optional = false +python-versions = "*" +groups = ["main"] +files = [ + {file = "alibabacloud_openapi_util-0.2.2.tar.gz", hash = "sha256:ebbc3906f554cb4bf8f513e43e8a33e8b6a3d4a0ef13617a0e14c3dda8ef52a8"}, +] + +[package.dependencies] +alibabacloud_tea_util = ">=0.0.2" +cryptography = ">=3.0.0" + +[package.source] +type = "legacy" +url = "https://pypi.tuna.tsinghua.edu.cn/simple" +reference = "mirrors" + +[[package]] +name = "alibabacloud-tea" +version = "0.4.3" +description = "The tea module of alibabaCloud Python SDK." +optional = false +python-versions = ">=3.7" +groups = ["main"] +files = [ + {file = "alibabacloud-tea-0.4.3.tar.gz", hash = "sha256:ec8053d0aa8d43ebe1deb632d5c5404339b39ec9a18a0707d57765838418504a"}, +] + +[package.dependencies] +aiohttp = ">=3.7.0,<4.0.0" +requests = ">=2.21.0,<3.0.0" + +[package.source] +type = "legacy" +url = "https://pypi.tuna.tsinghua.edu.cn/simple" +reference = "mirrors" + +[[package]] +name = "alibabacloud-tea-openapi" +version = "0.4.2" +description = "Alibaba Cloud openapi SDK Library for Python" +optional = false +python-versions = ">=3.7" +groups = ["main"] +files = [ + {file = "alibabacloud_tea_openapi-0.4.2-py3-none-any.whl", hash = "sha256:c498065a297fd1972ed7709ef935c9ce1f9757f267f68933de6e63853f37366f"}, + {file = "alibabacloud_tea_openapi-0.4.2.tar.gz", hash = "sha256:0a8d79374ca692469472355a125969c8a22cc5fb08328c75c26663ccf5c8b168"}, +] + +[package.dependencies] +alibabacloud-credentials = ">=1.0.2,<2.0.0" +alibabacloud-gateway-spi = ">=0.0.2,<1.0.0" +alibabacloud-tea-util = ">=0.3.13,<1.0.0" +cryptography = ">=3.0.0,<45.0.0" +darabonba-core = ">=1.0.3,<2.0.0" + +[package.source] +type = "legacy" +url = "https://pypi.tuna.tsinghua.edu.cn/simple" +reference = "mirrors" + +[[package]] +name = "alibabacloud-tea-util" +version = "0.3.14" +description = "The tea-util module of alibabaCloud Python SDK." +optional = false +python-versions = ">=3.6" +groups = ["main"] +files = [ + {file = "alibabacloud_tea_util-0.3.14-py3-none-any.whl", hash = "sha256:10d3e5c340d8f7ec69dd27345eb2fc5a1dab07875742525edf07bbe86db93bfe"}, + {file = "alibabacloud_tea_util-0.3.14.tar.gz", hash = "sha256:708e7c9f64641a3c9e0e566365d2f23675f8d7c2a3e2971d9402ceede0408cdb"}, +] + +[package.dependencies] +alibabacloud-tea = ">=0.3.3" + +[package.source] +type = "legacy" +url = "https://pypi.tuna.tsinghua.edu.cn/simple" +reference = "mirrors" + [[package]] name = "annotated-doc" version = "0.0.3" @@ -982,6 +1180,93 @@ type = "legacy" url = "https://pypi.tuna.tsinghua.edu.cn/simple" reference = "mirrors" +[[package]] +name = "cryptography" +version = "44.0.3" +description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." +optional = false +python-versions = ">=3.7, !=3.9.0, !=3.9.1" +groups = ["main"] +files = [ + {file = "cryptography-44.0.3-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:962bc30480a08d133e631e8dfd4783ab71cc9e33d5d7c1e192f0b7c06397bb88"}, + {file = "cryptography-44.0.3-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4ffc61e8f3bf5b60346d89cd3d37231019c17a081208dfbbd6e1605ba03fa137"}, + {file = "cryptography-44.0.3-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:58968d331425a6f9eedcee087f77fd3c927c88f55368f43ff7e0a19891f2642c"}, + {file = "cryptography-44.0.3-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:e28d62e59a4dbd1d22e747f57d4f00c459af22181f0b2f787ea83f5a876d7c76"}, + {file = "cryptography-44.0.3-cp37-abi3-manylinux_2_28_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:af653022a0c25ef2e3ffb2c673a50e5a0d02fecc41608f4954176f1933b12359"}, + {file = "cryptography-44.0.3-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:157f1f3b8d941c2bd8f3ffee0af9b049c9665c39d3da9db2dc338feca5e98a43"}, + {file = "cryptography-44.0.3-cp37-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:c6cd67722619e4d55fdb42ead64ed8843d64638e9c07f4011163e46bc512cf01"}, + {file = "cryptography-44.0.3-cp37-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:b424563394c369a804ecbee9b06dfb34997f19d00b3518e39f83a5642618397d"}, + {file = "cryptography-44.0.3-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:c91fc8e8fd78af553f98bc7f2a1d8db977334e4eea302a4bfd75b9461c2d8904"}, + {file = "cryptography-44.0.3-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:25cd194c39fa5a0aa4169125ee27d1172097857b27109a45fadc59653ec06f44"}, + {file = "cryptography-44.0.3-cp37-abi3-win32.whl", hash = "sha256:3be3f649d91cb182c3a6bd336de8b61a0a71965bd13d1a04a0e15b39c3d5809d"}, + {file = "cryptography-44.0.3-cp37-abi3-win_amd64.whl", hash = "sha256:3883076d5c4cc56dbef0b898a74eb6992fdac29a7b9013870b34efe4ddb39a0d"}, + {file = "cryptography-44.0.3-cp39-abi3-macosx_10_9_universal2.whl", hash = "sha256:5639c2b16764c6f76eedf722dbad9a0914960d3489c0cc38694ddf9464f1bb2f"}, + {file = "cryptography-44.0.3-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f3ffef566ac88f75967d7abd852ed5f182da252d23fac11b4766da3957766759"}, + {file = "cryptography-44.0.3-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:192ed30fac1728f7587c6f4613c29c584abdc565d7417c13904708db10206645"}, + {file = "cryptography-44.0.3-cp39-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:7d5fe7195c27c32a64955740b949070f21cba664604291c298518d2e255931d2"}, + {file = "cryptography-44.0.3-cp39-abi3-manylinux_2_28_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:3f07943aa4d7dad689e3bb1638ddc4944cc5e0921e3c227486daae0e31a05e54"}, + {file = "cryptography-44.0.3-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:cb90f60e03d563ca2445099edf605c16ed1d5b15182d21831f58460c48bffb93"}, + {file = "cryptography-44.0.3-cp39-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:ab0b005721cc0039e885ac3503825661bd9810b15d4f374e473f8c89b7d5460c"}, + {file = "cryptography-44.0.3-cp39-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:3bb0847e6363c037df8f6ede57d88eaf3410ca2267fb12275370a76f85786a6f"}, + {file = "cryptography-44.0.3-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:b0cc66c74c797e1db750aaa842ad5b8b78e14805a9b5d1348dc603612d3e3ff5"}, + {file = "cryptography-44.0.3-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:6866df152b581f9429020320e5eb9794c8780e90f7ccb021940d7f50ee00ae0b"}, + {file = "cryptography-44.0.3-cp39-abi3-win32.whl", hash = "sha256:c138abae3a12a94c75c10499f1cbae81294a6f983b3af066390adee73f433028"}, + {file = "cryptography-44.0.3-cp39-abi3-win_amd64.whl", hash = "sha256:5d186f32e52e66994dce4f766884bcb9c68b8da62d61d9d215bfe5fb56d21334"}, + {file = "cryptography-44.0.3-pp310-pypy310_pp73-macosx_10_9_x86_64.whl", hash = "sha256:cad399780053fb383dc067475135e41c9fe7d901a97dd5d9c5dfb5611afc0d7d"}, + {file = "cryptography-44.0.3-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:21a83f6f35b9cc656d71b5de8d519f566df01e660ac2578805ab245ffd8523f8"}, + {file = "cryptography-44.0.3-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:fc3c9babc1e1faefd62704bb46a69f359a9819eb0292e40df3fb6e3574715cd4"}, + {file = "cryptography-44.0.3-pp310-pypy310_pp73-manylinux_2_34_aarch64.whl", hash = "sha256:e909df4053064a97f1e6565153ff8bb389af12c5c8d29c343308760890560aff"}, + {file = "cryptography-44.0.3-pp310-pypy310_pp73-manylinux_2_34_x86_64.whl", hash = "sha256:dad80b45c22e05b259e33ddd458e9e2ba099c86ccf4e88db7bbab4b747b18d06"}, + {file = "cryptography-44.0.3-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:479d92908277bed6e1a1c69b277734a7771c2b78633c224445b5c60a9f4bc1d9"}, + {file = "cryptography-44.0.3-pp311-pypy311_pp73-macosx_10_9_x86_64.whl", hash = "sha256:896530bc9107b226f265effa7ef3f21270f18a2026bc09fed1ebd7b66ddf6375"}, + {file = "cryptography-44.0.3-pp311-pypy311_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:9b4d4a5dbee05a2c390bf212e78b99434efec37b17a4bff42f50285c5c8c9647"}, + {file = "cryptography-44.0.3-pp311-pypy311_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:02f55fb4f8b79c1221b0961488eaae21015b69b210e18c386b69de182ebb1259"}, + {file = "cryptography-44.0.3-pp311-pypy311_pp73-manylinux_2_34_aarch64.whl", hash = "sha256:dd3db61b8fe5be220eee484a17233287d0be6932d056cf5738225b9c05ef4fff"}, + {file = "cryptography-44.0.3-pp311-pypy311_pp73-manylinux_2_34_x86_64.whl", hash = "sha256:978631ec51a6bbc0b7e58f23b68a8ce9e5f09721940933e9c217068388789fe5"}, + {file = "cryptography-44.0.3-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:5d20cc348cca3a8aa7312f42ab953a56e15323800ca3ab0706b8cd452a3a056c"}, + {file = "cryptography-44.0.3.tar.gz", hash = "sha256:fe19d8bc5536a91a24a8133328880a41831b6c5df54599a8417b62fe015d3053"}, +] + +[package.dependencies] +cffi = {version = ">=1.12", markers = "platform_python_implementation != \"PyPy\""} + +[package.extras] +docs = ["sphinx (>=5.3.0)", "sphinx-rtd-theme (>=3.0.0) ; python_version >= \"3.8\""] +docstest = ["pyenchant (>=3)", "readme-renderer (>=30.0)", "sphinxcontrib-spelling (>=7.3.1)"] +nox = ["nox (>=2024.4.15)", "nox[uv] (>=2024.3.2) ; python_version >= \"3.8\""] +pep8test = ["check-sdist ; python_version >= \"3.8\"", "click (>=8.0.1)", "mypy (>=1.4)", "ruff (>=0.3.6)"] +sdist = ["build (>=1.0.0)"] +ssh = ["bcrypt (>=3.1.5)"] +test = ["certifi (>=2024)", "cryptography-vectors (==44.0.3)", "pretend (>=0.7)", "pytest (>=7.4.0)", "pytest-benchmark (>=4.0)", "pytest-cov (>=2.10.1)", "pytest-xdist (>=3.5.0)"] +test-randomorder = ["pytest-randomly"] + +[package.source] +type = "legacy" +url = "https://pypi.tuna.tsinghua.edu.cn/simple" +reference = "mirrors" + +[[package]] +name = "darabonba-core" +version = "1.0.4" +description = "The darabonba module of alibabaCloud Python SDK." +optional = false +python-versions = ">=3.7" +groups = ["main"] +files = [ + {file = "darabonba_core-1.0.4-py3-none-any.whl", hash = "sha256:4c3bc1d76d5af1087297b6afde8e960ea2f54f93e725e2df8453f0b4bb27dd24"}, + {file = "darabonba_core-1.0.4.tar.gz", hash = "sha256:6ede4e9bfd458148bab19ab2331716ae9b5c226ba5f6d221de6f88ee65704137"}, +] + +[package.dependencies] +aiohttp = ">=3.7.0,<4.0.0" +alibabacloud-tea = "*" +requests = ">=2.21.0,<3.0.0" + +[package.source] +type = "legacy" +url = "https://pypi.tuna.tsinghua.edu.cn/simple" +reference = "mirrors" + [[package]] name = "distro" version = "1.9.0" @@ -4681,4 +4966,4 @@ reference = "mirrors" [metadata] lock-version = "2.1" python-versions = ">=3.12,<4.0" -content-hash = "2c341fdc0d5b29ad3b24516c46e036b2eff4c11e244047d114971039255c2ac4" +content-hash = "194661c8f97e7ec5f21603e625aa70d0d2ae4e0b47f10de1578e5f042f3baaf1" diff --git a/pyproject.toml b/pyproject.toml index 4691cd4..da09a50 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,6 +29,7 @@ dependencies = [ "imageio (>=2.37.2,<3.0.0)", "aiosqlite (>=0.20.0,<1.0.0)", "sqlparse (>=0.5.0,<1.0.0)", + "alibabacloud-green20220302 (>=3.0.1,<4.0.0)", ] [tool.poetry]