Creates a cache for content in some model.
create_context_cache(
model: ChatVertexAI,
messages: list[BaseMessage],
expire_time: datetime | None = None,
time_to_live: timedelta | None = None,
tools: _ToolsType | None = None,
tool_config: _ToolConfigDict | None = None
) -> str| Name | Type | Description |
|---|---|---|
model* | ChatVertexAI |
|
messages* | list[BaseMessage] | List of messages to cache. |
expire_time | datetime | None | Default: NoneTimestamp of when this resource is considered expired. At most one of |
time_to_live | timedelta | None | Default: NoneThe TTL for this resource. If provided, the expiration time is
computed as At most one of |
tools | _ToolsType | None | Default: NoneA list of tool definitions to bind to this chat model. Can be a Pydantic model, |
tool_config | _ToolConfigDict | None | Default: NoneOptional. Immutable. Tool config. This config is shared for all tools. |