chat glm client for api
Project description
chatglmclient
集微工具箱,包括各种常用操作,后续不断完善
构建
在项目文件夹中运行以下命令
python setup.py sdist bdist_wheel
上传:
python -m twine upload --repository-url https://upload.pypi.org/legacy/ dist/*
或
python -m twine upload dist/*
按照提示,输入pypi的用户名、密码,就可以成功了。若中途提示有些库没有安装,则使用pip安装一下,需要用到twine库。
使用
安装或更新
pip3 install chatglmclient pip3 install --upgrade chatglmclient
代码使用
from chatglmclient.chatglm_client import ChatGLMClient
client = ChatGLMClient(params={'api_host': "http://192.168.1.111:5000"})
prompt = {
"prompt": "一只狗有几条腿",
"history": []
}
result, info = client.chat(prompt)
print(
result,
info,
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
chatglmclient-0.1.0.tar.gz
(4.0 kB
view hashes)
Built Distribution
Close
Hashes for chatglmclient-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c1bbf5c58548518efbcf11294deea0e9665e377d89207945af4fb5d18a09c9f4 |
|
MD5 | 276052be8eff8a7a7091f27d7a4656db |
|
BLAKE2b-256 | c8e52ea25c4285a720128ebdf1aa4a724c8179546d09ca84db9be1fc3453a2b7 |