to_content_blocks#

Connect a provider and configure retries, credentials, and transport. See the guide.

zett_agent.providers.anthropic_compatible.to_content_blocks(message, *, provider='anthropic', model=None, search_tool=None)[源代码]#

Convert a message into Messages content blocks.

参数:
  • message (AnyMessage) -- The message to render.

  • provider (str) -- Who produced the replay blocks a message may carry. They are sent back only to the provider and model that wrote them.

  • model (str | None) -- The model about to receive the message.

  • search_tool (str | None) -- Name of the local tool search tool, whose result becomes tool_reference blocks; None when the endpoint cannot load deferred tools.

返回类型:

list[dict[str, JsonValue]]