ChatGLM-Tuning icon indicating copy to clipboard operation
ChatGLM-Tuning copied to clipboard

curl -X POST "http://127.0.0.1:8000" -H 'Content-Type: application/json' -d '{"prompt": "你是谁", "history": []}'

Open cristianohello opened this issue 1 year ago • 5 comments

命令行输入curl -X POST "http://127.0.0.1:8000" -H 'Content-Type: application/json' -d '{"prompt": "你是谁", "history": []}' 可以成功。 但是浏览器输入http://127.0.0.1:8000,无法访问?这是为什么

cristianohello avatar Apr 18 '23 03:04 cristianohello

我也是翻墙用的colab,生成的URL也无法访问。不知道怎么解。

dongdongrj avatar Apr 18 '23 06:04 dongdongrj

命令行输入curl -X POST "http://127.0.0.1:8000" -H 'Content-Type: application/json' -d '{"prompt": "你是谁", "history": []}' 可以成功。 但是浏览器输入http://127.0.0.1:8000,无法访问?这是为什么

是windows本机吗?

suc16 avatar Apr 19 '23 08:04 suc16

@suc16 是的,window本机,租的算力平台跑的模型

cristianohello avatar Apr 21 '23 03:04 cristianohello

@suc16 是的,window本机,租的算力平台跑的模型

浏览器访问相当于是 get http://127.0.0.1:8000 ,但命令行是 post,访问不了正常吧?你可以用postman来测试。

suc16 avatar Apr 21 '23 03:04 suc16

@suc16 这样的话,如何改代码,怎么才能在本机访问http://127.0.0.1:8000/呢?

cristianohello avatar Apr 21 '23 03:04 cristianohello