Skip to main content

WenXinAPI is a simple wrapper for the official WenXin API

Project description

WenXinAPI

PyPi

对百度文心一言API的简单封装,支持多用户上下文对话 github地址

安装

python -m pip install --upgrade WenXinAPI

支持Python版本

  • 最小版本 - Python3.6
  • 推荐 - Python3.8+

使用方法

配置方法

  1. 在百度智能云的 文心千帆平台 上申请使用资格
  2. 在控制台 应用列表页面 创建应用
  3. 获取并保存API_KEY和SECRET_KEY

使用示例(异步流式)

from WenXinAPI.V1 import ChatBot
chatbot = ChatBot(
    api_key="<your API_KEY>",
    secret_key="<your SECRET_KEY>",
    engine="<ENGINE you choose>"
)
print(await chatbot.ask("你好!"))

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

revWenXin-1.0.2.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

revWenXin-1.0.2-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

Details for the file revWenXin-1.0.2.tar.gz.

File metadata

  • Download URL: revWenXin-1.0.2.tar.gz
  • Upload date:
  • Size: 11.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.1

File hashes

Hashes for revWenXin-1.0.2.tar.gz
Algorithm Hash digest
SHA256 622b98cc99e6c60975483fab22a8090ba68ecfb55c343739cbf09e939960c26b
MD5 367f2efffac9ef15aa6d0062db068350
BLAKE2b-256 a56d6197b7daf4b2264d2c0bac002cdf8da6c88b98b3c3b3eb95b8fa1fbef9aa

See more details on using hashes here.

Provenance

File details

Details for the file revWenXin-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: revWenXin-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 11.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.1

File hashes

Hashes for revWenXin-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4a18a31073bc7f5d041df144c7b3b6f1aeaabdbe347198c0c74b75634c0cc0fa
MD5 883a5f57a972ab93d48f14ab72beb6de
BLAKE2b-256 fdce51069f1a068695d8c91e7f2df9f8b783949b5720c68abfa70bf8d2d1db12

See more details on using hashes here.

Provenance

Supported by

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