Comments (1)
@FreshmanLi 可以的
import json
import requests
response = requests.post(
url='http://[你服务的公网IP]:8000/v1/chat/completions',
headers={
'Authorization': 'Bearer eyJhbGciO...'
},
data=json.dumps({
# model随意填写或者填智能体ID
'model': 'glm4',
'messages': [
{
'role': 'user',
'message': '你好'
}
],
# 不使用流式,流式建议使用openai客户端
'stream': False
})
)
from glm-free-api.
Related Issues (20)
- 求助大佬,如何部署在hugging face的space中 HOT 4
- token统计建议 HOT 1
- GPT4可以用类似的方式进行逆向吗 HOT 1
- 求助:在使用dify时 如何传递智能体id HOT 1
- 在宝塔面板上怎么设置反代 HOT 1
- OpenAI 的啥时候整一个不 HOT 1
- 处理url带models的请求 HOT 9
- 为什么测速等待时间很长 HOT 4
- 有没有lobe-chat这类客户端的具体接入教程 HOT 3
- 智谱现在是不是token很快就会过期啊? HOT 1
- 接入gpt_academic使用时,遇到SSL: WRONG_VERSION_NUMBER HOT 5
- [FR] 多服务同时请求应对机制 HOT 3
- {'code': -2001, 'message': '[请求glm失败]: bad request', 'data': None} HOT 2
- npm部署的服务可以设置开机自启动吗? HOT 1
- 求助,部署时报错 HOT 1
- 似乎EN版没有chatglm_refresh_token HOT 5
- [FR] Token 写到一个文件中被读取 HOT 9
- 可以具体解释一下怎么上传文件吗? HOT 1
- 假装这不是一个issues HOT 1
- 图像生成的接口好像不行了
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from glm-free-api.