Skip to main content

chat glm client for api

Project description

chatglmclient

ChatGLM Client,对 api 访问进行封装,方便调用

构建

在项目文件夹中运行以下命令

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


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.2.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

chatglmclient-0.1.2-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file chatglmclient-0.1.2.tar.gz.

File metadata

  • Download URL: chatglmclient-0.1.2.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for chatglmclient-0.1.2.tar.gz
Algorithm Hash digest
SHA256 b30d7b1cec8722c4277265faf7101ad5152d0085b57c252e94176ef53c4d7ee6
MD5 897bc2701ee64fdd254ce2157cf31a90
BLAKE2b-256 a82af062b8df6f220070a7ded6081fe8e942e81f8c0cfecc552e64b30f3c999e

See more details on using hashes here.

File details

Details for the file chatglmclient-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for chatglmclient-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9b34a4ad2d1fe767c25d3d1a4ae0e6d2c71235fbf64020bfe69d68e3b5811e20
MD5 6739e6f210e0830b010aba18268b0c78
BLAKE2b-256 069c98aff0b92188a6678211cc80302dfe3c89bd914c2b9c601fe4c5fc68f1fb

See more details on using hashes here.

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