WenXinAPI is a simple wrapper for the official WenXin API
Project description
WenXinAPI
对百度文心一言API的简单封装,支持多用户上下文对话 github地址
安装
python -m pip install --upgrade WenXinAPI
支持Python版本
- 最小版本 - Python3.6
- 推荐 - Python3.8+
使用方法
配置方法
使用示例(异步流式)
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.4.tar.gz
(12.1 kB
view details)
File details
Details for the file revWenXin-1.0.4.tar.gz
.
File metadata
- Download URL: revWenXin-1.0.4.tar.gz
- Upload date:
- Size: 12.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d1a591c9e62345453960279909b12285e3614e6354d63f382f496c72afd6c9d7 |
|
MD5 | 1596f2e64313a2317cb860b43a7876ee |
|
BLAKE2b-256 | e74b90d3b3ba7daed266d4a9ee3dc816a67cd410926979dad6c7839bd6504b9a |