Skip to content

help request: How to represent the LLM #13121

@liuxiaobo007

Description

@liuxiaobo007

Description

  1. 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
    }'
Image
  1. 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"
    }
    }'
Image Image

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
}'

Image

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionlabel for questions asked by users

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions