Description
- Call the LLM directly:
curl https://api-inference.modelscope.cn/v1/chat/completions
-H "Content-Type: application/json"
-H "Authorization: Bearer xxxxxxxxxxxxxxxx"
-d '{
"model": "deepseek-ai/DeepSeek-R1-Distill-Qwen-7B",
"messages": [
{"role": "user", "content": "hello"}
],
"stream": false
}'
- Add a route in APISIX:
curl -X PUT http://127.0.0.1:9180/apisix/admin/routes/1
-d '{
"uri": "/v1/chat/completions",
"upstream": {
"nodes": {
"api-inference.modelscope.cn:443": 1
},
"type": "roundrobin",
"scheme": "https"
}
}'
3.Calling LLM through APISIX:
curl -X POST "http://127.0.0.1:9080/v1/chat/completions"
-H "Content-Type: application/json"
-H "Authorization: Bearer xxxxxxxxxxx"
-d '{
"model": "deepseek-ai/DeepSeek-R1-Distill-Qwen-7B",
"messages": [
{"role": "user", "content": "你是谁"}
],
"stream": false
}'
I checked it again and again, but found nothing wrong. Why didn't I successfully represent the big model?
I'm using the curl-sl https://run.api7.ai/apisix/quickstart | sh command to deploy APISIX directly.
Environment
- APISIX version (run
apisix version):3.15
- Operating system (run
uname -a):Rocky Linux-8.10
- OpenResty / Nginx version (run
openresty -V or nginx -V):
- etcd version, if relevant (run
curl http://127.0.0.1:9090/v1/server_info):
- APISIX Dashboard version, if relevant:
- Plugin runner version, for issues related to plugin runners:
- LuaRocks version, for installation issues (run
luarocks --version):
Description
curl https://api-inference.modelscope.cn/v1/chat/completions
-H "Content-Type: application/json"
-H "Authorization: Bearer xxxxxxxxxxxxxxxx"
-d '{
"model": "deepseek-ai/DeepSeek-R1-Distill-Qwen-7B",
"messages": [
{"role": "user", "content": "hello"}
],
"stream": false
}'
curl -X PUT http://127.0.0.1:9180/apisix/admin/routes/1
-d '{
"uri": "/v1/chat/completions",
"upstream": {
"nodes": {
"api-inference.modelscope.cn:443": 1
},
"type": "roundrobin",
"scheme": "https"
}
}'
3.Calling LLM through APISIX:
curl -X POST "http://127.0.0.1:9080/v1/chat/completions"
-H "Content-Type: application/json"
-H "Authorization: Bearer xxxxxxxxxxx"
-d '{
"model": "deepseek-ai/DeepSeek-R1-Distill-Qwen-7B",
"messages": [
{"role": "user", "content": "你是谁"}
],
"stream": false
}'
I checked it again and again, but found nothing wrong. Why didn't I successfully represent the big model?
I'm using the curl-sl https://run.api7.ai/apisix/quickstart | sh command to deploy APISIX directly.
Environment
apisix version):3.15uname -a):Rocky Linux-8.10openresty -Vornginx -V):curl http://127.0.0.1:9090/v1/server_info):luarocks --version):