使用兼容TGI 0.9.4版本的接口
- 文本推理接口:
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", "parameters": { "decoder_input_details": true, "details": true, "do_sample": true, "max_new_tokens": 20, "repetition_penalty": 1.03, "return_full_text": false, "seed": null, "temperature": 0.5, "top_k": 10, "top_p": 0.95, "truncate": null } }' https://127.0.0.1:1025/generate
- 流式推理接口:
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", "parameters": { "decoder_input_details": true, "details": true, "do_sample": true, "max_new_tokens": 20, "repetition_penalty": 1.03, "return_full_text": false, "seed": null, "temperature": 0.5, "top_k": 10, "top_p": 0.95, "truncate": null } }' https://127.0.0.1:1025/generate_stream
其他接口请参见兼容TGI 0.9.4版本接口章节。
父主题: 使用接口说明