<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>urutimai</author_name>
  <author_url>https://blog.hatena.ne.jp/urutimai/</author_url>
  <blog_title>ローソンデジタルイノベーション　テックブログ</blog_title>
  <blog_url>https://techblog.ldi.co.jp/</blog_url>
  <categories>
    <anon>AI</anon>
  </categories>
  <description>はじめに モバイルアプリエンジニアの庄司です。 Claudeを API 経由で利用していると、 回答が途中で終了してしまうケースに遭遇することがあります。 文末が不自然に途切れていたり、 明らかに続きがありそうな状態で生成が終了しているように見える場合です。 当初は、 続きがありそうなら「続き」の要求を明示的にプロンプトとして入力して、得られた出力を結合する 回答が大きくならないようにプロンプトを調整する といった形で対処していました。 しかし実際には、続きがあるかどうかは API のレスポンスで判断でき、「続き」の要求を明示的にプロンプトで入力しなくても継続した回答を得られることがわかりまし…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftechblog.ldi.co.jp%2Fentry%2F2026%2F05%2F22%2F140015&quot; title=&quot;Claude(LLM)の回答が途中で終了する場合の stop_reason を用いた回答の継続取得 - ローソンデジタルイノベーション　テックブログ&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2026-05-22 14:00:15</published>
  <title>Claude(LLM)の回答が途中で終了する場合の stop_reason を用いた回答の継続取得</title>
  <type>rich</type>
  <url>https://techblog.ldi.co.jp/entry/2026/05/22/140015</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
