Skip to main content

万网AI云平台SDK

Project description

WWAI云平台SDK

参数注入方式

参数名称 描述
server WWAI云平台地址,默认为 http://ai.api.wwai.wwxckj.com
grant_type 授权类型,支持password、client_credential,默认为 client_credential
authorization 客户端模式时的授权信息,路径:系统管理 > 终端管理 > 新建终端
username 密码模式时的用户名
password 密码模式时的密码
tenant_code 密码模式时的租户号
cache_type 缓存类型,支持 redis、local,默认为 local
redis_host redis地址,默认为 localhost
redis_port redis端口,默认为 6379
redis_password redis密码,默认为 None
redis_db redis数据库,默认为 0

环境变量方式

环境变量名称 描述
WWAI_SERVER WWAI云平台地址,默认为 http://ai.api.wwai.wwxckj.com
WWAI_GRANT_TYPE 授权类型,默认为 client_credential
WWAI_AUTHORIZATION 客户端模式时的授权信息,路径:系统管理 > 终端管理 > 新建终端
WWAI_USERNAME 密码模式的用户名
WWAI_PASSWORD 密码模式的密码
WWAI_TENANT_CODE 密码模式时的租户号
WWAI_CACHE_TYPE 缓存类型,默认为 local,支持 redis、local
REDIS_HOST redis地址,默认为 localhost
REDIS_PORT redis端口,默认为 6379
REDIS_PASSWORD redis密码,默认为 None
REDIS_DB redis数据库,默认为 0

功能矩阵

接口名称 描述
ocr_idcard 身份证识别
ocr_vehicle 行驶证识别
ocr_driving_license 行驶证驾驶证识别
ocr_vehicle_certificate 机动车登记证书识别
ocr_invoice 发票识别
ocr_bank_card 银行卡识别
other_classify 通用图片分类
ocr_img_quality 图片质量检测
ocr_cards_correction 卡片矫正
ocr_cards_angle 卡片矫正角度检测
ocr_car_plate_detection 车牌检测
ocr_common 通用文字识别
ocr_chat_ocr 关键信息识别
ocr_handwriting 手写识字识别
ocr_entity_mosaic 图像实体信息打码
speech_asr_iat 讯飞短语音识别
aigc_models AIGC模型列表
huaweicloud_obs_get_ak_sk 获取临时OBS的 AK/SK
face_compare_face_image 人脸图片比对
tts_offline 离线语音合成
llm_generate 大模型文本生成
llm_car_info_identify 基于大模型判断文本中的信息是否与车有关
llm_text_extract_json 基于大模型提取文本中的关键信息
llm_sensitive_word_detection 基于大模型检测文本中是否包含敏感词
data_center_dealer_address 数据中心-获取车商地址

demo 示例

pip install wwai-sdk
import wwai_sdk
import asyncio

# grant_type="client_credential" 为客户端模式
# authorization 从WWAI云平台获取,路径:系统管理 > 终端管理 > 新建终端
client = wwai_sdk.create_client(
    grant_type="client_credential",
    authorization="Basic xxxxxxx"
)

# 身份证识别
res = asyncio.run(client.ocr_idcard("https://ai.bdstatic.com/file/96D2F45674F54D4287EB9FBF9E6AB19A", "front"))
print(res)

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

wwai_sdk-0.0.10-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

Details for the file wwai_sdk-0.0.10-py3-none-any.whl.

File metadata

  • Download URL: wwai_sdk-0.0.10-py3-none-any.whl
  • Upload date:
  • Size: 12.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for wwai_sdk-0.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 d212f85850b6f0028ecf3aadbcf3bccf6b12d46c0fc239d470affbb241f51c7a
MD5 54a1ecfe4dbeca0ef4758ccf4d4cce98
BLAKE2b-256 044dab587fd5cba1dbf4818d87133a7dde07b2b00a5adaf893aa0b8b0d907a20

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