
只是好奇做了一下测试, 发现即使远超这个 tokens 限制, 也是能正常回复的:
测试数据:
<script src="https://gist.github.com/FaiChou/a01fb13cd332910ee7877e32572fbd3f.js"></script>测试代码:
curl https://api.openai.com/v1/chat/completions \ -H "Content-Type: application/json" \ -H "Authorization: Bearer sk-XXX" \ -d @gpt3.5-test-messages.json -i -o response.txt 返回数据:
<script src="https://gist.github.com/FaiChou/776ed61de0f5d1cee0209ed7e18d8aae.js"></script> 1 ethusdt OP |
2 ethusdt OP 哎 我记得 V2EX gist 能够展示来着? |
3 ethusdt OP |
4 ethusdt OP |
5 yinmin 2023-05-04 17:39:07 +08:00 via iPhone 你在发送数据的时候去掉 stream ,openai 在返回数据包里会告诉你具体的 token 数,看看有没有超。 |
6 mashihua 2023-05-05 22:20:25 +08:00 "finish_reason":"length" 算没有限制? |
7 54yzwddsg 2023-05-05 23:25:47 +08:00 楼上大哥血亏 4096 token |