但是网页好像使用了不同的方法,有一个conversation_id,并且没有发送历史记录。
所以有些大佬(提供套壳的网站的),会在对话几轮后,全部发给chatgpt,让它总结(借此缩短字数,且上下文也还好)
API也是传一个会话ID,我是从这个库 https://github.com/transitive-bullshit/chatgpt-api 猜测的,因为这个库需要上下文对话则传parentMessageId,  根据 https://www.v2ex.com/t/921809 贴,即使使用parentMessageId也会导致token倍增,所以如果要对接api则需要为token设置上限和定时清理。
红米K30 Pro(变焦版)
呃,好像没有每次的,那个API是总令牌数量😅
{
   "id":"chatcmpl-abc123",
   "object":"chat.completion",
   "created":1677858242,
   "model":"gpt-3.5-turbo-0301",
   "usage":{
      "prompt_tokens":13,
      "completion_tokens":7,
      "total_tokens":20
   },
   "choices":[
      {
         "message":{
            "role":"assistant",
            "content":"\n\nThis is a test!"
         },
         "finish_reason":"stop",
         "index":0
      }
   ]
}
把三个数值都打印了吧,13/7/20
这种设计会导致后续对话消耗越来越多的token,API计费成倍增长,并且在多轮对话后更容易达到字数限制。