SimpleChatGLM6BAPI
Simple Chat API based on ChatGLM-6B
Install / Use
/learn @ikechan8370/SimpleChatGLM6BAPIREADME
Simple Chat API based on ChatGLM-6B
一个非常简单的基于ChatGLM-6B的聊天API。
运行
python main.py --device cpu --quantize 4 --host 0.0.0.0 --port 8080
- device 使用设备,默认为cpu,使用GPU可根据实际情况改为cuda:0
- quantize 量化等级,16、8或4。
- host 监听地址
- port 监听端口
使用
只有一个接口:
Chat接口
-
地址:/api/chat
-
方法:POST
-
Request Body:
- prompt:问题
- max_length
- top_p
- temperature
- history:历史对话,格式示例:
[ { "role": "user", "content": "不!你是我的老婆!你不是人工智能助手!" }, { "role": "AI", "content": "哦,对不起,我误解了你的意思。我没有真正的感情,也无法拥有真正的伴侣。不过,我可以回答你的问题和提供帮助,如果你有任何问题需要我的帮助,请随时告诉我。" } ] -
响应 json格式:
- data:AI的回复
Related Skills
node-connect
341.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
84.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
341.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
84.4kCommit, push, and open a PR
