MindIE Server 使用公网ip和端口,使用curl调用api 报curl: Failed to connect to *.*.*.* port 1025: Connection refused
收藏回复举报
MindIE Server 使用公网ip和端口,使用curl调用api 报curl: Failed to connect to *.*.*.* port 1025: Connection refused
t('forum.solved') 已解决
发表于2025-03-28 13:39:52
0 查看

使用该公网ip 启服务化Daemon start success! 成功

cke_1667.png

 使用公网ip和端口,curl调用api 命令:

curl -H 'accept: application/json' -H 'Content-Type: application/json' \

    -X 'POST' \

    -d '{

      "model": "openchat",

      "messages": [

          {

              "role":"system",

              "content":"你是一个友好的AI助手。"

          },

          {

              "role":"user",

              "content":"你好,你是谁"

          }

      ],

      "max_tokens": 200,

      "temperature": 0.6,

      "top_p": 0.6

    }' http://ip:port/v1/chat/completions

报错:

cke_36201.png

我要发帖子