Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

chatglmclient

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chatglmclient

chat glm client for api

  • 0.1.2
  • PyPI
  • Socket score

Maintainers
1

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,
)

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc