Context config
Context configuration for attachment schemas.
ContextConfig
Bases: BaseModel
Defines selected attachment fields rendered for LM invokers.
Attributes:
| Name | Type | Description |
|---|---|---|
placement |
ContextPlacement
|
Where to insert rendered context relative to the attachment.
Defaults to |
fields |
list[ContextField] | None
|
Context fields to include. Supports attachment descriptor fields
( |
metadata_keys |
list[str] | None
|
Metadata keys to include when |
template |
str
|
The template to use for rendering the context. Supported template placeholders:
- {context_json}: JSON string of attachment descriptor fields and metadata
- {filename}: filename of the attachment
- {mime_type}: mime type of the attachment
- {url}: url of the attachment
- {metadata_json}: JSON string of attachment metadata
Defaults to |
ContextPlacement
Bases: StrEnum
Defines where attachment context is inserted relative to the attachment.