Create a TextContentBlock.
create_text_block(
text: str,
*,
id: str | None = None,
annotations: list[Annotation] | None = None,
index: int | str | None = None,
**kwargs: Any = {}
) -> TextContentBlockThe id is generated automatically if not provided, using a UUID4 format
prefixed with 'lc_' to indicate it is a LangChain-generated ID.
| Name | Type | Description |
|---|---|---|
text* | str | The text content of the block. |
id | str | None | Default: NoneContent block identifier. Generated automatically if not provided. |
annotations | list[Annotation] | None | Default: None
|
index | int | str | None | Default: NoneIndex of block in aggregate response. Used during streaming. |