使用兼容vLLM 0.2.6版本接口
文本/流式推理接口,将请求体中的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 '{ "prompt": "My name is Olivier and I", "max_tokens": 20, "repetition_penalty": 1.03, "presence_penalty": 1.2, "frequency_penalty": 1.2, "temperature": 0.5, "top_k": 10, "top_p": 0.95, "stream": false, "ignore_eos": false }' https://127.0.0.1:1025/generate
其他接口请参见兼容vLLM 0.2.6版本接口章节。
父主题: 接口调用