{"id":101767,"date":"2026-09-07T14:41:19","date_gmt":"2026-09-07T06:41:19","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/101767.html"},"modified":"2026-09-07T14:41:19","modified_gmt":"2026-09-07T06:41:19","slug":"%e6%90%9e%e6%87%82llm%e6%b5%81%e5%bc%8f%e8%be%93%e5%87%ba%ef%bc%9a%e8%87%aa%e5%9b%9e%e5%bd%92%e3%80%81ttft%e3%80%81finish_reason%e5%85%a8%e8%a7%a3%e6%9e%90","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/101767.html","title":{"rendered":"\u641e\u61c2LLM\u6d41\u5f0f\u8f93\u51fa\uff1a\u81ea\u56de\u5f52\u3001TTFT\u3001finish_reason\u5168\u89e3\u6790"},"content":{"rendered":"<\/p>\n<h4>\u6587\u7ae0\u76ee\u5f55<\/h4>\n<ul>\n<li>\n<ul>\n<li>\u524d\u8a00<\/li>\n<li>1. \u5148\u5520\u900f\u539f\u7406&#xff1a;\u6a21\u578b\u672c\u6765\u5c31\u662f\u4e00\u4e2a\u5b57\u4e00\u4e2a\u5b57\u6324\u7684<\/li>\n<li>\n<ul>\n<li>1.1 \u81ea\u56de\u5f52\u5230\u5e95\u662f\u5565<\/li>\n<li>1.2 \u6d41\u5f0f\u548c\u975e\u6d41\u5f0f&#xff0c;\u4f53\u611f\u5dee\u4e00\u4e2a\u6b21\u5143<\/li>\n<\/ul>\n<\/li>\n<li>2. \u4e0a\u4ee3\u7801&#xff1a;\u624b\u628a\u624b\u6559\u4f60\u63a5\u6d41\u5f0f<\/li>\n<li>\n<ul>\n<li>2.1 \u9010\u884c\u6252\u7ec6\u8282&#xff0c;\u5751\u90fd\u7ed9\u4f60\u6807\u51fa\u6765<\/li>\n<\/ul>\n<\/li>\n<li>3. \u600e\u4e48\u77e5\u9053\u8bdd\u8bb2\u5b8c\u4e86&#xff1f;<\/li>\n<li>\n<ul>\n<li>3.1 \u4e24\u79cd\u7ed3\u675f\u4fe1\u53f7&#xff0c;\u90fd\u5f97\u63a5\u4f4f<\/li>\n<\/ul>\n<\/li>\n<li>4. \u65b0\u624b\u9ad8\u9891\u8e29\u5751&#xff1a;\u5b57\u5178\u5f62\u5f0f\u7684chunk<\/li>\n<li>5. \u6d41\u5f0f\u548c\u975e\u6d41\u5f0f&#xff0c;\u5230\u5e95\u8be5\u7528\u54ea\u4e2a&#xff1f;<\/li>\n<li>6. \u804a\u4e2a\u548c\u94b1\u76f8\u5173\u7684\u51b7\u77e5\u8bc6<\/li>\n<li>7. \u52a8\u624b\u505a\u4e09\u4e2a\u5c0f\u5b9e\u9a8c<\/li>\n<li>8. \u6700\u540e\u6536\u4e2a\u5c3e<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260907064117-6a9e5c8ddd811.jpg\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><br \/>\n P.S. \u65e0\u610f\u95f4\u53d1\u73b0\u4e86\u4e00\u4e2a\u5de8\u725b\u7684\u4eba\u5de5\u667a\u80fd\u6559\u7a0b&#xff0c;\u975e\u5e38\u901a\u4fd7\u6613\u61c2&#xff0c;\u5bf9AI\u611f\u5174\u8da3\u7684\u670b\u53cb\u5f3a\u70c8\u63a8\u8350\u53bb\u770b\u770b&#xff0c;<br \/>\n\u4f20\u9001\u95e8https:\/\/blog.csdn.net\/qq_34419312<\/p>\n<h3>\u524d\u8a00<\/h3>\n<p>\u54b1\u4e4b\u524d\u804a\u5927\u6a21\u578b\u8c03\u7528&#xff0c;\u5168\u662f\u201c\u618b\u5927\u62db\u201d\u6a21\u5f0f\u2014\u2014\u7b49\u534a\u5929&#xff0c;\u7b54\u6848\u556a\u4e00\u4e0b\u5168\u51fa\u6765\u3002<\/p>\n<p>\u4f46\u4f60\u5e73\u5e38\u7528ChatGPT\u7684\u65f6\u5019&#xff0c;\u5b57\u90fd\u662f\u4e00\u4e2a\u4e00\u4e2a\u5f80\u5916\u8df3\u7684\u5427&#xff1f;\u8fd9\u5c31\u662f\u6d41\u5f0f\u8f93\u51fa\u3002\u522b\u89c9\u5f97\u8fd9\u662f\u5565\u9ed1\u79d1\u6280&#xff0c;\u4eca\u5929\u54b1\u4ece\u6839\u4e0a\u7ed9\u4f60\u8bb2\u660e\u767d&#xff0c;\u987a\u5e26\u628a\u4ee3\u7801\u7ed9\u4f60\u5199\u5f97\u660e\u660e\u767d\u767d\u3002<\/p>\n<h3>1. \u5148\u5520\u900f\u539f\u7406&#xff1a;\u6a21\u578b\u672c\u6765\u5c31\u662f\u4e00\u4e2a\u5b57\u4e00\u4e2a\u5b57\u6324\u7684<\/h3>\n<h4>1.1 \u81ea\u56de\u5f52\u5230\u5e95\u662f\u5565<\/h4>\n<p>\u5927\u6a21\u578b\u751f\u6210\u6587\u672c\u7684\u65b9\u5f0f&#xff0c;\u5b66\u540d\u53eb\u505a\u81ea\u56de\u5f52\u3002\u8bf4\u4eba\u8bdd\u5c31\u662f&#xff1a;\u7ed9\u4e0a\u6587&#xff0c;\u731c\u4e0b\u4e00\u4e2a\u5b57\u3002<\/p>\n<p>\u4e3e\u4e2a\u4f8b\u5b50&#xff1a;\u8f93\u5165\u201c\u4eca\u5929\u5929\u6c14\u771f\u201d&#xff0c;\u7b2c\u4e00\u6b65\u731c\u4e0b\u4e00\u4e2a\u662f\u201c\u4e0d\u201d&#xff0c;\u53e5\u5b50\u53d8\u6210\u201c\u4eca\u5929\u5929\u6c14\u771f\u4e0d\u201d&#xff1b;\u7b2c\u4e8c\u6b65\u518d\u731c\u4e0b\u4e00\u4e2a\u662f\u201c\u9519\u201d&#xff0c;\u53d8\u6210\u201c\u4eca\u5929\u5929\u6c14\u771f\u4e0d\u9519\u201d&#xff1b;\u7b2c\u4e09\u6b65\u8865\u4e2a\u53e5\u53f7\u3002\u5c31\u8fd9\u4e48\u4e00\u6b65\u6b65\u5f80\u4e0b\u63a8\u3002<\/p>\n<p>\u6a21\u578b\u4e00\u6b21\u53ea\u80fd\u4ea7\u51fa\u4e00\u4e2atoken&#xff0c;\u6bcf\u4e2a\u5b57\u90fd\u5f97\u9760\u524d\u9762\u6240\u6709\u5185\u5bb9\u5f53\u4e0a\u4e0b\u6587\u3002\u6240\u8c13\u201c\u6a21\u578b\u60f3\u597d\u4e86\u518d\u4e00\u6b21\u6027\u8f93\u51fa\u201d\u6839\u672c\u5c31\u662f\u9519\u89c9\u2014\u2014\u670d\u52a1\u5668\u672c\u6765\u5c31\u662f\u8fb9\u751f\u6210\u8fb9\u80fd\u5f80\u5916\u53d1\u7684\u3002<\/p>\n<h4>1.2 \u6d41\u5f0f\u548c\u975e\u6d41\u5f0f&#xff0c;\u4f53\u611f\u5dee\u4e00\u4e2a\u6b21\u5143<\/h4>\n<p>\u975e\u6d41\u5f0f\u662f\u4ec0\u4e48\u4f53\u9a8c&#xff1f;\u670d\u52a1\u5668\u6512\u5b8c\u6574\u7bc7\u56de\u7b54&#xff0c;\u6253\u5305\u6210\u4e00\u4e2a\u5927\u5305\u53d1\u56de\u6765\u3002\u4f60\u5c31\u76ef\u7740\u7a7a\u767d\u5c4f\u5e55\u5e72\u7b4920\u79d2&#xff0c;\u8ddf\u5728\u697c\u4e0b\u7b49\u5916\u5356\u8fd8\u770b\u4e0d\u5230\u9a91\u624b\u4f4d\u7f6e\u4f3c\u7684&#xff0c;\u8d8a\u7b49\u8d8a\u7126\u8651\u3002<\/p>\n<p>\u6d41\u5f0f\u5c31\u8d34\u5fc3\u591a\u4e86&#xff1a;\u6bcf\u751f\u6210\u4e00\u4e2atoken\u7acb\u523b\u53d1\u8fc7\u6765\u30021\u79d2\u5185\u5c31\u80fd\u770b\u5230\u7b2c\u4e00\u4e2a\u5b57&#xff0c;\u5269\u4e0b\u7684\u6162\u6162\u8e66&#xff0c;\u8ddf\u6709\u4eba\u5728\u5bf9\u9762\u6253\u5b57\u4f3c\u7684\u3002<\/p>\n<p>\u884c\u4e1a\u91cc\u6709\u4e2a\u5173\u952e\u6307\u6807\u53ebTTFT&#xff0c;\u5c31\u662f\u9996token\u65f6\u95f4\u3002\u6d41\u5f0f\u4e0d\u6539\u53d8\u603b\u751f\u6210\u65f6\u957f&#xff0c;\u4f46\u628a\u201c20\u79d2\u540e\u770b\u5168\u6587\u201d\u53d8\u6210\u201c1\u79d2\u540e\u5f00\u59cb\u9010\u5b57\u770b\u201d&#xff0c;\u4f53\u611f\u5dee\u8ddd\u582a\u6bd4\u4ece\u7eff\u76ae\u786c\u5ea7\u6362\u6210\u9ad8\u94c1\u5546\u52a1\u5ea7\u3002<\/p>\n<h3>2. \u4e0a\u4ee3\u7801&#xff1a;\u624b\u628a\u624b\u6559\u4f60\u63a5\u6d41\u5f0f<\/h3>\n<p>\u4ee3\u7801\u5176\u5b9e\u8d85\u7b80\u5355&#xff0c;\u548c\u666e\u901a\u8c03\u7528\u6bd4&#xff0c;\u5c31\u591a\u4e86\u4e00\u4e2a\u53c2\u6570\u3002<\/p>\n<p><span class=\"token keyword\">from<\/span> openai <span class=\"token keyword\">import<\/span> OpenAI<br \/>\nclient <span class=\"token operator\">&#061;<\/span> OpenAI<span class=\"token punctuation\">(<\/span>api_key<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;sk-xxx&#034;<\/span><span class=\"token punctuation\">,<\/span> base_url<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;https:\/\/api.deepseek.com&#034;<\/span><span class=\"token punctuation\">)<\/span><br \/>\nstream <span class=\"token operator\">&#061;<\/span> client<span class=\"token punctuation\">.<\/span>chat<span class=\"token punctuation\">.<\/span>completions<span class=\"token punctuation\">.<\/span>create<span class=\"token punctuation\">(<\/span><br \/>\n    model<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;deepseek-chat&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    messages<span class=\"token operator\">&#061;<\/span><span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">{<\/span><span class=\"token string\">&#034;role&#034;<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;user&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;content&#034;<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;\u5199\u4e00\u9996\u56db\u884c\u8bd7&#xff0c;\u4e3b\u9898\u662fdebug&#034;<\/span><span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    stream<span class=\"token operator\">&#061;<\/span><span class=\"token boolean\">True<\/span><span class=\"token punctuation\">,<\/span>                      <span class=\"token comment\"># \u552f\u4e00\u7684\u6539\u52a8&#xff1a;\u6253\u5f00\u6d41\u5f0f\u5f00\u5173<\/span><br \/>\n<span class=\"token punctuation\">)<\/span><br \/>\nfull_text <span class=\"token operator\">&#061;<\/span> <span class=\"token string\">&#034;&#034;<\/span>                        <span class=\"token comment\"># \u7d2f\u79ef\u5b8c\u6574\u56de\u7b54<\/span><br \/>\n<span class=\"token keyword\">for<\/span> chunk <span class=\"token keyword\">in<\/span> stream<span class=\"token punctuation\">:<\/span>                  <span class=\"token comment\"># chunk &#061; \u4e00\u5c0f\u7247\u6bb5&#xff0c;\u4e0d\u662f\u4e00\u4e2a\u5b8c\u6574\u54cd\u5e94<\/span><br \/>\n    delta <span class=\"token operator\">&#061;<\/span> chunk<span class=\"token punctuation\">.<\/span>choices<span class=\"token punctuation\">[<\/span><span class=\"token number\">0<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">.<\/span>delta    <span class=\"token comment\"># delta &#061; &#034;\u8fd9\u6b21\u65b0\u589e\u7684\u5185\u5bb9&#034;<\/span><br \/>\n    <span class=\"token keyword\">if<\/span> delta<span class=\"token punctuation\">.<\/span>content<span class=\"token punctuation\">:<\/span>                 <span class=\"token comment\"># \u6709\u7684chunk\u53ea\u6709\u5143\u4fe1\u606f&#xff0c;content\u4e3a\u7a7a&#xff0c;\u8981\u5224\u7a7a<\/span><br \/>\n        full_text <span class=\"token operator\">&#043;&#061;<\/span> delta<span class=\"token punctuation\">.<\/span>content    <span class=\"token comment\"># \u81ea\u5df1\u8d1f\u8d23\u62fc\u63a5<\/span><br \/>\n        <span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span>delta<span class=\"token punctuation\">.<\/span>content<span class=\"token punctuation\">,<\/span> end<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;&#034;<\/span><span class=\"token punctuation\">,<\/span> flush<span class=\"token operator\">&#061;<\/span><span class=\"token boolean\">True<\/span><span class=\"token punctuation\">)<\/span>   <span class=\"token comment\"># \u7acb\u523b\u6253\u5370&#xff0c;\u4e0d\u6362\u884c<\/span><br \/>\n<span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\\\\n&#8212; \u5b8c\u6574\u56de\u7b54 &#8212;&#034;<\/span><span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span>full_text<span class=\"token punctuation\">)<\/span><\/p>\n<h4>2.1 \u9010\u884c\u6252\u7ec6\u8282&#xff0c;\u5751\u90fd\u7ed9\u4f60\u6807\u51fa\u6765<\/h4>\n<p>for chunk in stream&#xff1a;\u666e\u901a\u8c03\u7528\u8fd4\u56de\u4e00\u4e2a\u5b8c\u6574\u7684\u54cd\u5e94\u5bf9\u8c61&#xff0c;\u6d41\u5f0f\u8fd4\u56de\u7684\u662f\u4e2a\u8fed\u4ee3\u5668&#xff0c;\u6bcf\u6b21\u5faa\u73af\u5410\u4e00\u4e2a\u5c0f\u7247\u6bb5\u3002<\/p>\n<p>chunk.choices[0].delta.content&#xff1a;\u8fd9\u91cc\u5fc5\u987b\u6572\u9ed1\u677f&#xff0c;\u662fdelta\u4e0d\u662fmessage\u3002delta\u91cc\u53ea\u6709\u589e\u91cf\u5185\u5bb9&#xff0c;\u7b2c\u4e00\u4e2achunk\u53ef\u80fd\u662f\u201c\u5199\u201d&#xff0c;\u7b2c\u4e8c\u4e2a\u662f\u201c\u4e00\u201d&#xff0c;\u7b2c\u4e09\u4e2a\u662f\u201c\u9996\u201d&#xff0c;\u62fc\u8d77\u6765\u624d\u662f\u5b8c\u6574\u7684\u4e00\u53e5\u8bdd\u3002<\/p>\n<p>if delta.content&#xff1a;\u6d41\u91cc\u9762\u6df7\u7740\u4e00\u4e9b\u4e8b\u4ef6\u901a\u77e5\u7c7b\u7684chunk&#xff0c;\u6bd4\u5982\u6536\u5c3e\u7684\u6807\u8bc6&#xff0c;\u5b83\u4eec\u7684content\u662f\u7a7a\u7684\u3002\u4e0d\u5224\u7a7a\u76f4\u63a5\u62a5\u9519&#xff0c;\u65b0\u624b\u5341\u4e2a\u4eba\u91cc\u6709\u4e5d\u4e2a\u683d\u5728\u8fd9\u3002<\/p>\n<p>flush&#061;True&#xff1a;\u8ba9print\u7acb\u523b\u5237\u65b0\u5230\u5c4f\u5e55\u3002\u9ed8\u8ba4\u4f1a\u6709\u7f13\u51b2\u533a&#xff0c;\u5bb9\u6613\u5361\u4e00\u4e0b\u8e66\u4e00\u4e32&#xff0c;\u90a3\u6253\u5b57\u673a\u7684\u6c1b\u56f4\u611f\u76f4\u63a5\u5c31\u6ca1\u4e86\u3002<\/p>\n<p>full_text &#043;&#061; &#8230;&#xff1a;\u6d41\u5f0f\u53ea\u7ba1\u7ed9\u4f60\u4f20\u788e\u7247&#xff0c;\u5b8c\u6574\u5185\u5bb9\u5f97\u81ea\u5df1\u52a8\u624b\u62fc\u3002\u5fd8\u4e86\u62fc\u7684\u8bdd&#xff0c;\u6700\u540e\u624b\u91cc\u53ea\u5269\u4e00\u5806\u788e\u6e23&#xff0c;\u5565\u7528\u6ca1\u6709\u3002<\/p>\n<h3>3. \u600e\u4e48\u77e5\u9053\u8bdd\u8bb2\u5b8c\u4e86&#xff1f;<\/h3>\n<p>\u603b\u4e0d\u80fd\u8ba9\u5faa\u73af\u4e00\u76f4\u8dd1\u4e0b\u53bb\u5427&#xff0c;\u603b\u5f97\u6709\u4e2a\u7ed3\u675f\u4fe1\u53f7\u3002<\/p>\n<p><span class=\"token keyword\">for<\/span> chunk <span class=\"token keyword\">in<\/span> stream<span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token keyword\">if<\/span> chunk<span class=\"token punctuation\">.<\/span>choices<span class=\"token punctuation\">[<\/span><span class=\"token number\">0<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">.<\/span>finish_reason <span class=\"token operator\">&#061;&#061;<\/span> <span class=\"token string\">&#034;stop&#034;<\/span><span class=\"token punctuation\">:<\/span><br \/>\n        <span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\\\\n[\u751f\u6210\u5b8c\u6bd5]&#034;<\/span><span class=\"token punctuation\">)<\/span><br \/>\n        <span class=\"token keyword\">break<\/span><br \/>\n    <span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">.<\/span><\/p>\n<h4>3.1 \u4e24\u79cd\u7ed3\u675f\u4fe1\u53f7&#xff0c;\u90fd\u5f97\u63a5\u4f4f<\/h4>\n<p>\u7b2c\u4e00\u79cd&#xff1a;\u6700\u540e\u4e00\u4e2achunk\u7684finish_reason\u53d8\u6210&#034;stop&#034;&#xff0c;\u8fd9\u662f\u6b63\u5e38\u7ed3\u675f&#xff1b;\u6216\u8005\u53d8\u6210&#034;length&#034;&#xff0c;\u8bf4\u660e\u88abmax_tokens\u7ed9\u622a\u65ad\u4e86\u3002<\/p>\n<p>\u7b2c\u4e8c\u79cd&#xff1a;\u8fed\u4ee3\u5668\u81ea\u5df1\u8dd1\u5b8c\u4e86&#xff0c;for\u5faa\u73af\u81ea\u7136\u9000\u51fa\u3002<\/p>\n<p>\u5de5\u7a0b\u4e0a\u7a33\u59a5\u7684\u5199\u6cd5\u662f\u4e24\u8005\u90fd\u5904\u7406&#xff1a;\u5faa\u73af\u91cc\u68c0\u67e5finish_reason\u505a\u6536\u5c3e\u52a8\u4f5c&#xff0c;\u6bd4\u5982\u901a\u77e5\u524d\u7aef\u751f\u6210\u5b8c\u4e86&#xff1b;\u5faa\u73af\u5916\u9762\u505a\u8d44\u6e90\u6e05\u7406\u3002\u53cc\u4fdd\u9669&#xff0c;\u600e\u4e48\u90fd\u4e0d\u4f1a\u9519\u3002<\/p>\n<h3>4. \u65b0\u624b\u9ad8\u9891\u8e29\u5751&#xff1a;\u5b57\u5178\u5f62\u5f0f\u7684chunk<\/h3>\n<p>\u6709\u4e9b\u573a\u666f\u4e0b&#xff0c;\u6bd4\u5982\u7528FastAPI\u505a\u8f6c\u53d1&#xff0c;\u4f60\u4f1a\u628achunk\u8f6c\u6210\u5b57\u5178\u518d\u53d1\u7ed9\u524d\u7aef\u3002\u8fd9\u65f6\u5019\u53d6\u503c\u65b9\u5f0f\u5c31\u53d8\u4e86&#xff0c;\u5f88\u591a\u4eba\u5728\u8fd9\u91cc\u7ffb\u8f66\u3002<\/p>\n<p>d <span class=\"token operator\">&#061;<\/span> chunk<span class=\"token punctuation\">.<\/span>model_dump<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span>          <span class=\"token comment\"># \u8f6c\u6210\u666e\u901a\u5b57\u5178<\/span><br \/>\ncontent <span class=\"token operator\">&#061;<\/span> d<span class=\"token punctuation\">[<\/span><span class=\"token string\">&#034;choices&#034;<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">[<\/span><span class=\"token number\">0<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">[<\/span><span class=\"token string\">&#034;delta&#034;<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">[<\/span><span class=\"token string\">&#034;content&#034;<\/span><span class=\"token punctuation\">]<\/span>   <span class=\"token comment\"># \u7528[]\u53d6\u952e&#xff0c;\u4e0d\u662f.\u5c5e\u6027<\/span><\/p>\n<p>\u5bf9\u8c61\u7528\u70b9\u8bbf\u95ee&#xff0c;\u5b57\u5178\u7528\u4e2d\u62ec\u53f7&#xff0c;\u8fd9\u4fe9\u5343\u4e07\u522b\u641e\u6df7\u3002\u4e00\u770b\u5230AttributeError: \u2018dict\u2019 object has no attribute \u2018choices\u2019&#xff0c;\u522b\u60f3\u522b\u7684&#xff0c;\u4e5d\u6210\u4e5d\u662f\u8fd9\u95ee\u9898\u3002\u5c31\u50cf\u4f60\u62ff\u5bb6\u95e8\u94a5\u5319\u53bb\u5f00\u7535\u52a8\u8f66\u9501&#xff0c;\u786c\u63d2\u80af\u5b9a\u63d2\u4e0d\u8fdb\u53bb\u554a\u3002<\/p>\n<h3>5. \u6d41\u5f0f\u548c\u975e\u6d41\u5f0f&#xff0c;\u5230\u5e95\u8be5\u7528\u54ea\u4e2a&#xff1f;<\/h3>\n<p>\u4e0d\u662f\u8bf4\u6d41\u5f0f\u5c31\u4e00\u5b9a\u9ad8\u7ea7&#xff0c;\u5f97\u5206\u573a\u666f\u7528\u3002<\/p>\n<table>\n<tr>\u975e\u6d41\u5f0f&#xff08;stream&#061;False&#xff09;\u6d41\u5f0f&#xff08;stream&#061;True&#xff09;<\/tr>\n<tbody>\n<tr>\n<td>\u7a0b\u5e8f\u5185\u90e8\u8c03\u7528&#xff1a;\u8981\u5b8c\u6574\u7ed3\u679c\u505a\u4e0b\u4e00\u6b65\u5904\u7406<\/td>\n<td>\u76f4\u63a5\u7ed9\u7528\u6237\u770b&#xff1a;\u804a\u5929\u754c\u9762<\/td>\n<\/tr>\n<tr>\n<td>\u7b80\u5355&#xff0c;\u4e00\u884c\u5c31\u80fd\u53d6\u7ed3\u679c<\/td>\n<td>\u8981\u5904\u7406chunk\u62fc\u63a5\u3001\u5224\u7a7a\u3001\u7ed3\u675f\u4fe1\u53f7<\/td>\n<\/tr>\n<tr>\n<td>\u5168\u7a0b\u7b49\u5f85&#xff0c;\u6700\u540e\u4e00\u6b21\u6027\u51fa\u7ed3\u679c<\/td>\n<td>\u6253\u5b57\u673a\u6548\u679c&#xff0c;\u8fb9\u751f\u6210\u8fb9\u770b<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u8fd9\u91cc\u8bf4\u4e2a\u975e\u5e38\u91cd\u8981\u7684\u7ecf\u9a8c&#xff1a;Agent\u5185\u90e8\u7684LLM\u8c03\u7528&#xff0c;\u5927\u591a\u7528\u975e\u6d41\u5f0f\u3002\u56e0\u4e3aAgent\u5faa\u73af\u9700\u8981\u5b8c\u6574\u7684\u56de\u7b54\u6765\u89e3\u6790\u5de5\u5177\u8c03\u7528&#xff0c;\u603b\u4e0d\u80fd\u8fb9\u8e66\u5b57\u8fb9\u5224\u65ad\u8be5\u8c03\u5565\u5de5\u5177\u5427\u3002\u53ea\u6709\u9762\u5411\u7528\u6237\u7684\u6700\u540e\u4e00\u516c\u91cc&#xff0c;\u624d\u7528\u6d41\u5f0f\u3002\u540e\u9762\u54b1\u804a\u524d\u540e\u7aef\u5bf9\u63a5\u7684\u65f6\u5019&#xff0c;\u5c31\u4f1a\u628a\u8fd9\u4fe9\u62fc\u8d77\u6765\u7528\u3002<\/p>\n<h3>6. \u804a\u4e2a\u548c\u94b1\u76f8\u5173\u7684\u51b7\u77e5\u8bc6<\/h3>\n<p>\u6d41\u5f0f\u751f\u6210\u7684\u8fc7\u7a0b\u4e2d&#xff0c;\u670d\u52a1\u5668\u5df2\u7ecf\u7b97\u51fa\u6765\u7684KV\u7f13\u5b58&#xff0c;\u5929\u7136\u5c31\u662f\u4e0b\u4e00\u8f6e\u5bf9\u8bdd\u7684\u524d\u7f00\u3002<\/p>\n<p>\u6240\u4ee5\u591a\u8f6e\u5bf9\u8bdd\u52a0\u6d41\u5f0f&#xff0c;\u662f\u5929\u751f\u7684\u7f13\u5b58\u53cb\u597d\u7ec4\u5408\u3002\u73b0\u5728\u542c\u4e0d\u61c2\u6ca1\u5173\u7cfb&#xff0c;\u7b49\u8bb2\u5230KV Cache\u7684\u65f6\u5019\u4f60\u518d\u56de\u5934\u770b&#xff0c;\u7edd\u5bf9\u4f1a\u62cd\u5927\u817f\u558a\u201c\u539f\u6765\u5982\u6b64\u201d\u3002\u7701\u4e0b\u6765\u7684&#xff0c;\u53ef\u90fd\u662f\u771f\u91d1\u767d\u94f6\u7684\u7b97\u529b\u94b1\u3002<\/p>\n<h3>7. \u52a8\u624b\u505a\u4e09\u4e2a\u5c0f\u5b9e\u9a8c<\/h3>\n<p>\u5149\u8bf4\u4e0d\u7ec3\u5047\u628a\u5f0f&#xff0c;\u81ea\u5df1\u8dd1\u4e00\u904d&#xff0c;\u5370\u8c61\u624d\u6df1\u523b\u3002<\/p>\n<p>\u5b9e\u9a8c\u4e00&#xff1a;\u8dd1\u901a\u4e0a\u9762\u7684\u57fa\u7840\u4ee3\u7801&#xff0c;\u4eb2\u773c\u770b\u7740\u6587\u5b57\u9010\u5b57\u8f93\u51fa\u3002<\/p>\n<p>\u5b9e\u9a8c\u4e8c&#xff1a;\u7ed9\u6bcf\u4e2achunk\u52a0\u4e0a\u65f6\u95f4\u6233&#xff0c;\u770b\u770b\u5b83\u4eec\u7684\u5230\u8fbe\u8282\u594f\u3002<\/p>\n<p><span class=\"token keyword\">import<\/span> time<br \/>\n<span class=\"token keyword\">for<\/span> chunk <span class=\"token keyword\">in<\/span> stream<span class=\"token punctuation\">:<\/span><br \/>\n    delta <span class=\"token operator\">&#061;<\/span> chunk<span class=\"token punctuation\">.<\/span>choices<span class=\"token punctuation\">[<\/span><span class=\"token number\">0<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">.<\/span>delta<br \/>\n    <span class=\"token keyword\">if<\/span> delta<span class=\"token punctuation\">.<\/span>content<span class=\"token punctuation\">:<\/span><br \/>\n        <span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string-interpolation\"><span class=\"token string\">f&#034;[<\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span>time<span class=\"token punctuation\">.<\/span>time<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token operator\">%<\/span><span class=\"token number\">100<\/span><span class=\"token punctuation\">:<\/span><span class=\"token format-spec\">.2f<\/span><span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\">] <\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span>delta<span class=\"token punctuation\">.<\/span>content<span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\">&#034;<\/span><\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>\u4f60\u4f1a\u53d1\u73b0chunk\u4e0d\u662f\u5747\u5300\u5230\u8fbe\u7684\u3002\u6a21\u578b\u9047\u5230\u96be\u6289\u62e9\u7684\u5730\u65b9&#xff0c;\u6982\u7387\u5206\u5e03\u6bd4\u8f83\u5e73\u5766&#xff0c;\u5c31\u4f1a\u660e\u663e\u5361\u987f\u4e00\u4e0b\u3002\u8fd9\u53ef\u662f\u89c2\u5bdf\u6a21\u578b\u201c\u601d\u8003\u8fc7\u7a0b\u201d\u7684\u7edd\u4f73\u5c0f\u7a97\u53e3\u3002<\/p>\n<p>\u5b9e\u9a8c\u4e09&#xff1a;\u6545\u610f\u628amax_tokens\u8bbe\u5f97\u5f88\u5c0f&#xff0c;\u770b\u770bfinish_reason\u4ec0\u4e48\u65f6\u5019\u53d8\u6210&#034;length&#034;\u3002<\/p>\n<h3>8. \u6700\u540e\u6536\u4e2a\u5c3e<\/h3>\n<li>\u6a21\u578b\u662f\u81ea\u56de\u5f52\u9010token\u751f\u6210\u7684&#xff0c;\u6d41\u5f0f\u53ea\u662f\u751f\u6210\u4e00\u4e2a\u53d1\u4e00\u4e2a&#xff0c;\u4e0d\u662f\u4ec0\u4e48\u52a0\u901f\u9ed1\u9b54\u6cd5\u3002<\/li>\n<li>\u6838\u5fc3\u4ee3\u7801\u4e09\u4ef6\u5957&#xff1a;for chunk in \u5faa\u73af\u3001delta.content\u5224\u7a7a\u3001\u81ea\u5df1\u62fc\u63a5\u5168\u6587\u3002<\/li>\n<li>\u7ed3\u675f\u4fe1\u53f7\u4e24\u79cd\u90fd\u8981\u5904\u7406&#xff1a;finish_reason\u548c\u8fed\u4ee3\u5668\u8017\u5c3d\u3002<\/li>\n<li>\u7a0b\u5e8f\u5185\u90e8\u7528\u975e\u6d41\u5f0f&#xff0c;\u9762\u5411\u7528\u6237\u7528\u6d41\u5f0f\u3002<\/li>\n<li>\u5bf9\u8c61\u548c\u5b57\u5178\u53d6\u503c\u522b\u641e\u6df7&#xff0c;\u62a5AttributeError\u5148\u67e5\u8fd9\u4e2a\u3002<\/li>\n<p>P.S. \u65e0\u610f\u95f4\u53d1\u73b0\u4e86\u4e00\u4e2a\u5de8\u725b\u7684\u4eba\u5de5\u667a\u80fd\u6559\u7a0b&#xff0c;\u975e\u5e38\u901a\u4fd7\u6613\u61c2&#xff0c;\u5bf9AI\u611f\u5174\u8da3\u7684\u670b\u53cb\u5f3a\u70c8\u63a8\u8350\u53bb\u770b\u770b&#xff0c;\u4f20\u9001\u95e8https:\/\/blog.csdn.net\/qq_34419312<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u76ee\u5f55\u524d\u8a001. \u5148\u5520\u900f\u539f\u7406&#xff1a;\u6a21\u578b\u672c\u6765\u5c31\u662f\u4e00\u4e2a\u5b57\u4e00\u4e2a\u5b57\u6324\u76841.1 \u81ea\u56de\u5f52\u5230\u5e95\u662f\u55651.2 \u6d41\u5f0f\u548c\u975e\u6d41\u5f0f&#xff0c;\u4f53\u611f\u5dee\u4e00\u4e2a\u6b21\u51432. \u4e0a\u4ee3\u7801&#xff1a;\u624b\u628a\u624b\u6559\u4f60\u63a5\u6d41\u5f0f2.1 \u9010\u884c\u6252\u7ec6\u8282&#xff0c;\u5751\u90fd\u7ed9\u4f60\u6807\u51fa\u67653. \u600e\u4e48\u77e5\u9053\u8bdd\u8bb2\u5b8c\u4e86&#xff1f;3.1 \u4e24\u79cd\u7ed3\u675f\u4fe1\u53f7&#xff0c;\u90fd\u5f97\u63a5\u4f4f4. \u65b0\u624b\u9ad8\u9891\u8e29\u5751&#xff1a;\u5b57\u5178\u5f62\u5f0f\u7684chunk5. \u6d41\u5f0f\u548c\u975e\u6d41\u5f0f&#xff0c;\u5230\u5e95\u8be5\u7528\u54ea\u4e2a&#xff1f;6. \u804a\u4e2a\u548c\u94b1\u76f8\u5173\u7684\u51b7\u77e5\u8bc67. \u52a8\u624b\u505a\u4e09\u4e2a\u5c0f\u5b9e<\/p>\n","protected":false},"author":2,"featured_media":101766,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[50],"topic":[],"class_list":["post-101767","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-50"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u641e\u61c2LLM\u6d41\u5f0f\u8f93\u51fa\uff1a\u81ea\u56de\u5f52\u3001TTFT\u3001finish_reason\u5168\u89e3\u6790 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/101767.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u641e\u61c2LLM\u6d41\u5f0f\u8f93\u51fa\uff1a\u81ea\u56de\u5f52\u3001TTFT\u3001finish_reason\u5168\u89e3\u6790 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u76ee\u5f55\u524d\u8a001. \u5148\u5520\u900f\u539f\u7406&#xff1a;\u6a21\u578b\u672c\u6765\u5c31\u662f\u4e00\u4e2a\u5b57\u4e00\u4e2a\u5b57\u6324\u76841.1 \u81ea\u56de\u5f52\u5230\u5e95\u662f\u55651.2 \u6d41\u5f0f\u548c\u975e\u6d41\u5f0f&#xff0c;\u4f53\u611f\u5dee\u4e00\u4e2a\u6b21\u51432. \u4e0a\u4ee3\u7801&#xff1a;\u624b\u628a\u624b\u6559\u4f60\u63a5\u6d41\u5f0f2.1 \u9010\u884c\u6252\u7ec6\u8282&#xff0c;\u5751\u90fd\u7ed9\u4f60\u6807\u51fa\u67653. \u600e\u4e48\u77e5\u9053\u8bdd\u8bb2\u5b8c\u4e86&#xff1f;3.1 \u4e24\u79cd\u7ed3\u675f\u4fe1\u53f7&#xff0c;\u90fd\u5f97\u63a5\u4f4f4. \u65b0\u624b\u9ad8\u9891\u8e29\u5751&#xff1a;\u5b57\u5178\u5f62\u5f0f\u7684chunk5. \u6d41\u5f0f\u548c\u975e\u6d41\u5f0f&#xff0c;\u5230\u5e95\u8be5\u7528\u54ea\u4e2a&#xff1f;6. \u804a\u4e2a\u548c\u94b1\u76f8\u5173\u7684\u51b7\u77e5\u8bc67. \u52a8\u624b\u505a\u4e09\u4e2a\u5c0f\u5b9e\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/101767.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-07T06:41:19+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260907064117-6a9e5c8ddd811.jpg\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/101767.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/101767.html\",\"name\":\"\u641e\u61c2LLM\u6d41\u5f0f\u8f93\u51fa\uff1a\u81ea\u56de\u5f52\u3001TTFT\u3001finish_reason\u5168\u89e3\u6790 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-09-07T06:41:19+00:00\",\"dateModified\":\"2026-09-07T06:41:19+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/101767.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/101767.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/101767.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u641e\u61c2LLM\u6d41\u5f0f\u8f93\u51fa\uff1a\u81ea\u56de\u5f52\u3001TTFT\u3001finish_reason\u5168\u89e3\u6790\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u641e\u61c2LLM\u6d41\u5f0f\u8f93\u51fa\uff1a\u81ea\u56de\u5f52\u3001TTFT\u3001finish_reason\u5168\u89e3\u6790 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/101767.html","og_locale":"zh_CN","og_type":"article","og_title":"\u641e\u61c2LLM\u6d41\u5f0f\u8f93\u51fa\uff1a\u81ea\u56de\u5f52\u3001TTFT\u3001finish_reason\u5168\u89e3\u6790 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u76ee\u5f55\u524d\u8a001. \u5148\u5520\u900f\u539f\u7406&#xff1a;\u6a21\u578b\u672c\u6765\u5c31\u662f\u4e00\u4e2a\u5b57\u4e00\u4e2a\u5b57\u6324\u76841.1 \u81ea\u56de\u5f52\u5230\u5e95\u662f\u55651.2 \u6d41\u5f0f\u548c\u975e\u6d41\u5f0f&#xff0c;\u4f53\u611f\u5dee\u4e00\u4e2a\u6b21\u51432. \u4e0a\u4ee3\u7801&#xff1a;\u624b\u628a\u624b\u6559\u4f60\u63a5\u6d41\u5f0f2.1 \u9010\u884c\u6252\u7ec6\u8282&#xff0c;\u5751\u90fd\u7ed9\u4f60\u6807\u51fa\u67653. \u600e\u4e48\u77e5\u9053\u8bdd\u8bb2\u5b8c\u4e86&#xff1f;3.1 \u4e24\u79cd\u7ed3\u675f\u4fe1\u53f7&#xff0c;\u90fd\u5f97\u63a5\u4f4f4. \u65b0\u624b\u9ad8\u9891\u8e29\u5751&#xff1a;\u5b57\u5178\u5f62\u5f0f\u7684chunk5. \u6d41\u5f0f\u548c\u975e\u6d41\u5f0f&#xff0c;\u5230\u5e95\u8be5\u7528\u54ea\u4e2a&#xff1f;6. \u804a\u4e2a\u548c\u94b1\u76f8\u5173\u7684\u51b7\u77e5\u8bc67. \u52a8\u624b\u505a\u4e09\u4e2a\u5c0f\u5b9e","og_url":"https:\/\/www.wsisp.com\/helps\/101767.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-09-07T06:41:19+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260907064117-6a9e5c8ddd811.jpg"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/101767.html","url":"https:\/\/www.wsisp.com\/helps\/101767.html","name":"\u641e\u61c2LLM\u6d41\u5f0f\u8f93\u51fa\uff1a\u81ea\u56de\u5f52\u3001TTFT\u3001finish_reason\u5168\u89e3\u6790 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-09-07T06:41:19+00:00","dateModified":"2026-09-07T06:41:19+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/101767.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/101767.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/101767.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u641e\u61c2LLM\u6d41\u5f0f\u8f93\u51fa\uff1a\u81ea\u56de\u5f52\u3001TTFT\u3001finish_reason\u5168\u89e3\u6790"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/101767","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=101767"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/101767\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/101766"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=101767"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=101767"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=101767"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=101767"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}