Files

294 lines
9.7 KiB
Markdown
Raw Permalink Normal View History

0.39.0 (#274) - **Help Agent** — A new agent that answers questions about Talemate itself — settings, agents, clients, the world editor — grounded in the bundled documentation, and able to change agent and application settings on request. - **Timeline Rollback** — Scrub a slider across a scene's automatic version history, preview the message history at any revision, then roll the scene back in place or fork the revision into a new save. - **Pi Bridge Client** — A new client type that drives generations through the pi coding agent's headless RPC mode, making any model pi can reach usable in Talemate. - **Application Settings** — Settings move out of their modal into an always-available Settings tab, with a single topic-grouped sidebar, a settings search, all API keys on one page, and unsaved-change tracking. - **Scene Library** — The home screen is rebuilt as a full-page landing view with a file-tree scene library, cover thumbnails and per-save metadata, scene and save deletion, and a drag-and-drop import dropzone. - **Fast Character Creation** — Generate a character in a single request instead of one prompt per aspect, with a Consolidate multi-select, a token budget, and a Fill in misses pass. Off by default. - **Scene Backdrop** — Set any scene illustration as a backdrop filling the scene view behind the messages, saved with the scene, with configurable text legibility and an Immersive quick-toggle. - **Scene Visual Manager** — World Editor → Scene gains a Visuals tab to browse, upload, generate and delete the scene's backgrounds and illustrations, and set the cover image and backdrop. - **Visual Prompt Finalization** — Post-processing actions — match and replace, or a free-form AI instruction — rewrite image prompts right before they reach the image backend, with per-scene and per-character overrides and reusable template sets. - fixes #271 - fixes #275 Plus 25 improvements and 39 bug fixes — see [CHANGELOG.md](https://github.com/vegu-ai/talemate/blob/prep-0.39.0/CHANGELOG.md#0390) for the full list.
2026-08-29 13:21:22 +03:00
# Response Parsing Nodes
Extract structured data from LLM responses. A **Response Spec** describes the expected format; extractors pull out anchored sections, code blocks, lists or regex matches from the raw response text.
<!-- glossary:generated - everything below this line is generated by `python -m talemate.game.engine.nodes.tools glossary --write` - do not edit -->
_9 nodes._
| Node | Registry path |
| --- | --- |
| [After Anchor Extractor](#after-anchor-extractor) | `response/AfterAnchorExtractor` |
| [Anchor Extractor](#anchor-extractor) | `response/AnchorExtractor` |
| [AsIs Extractor](#asis-extractor) | `response/AsIsExtractor` |
| [Code Block Extractor](#code-block-extractor) | `response/CodeBlockExtractor` |
| [Complex Anchor Extractor](#complex-anchor-extractor) | `response/ComplexAnchorExtractor` |
| [Complex Code Block Extractor](#complex-code-block-extractor) | `response/ComplexCodeBlockExtractor` |
| [Regex Extractor](#regex-extractor) | `response/RegexExtractor` |
| [Response Spec](#response-spec) | `response/ResponseSpec` |
| [Strip Prefix Extractor](#strip-prefix-extractor) | `response/StripPrefixExtractor` |
## After Anchor Extractor
`response/AfterAnchorExtractor`
Creates an AfterAnchorExtractor that extracts everything after a start marker.
**Inputs**
| Input | Type | Description |
| --- | --- | --- |
| `name` | `str` | (optional) Optional override for name property |
**Outputs**
| Output | Type | Description |
| --- | --- | --- |
| `name` | `str` | The extractor name (pass-through) |
| `value` | `response/extractor` | The AfterAnchorExtractor instance |
| `spec` | `response/spec` | A ResponseSpec containing just this extractor |
**Properties**
| Property | Type | Default | Description |
| --- | --- | --- | --- |
| `name` | `str` | `""` | Extractor name (key for dict collector) |
| `start` | `str` | `""` | Start marker to search for |
| `stop_at` | `str` | `""` | Optional end marker (empty = no stop) |
| `fallback_to_full` | `bool` | `False` | Return full response if start marker not found |
| `trim` | `bool` | `True` | Trim whitespace from result |
## Anchor Extractor
`response/AnchorExtractor`
Creates an AnchorExtractor that extracts content between anchor tags.
**Inputs**
| Input | Type | Description |
| --- | --- | --- |
| `name` | `str` | (optional) Optional override for name property |
**Outputs**
| Output | Type | Description |
| --- | --- | --- |
| `name` | `str` | The extractor name (pass-through) |
| `value` | `response/extractor` | The AnchorExtractor instance |
| `spec` | `response/spec` | A ResponseSpec containing just this extractor |
**Properties**
| Property | Type | Default | Description |
| --- | --- | --- | --- |
| `name` | `str` | `""` | Extractor name (key for dict collector) |
| `left` | `str` | `""` | Left anchor tag (e.g., <MESSAGE>) |
| `right` | `str` | `""` | Right anchor tag (e.g., </MESSAGE>) |
| `fallback_to_full` | `bool` | `False` | Return full response if anchors not found |
| `trim` | `bool` | `True` | Trim whitespace from result |
## AsIs Extractor
`response/AsIsExtractor`
Creates an AsIsExtractor that returns the entire response as-is.
**Inputs**
| Input | Type | Description |
| --- | --- | --- |
| `name` | `str` | (optional) Optional override for name property |
**Outputs**
| Output | Type | Description |
| --- | --- | --- |
| `name` | `str` | The extractor name (pass-through) |
| `value` | `response/extractor` | The AsIsExtractor instance |
| `spec` | `response/spec` | A ResponseSpec containing just this extractor |
**Properties**
| Property | Type | Default | Description |
| --- | --- | --- | --- |
| `name` | `str` | `""` | Extractor name (key for dict collector) |
| `trim` | `bool` | `True` | Trim whitespace from result |
## Code Block Extractor
`response/CodeBlockExtractor`
Creates a CodeBlockExtractor that extracts code blocks from tagged sections.
**Inputs**
| Input | Type | Description |
| --- | --- | --- |
| `name` | `str` | (optional) Optional override for name property |
**Outputs**
| Output | Type | Description |
| --- | --- | --- |
| `name` | `str` | The extractor name (pass-through) |
| `value` | `response/extractor` | The CodeBlockExtractor instance |
| `spec` | `response/spec` | A ResponseSpec containing just this extractor |
**Properties**
| Property | Type | Default | Description |
| --- | --- | --- | --- |
| `name` | `str` | `""` | Extractor name (key for dict collector) |
| `left` | `str` | `""` | Left anchor tag (e.g., <ACTIONS>) |
| `right` | `str` | `""` | Right anchor tag (e.g., </ACTIONS>) |
| `validate_structured` | `bool` | `True` | Validate content as JSON/YAML for no-fence fallback |
| `fallback_to_full` | `bool` | `False` | Return full response if anchors not found |
| `trim` | `bool` | `True` | Trim whitespace from result |
## Complex Anchor Extractor
`response/ComplexAnchorExtractor`
Creates a ComplexAnchorExtractor with nesting awareness.
Tracks multiple tags and only extracts target blocks when at root level.
**Inputs**
| Input | Type | Description |
| --- | --- | --- |
| `name` | `str` | (optional) Optional override for name property |
| `tracked_tags` | `list` | (optional) Optional override for tracked_tags property |
**Outputs**
| Output | Type | Description |
| --- | --- | --- |
| `name` | `str` | The extractor name (pass-through) |
| `value` | `response/extractor` | The ComplexAnchorExtractor instance |
| `spec` | `response/spec` | A ResponseSpec containing just this extractor |
| `tracked_tags` | `list` | The tracked tags list (pass-through) |
**Properties**
| Property | Type | Default | Description |
| --- | --- | --- | --- |
| `name` | `str` | `""` | Extractor name (key for dict collector) |
| `left` | `str` | `""` | Left anchor tag (e.g., <MESSAGE>) |
| `right` | `str` | `""` | Right anchor tag (e.g., </MESSAGE>) |
| `tracked_tags` | `list` | `[]` | Tags to track for nesting awareness |
| `fallback_to_full` | `bool` | `False` | Return full response if anchors not found |
| `trim` | `bool` | `True` | Trim whitespace from result |
## Complex Code Block Extractor
`response/ComplexCodeBlockExtractor`
Creates a ComplexCodeBlockExtractor with nesting awareness for code blocks.
**Inputs**
| Input | Type | Description |
| --- | --- | --- |
| `name` | `str` | (optional) Optional override for name property |
| `tracked_tags` | `list` | (optional) Optional override for tracked_tags property |
**Outputs**
| Output | Type | Description |
| --- | --- | --- |
| `name` | `str` | The extractor name (pass-through) |
| `value` | `response/extractor` | The ComplexCodeBlockExtractor instance |
| `spec` | `response/spec` | A ResponseSpec containing just this extractor |
| `tracked_tags` | `list` | The tracked tags list (pass-through) |
**Properties**
| Property | Type | Default | Description |
| --- | --- | --- | --- |
| `name` | `str` | `""` | Extractor name (key for dict collector) |
| `left` | `str` | `""` | Left anchor tag (e.g., <ACTIONS>) |
| `right` | `str` | `""` | Right anchor tag (e.g., </ACTIONS>) |
| `tracked_tags` | `list` | `[]` | Tags to track for nesting awareness |
| `validate_structured` | `bool` | `True` | Validate content as JSON/YAML for no-fence fallback |
| `fallback_to_full` | `bool` | `False` | Return full response if anchors not found |
| `trim` | `bool` | `True` | Trim whitespace from result |
## Regex Extractor
`response/RegexExtractor`
Creates a RegexExtractor that extracts content using regex patterns.
**Inputs**
| Input | Type | Description |
| --- | --- | --- |
| `name` | `str` | (optional) Optional override for name property |
**Outputs**
| Output | Type | Description |
| --- | --- | --- |
| `name` | `str` | The extractor name (pass-through) |
| `value` | `response/extractor` | The RegexExtractor instance |
| `spec` | `response/spec` | A ResponseSpec containing just this extractor |
**Properties**
| Property | Type | Default | Description |
| --- | --- | --- | --- |
| `name` | `str` | `""` | Extractor name (key for dict collector) |
| `pattern` | `str` | `""` | Regex pattern with capture group |
| `case_insensitive` | `bool` | `False` | Ignore case when matching |
| `group` | `int` | `1` | Capture group to extract |
| `all_matches` | `bool` | `False` | Return list of all matches |
| `trim` | `bool` | `True` | Trim whitespace from result |
## Response Spec
`response/ResponseSpec`
Creates a ResponseSpec from a dictionary of extractors.
**Inputs**
| Input | Type | Description |
| --- | --- | --- |
| `extractors` | `dict` | Dictionary of name -> Extractor (from DictCollector) |
| `required` | `list` | (optional) Optional override for required property |
**Outputs**
| Output | Type | Description |
| --- | --- | --- |
| `spec` | `response/spec` | The ResponseSpec instance |
| `extractors` | `dict` | Pass-through of the extractors dict |
**Properties**
| Property | Type | Default | Description |
| --- | --- | --- | --- |
| `required` | `list` | `[]` | List of required field names |
## Strip Prefix Extractor
`response/StripPrefixExtractor`
Creates a StripPrefixExtractor that strips patterns using regex substitution.
**Inputs**
| Input | Type | Description |
| --- | --- | --- |
| `name` | `str` | (optional) Optional override for name property |
**Outputs**
| Output | Type | Description |
| --- | --- | --- |
| `name` | `str` | The extractor name (pass-through) |
| `value` | `response/extractor` | The StripPrefixExtractor instance |
| `spec` | `response/spec` | A ResponseSpec containing just this extractor |
**Properties**
| Property | Type | Default | Description |
| --- | --- | --- | --- |
| `name` | `str` | `""` | Extractor name (key for dict collector) |
| `pattern` | `str` | `""` | Regex pattern to strip |
| `replacement` | `str` | `""` | Replacement string |
| `trim` | `bool` | `True` | Trim whitespace from result |