読み方のヒント
矢印ボタン(または ← → キー)でページを移動できます。
店の手引きのように、文字だけの文書は、source の種類を text にして渡せます。
guide = {
"type": "document",
"source": {"type": "text", "media_type": "text/plain", "data": guide_text},
"title": "業務の手引き",
"citations": {"enabled": True},
}
message = client.messages.create(
model=model_main(),
max_tokens=1500,
messages=[{"role": "user", "content": [guide, {"type": "text", "text": question}]}],
)
content には、複数の文書のブロックを並べられます。配送の案内の現行版と改定案を読み比べるときは、2つの文書のブロックに、それぞれの title(「現行版」「改定案」)を付けて並べます。
title が「現行版」の文書のブロックtitle が「改定案」の文書のブロック3 / 20