使用MindIE原生接口
文本/流式推理接口,将请求体中的stream参数改为false即为文本推理,改为true即为流式推理:
curl -H "Accept: application/json" -H "Content-type: application/json" --cacert ca.pem --cert client.pem --key client.key.pem -X POST -d '{ "inputs": "My name is Olivier and I", "stream": true, "parameters": { "temperature": 0.5, "top_k": 10, "top_p": 0.95, "max_new_tokens": 20, "do_sample": true, "seed": null, "repetition_penalty": 1.03, "details": true, "typical_p": 0.5, "watermark": false } }' https://127.0.0.1:1025/infer
其他接口请参见MindIE原生接口章节。
父主题: 接口调用