mirror of
https://github.com/vegu-ai/talemate.git
synced 2026-09-02 20:20:40 +02:00
280 lines
8.2 KiB
Markdown
280 lines
8.2 KiB
Markdown
|
|
# Visualizer Agent Modules
|
||
|
|
|
||
|
|
Ready-made visual generation flows built on the visualizer [prompt](agents-visual.md) and [generation](agents-visual-generation.md) nodes: generate visual assets, avatars, portraits, image edits and regenerations, plus the visualizer's websocket handlers.
|
||
|
|
|
||
|
|
<!-- glossary:generated - everything below this line is generated by `python -m talemate.game.engine.nodes.tools glossary --write` - do not edit -->
|
||
|
|
|
||
|
|
|
||
|
|
_10 nodes._
|
||
|
|
|
||
|
|
| Node | Registry path |
|
||
|
|
| --- | --- |
|
||
|
|
| [Determine Visual References](#determine-visual-references) | `agents/visual/determineVisualReferences` |
|
||
|
|
| [Generate Avatar](#generate-avatar) | `agents/visual/generateAvatar` |
|
||
|
|
| [Generate Character Portrait Legacy](#generate-character-portrait-legacy) | `agents/visual/GenerateCharacterPortrait` |
|
||
|
|
| [Generate Image Edit](#generate-image-edit) | `agents/visual/generateImageEdit` |
|
||
|
|
| [Generate Visual Asset](#generate-visual-asset) | `agents/visual/generateVisualAsset` |
|
||
|
|
| [Regenerate Visual Asset](#regenerate-visual-asset) | `agents/visual/regenerateVisualAsset` |
|
||
|
|
| [Set Cover Image From Generation](#set-cover-image-from-generation) | `agents/visual/setCoverImageFromGeneration` |
|
||
|
|
| [Wsh Generate Visual Asset Tags](#wsh-generate-visual-asset-tags) | `agents/visual/wshGenerateVisualAssetTags` |
|
||
|
|
| [Wsh Regenerate Visual Asset](#wsh-regenerate-visual-asset) | `agents/visual/wshRegenerateVisualAsset` |
|
||
|
|
| [Wsh Visualize](#wsh-visualize) | `agents/visual/wshVisualize` |
|
||
|
|
|
||
|
|
## Determine Visual References
|
||
|
|
|
||
|
|
`agents/visual/determineVisualReferences`
|
||
|
|
|
||
|
|
Node module (base type `core/Graph`) defined in `src/talemate/agents/visual/modules/determine-visual-references.json`.
|
||
|
|
|
||
|
|
**Inputs**
|
||
|
|
|
||
|
|
| Input | Type | Description |
|
||
|
|
| --- | --- | --- |
|
||
|
|
| `state` | `any` | |
|
||
|
|
| `prompt` | `str` | |
|
||
|
|
| `vis_type` | `str` | |
|
||
|
|
|
||
|
|
**Outputs**
|
||
|
|
|
||
|
|
| Output | Type | Description |
|
||
|
|
| --- | --- | --- |
|
||
|
|
| `state` | `any` | |
|
||
|
|
| `prompt` | `str` | |
|
||
|
|
| `references` | `list` | |
|
||
|
|
| `vis_type` | `str` | |
|
||
|
|
| `asset_ids` | `list` | |
|
||
|
|
|
||
|
|
## Generate Avatar
|
||
|
|
|
||
|
|
`agents/visual/generateAvatar`
|
||
|
|
|
||
|
|
Node module (base type `core/Graph`) defined in `src/talemate/agents/visual/modules/generate-avatar.json`.
|
||
|
|
|
||
|
|
**Inputs**
|
||
|
|
|
||
|
|
| Input | Type | Description |
|
||
|
|
| --- | --- | --- |
|
||
|
|
| `state` | `any` | |
|
||
|
|
| `character` | `character` | |
|
||
|
|
| `instructions` | `str` | |
|
||
|
|
| `set_current_avatar` | `bool` | |
|
||
|
|
| `set_default_avatar` | `bool` | |
|
||
|
|
| `tags` | `list` | (optional) |
|
||
|
|
| `asset_name` | `str` | (optional) |
|
||
|
|
| `asset_ctx` | `asset_attachment_context` | (optional) |
|
||
|
|
|
||
|
|
**Outputs**
|
||
|
|
|
||
|
|
| Output | Type | Description |
|
||
|
|
| --- | --- | --- |
|
||
|
|
| `state` | `any` | |
|
||
|
|
| `character` | `character` | |
|
||
|
|
| `instructions` | `str` | |
|
||
|
|
| `set_current_avatar` | `bool` | |
|
||
|
|
| `set_default_avatar` | `bool` | |
|
||
|
|
| `tags` | `list` | |
|
||
|
|
| `asset_name` | `str` | |
|
||
|
|
| `asset_ctx` | `asset_attachment_context` | |
|
||
|
|
| `generation_request` | `visual/generation_request` | |
|
||
|
|
|
||
|
|
## Generate Character Portrait Legacy
|
||
|
|
|
||
|
|
`agents/visual/GenerateCharacterPortrait`
|
||
|
|
|
||
|
|
Node module (base type `core/Graph`) defined in `src/talemate/agents/visual/modules/generate-character-portrait-legacy.json`.
|
||
|
|
|
||
|
|
**Inputs**
|
||
|
|
|
||
|
|
| Input | Type | Description |
|
||
|
|
| --- | --- | --- |
|
||
|
|
| `state` | `any` | |
|
||
|
|
| `character` | `any` | |
|
||
|
|
| `instructions` | `str` | (optional) |
|
||
|
|
|
||
|
|
**Outputs**
|
||
|
|
|
||
|
|
| Output | Type | Description |
|
||
|
|
| --- | --- | --- |
|
||
|
|
| `state` | `any` | |
|
||
|
|
| `character` | `any` | |
|
||
|
|
| `instructions` | `str` | |
|
||
|
|
|
||
|
|
## Generate Image Edit
|
||
|
|
|
||
|
|
`agents/visual/generateImageEdit`
|
||
|
|
|
||
|
|
Node module (base type `core/Graph`) defined in `src/talemate/agents/visual/modules/generate-image-edit.json`.
|
||
|
|
|
||
|
|
**Inputs**
|
||
|
|
|
||
|
|
| Input | Type | Description |
|
||
|
|
| --- | --- | --- |
|
||
|
|
| `state` | `any` | |
|
||
|
|
| `instructions` | `str` | |
|
||
|
|
| `asset_id` | `str` | |
|
||
|
|
| `callback` | `function` | (optional) |
|
||
|
|
| `asset_ctx` | `asset_attachment_context` | (optional) |
|
||
|
|
| `vis_type` | `str` | (optional) |
|
||
|
|
| `format` | `str` | (optional) |
|
||
|
|
|
||
|
|
**Outputs**
|
||
|
|
|
||
|
|
| Output | Type | Description |
|
||
|
|
| --- | --- | --- |
|
||
|
|
| `state` | `any` | |
|
||
|
|
| `instructions` | `str` | |
|
||
|
|
| `asset_id` | `str` | |
|
||
|
|
| `asset_ctx` | `asset_attachment_context` | |
|
||
|
|
| `vis_type` | `str` | |
|
||
|
|
| `format` | `str` | |
|
||
|
|
| `generation_request` | `visual/generation_request` | |
|
||
|
|
| `generation_response` | `visual/generation_response` | |
|
||
|
|
|
||
|
|
## Generate Visual Asset
|
||
|
|
|
||
|
|
`agents/visual/generateVisualAsset`
|
||
|
|
|
||
|
|
Node module (base type `core/Graph`) defined in `src/talemate/agents/visual/modules/generate-visual-asset.json`.
|
||
|
|
|
||
|
|
**Inputs**
|
||
|
|
|
||
|
|
| Input | Type | Description |
|
||
|
|
| --- | --- | --- |
|
||
|
|
| `state` | `any` | |
|
||
|
|
| `character` | `character` | (optional) |
|
||
|
|
| `vis_type` | `str` | |
|
||
|
|
| `instructions` | `str` | (optional) |
|
||
|
|
| `prompt_only` | `bool` | (optional) |
|
||
|
|
| `callback` | `function` | (optional) |
|
||
|
|
| `asset_ctx` | `asset_attachment_context` | (optional) |
|
||
|
|
|
||
|
|
**Outputs**
|
||
|
|
|
||
|
|
| Output | Type | Description |
|
||
|
|
| --- | --- | --- |
|
||
|
|
| `state` | `any` | |
|
||
|
|
| `character` | `character` | |
|
||
|
|
| `vis_type` | `str` | |
|
||
|
|
| `instructions` | `str` | |
|
||
|
|
| `prompt_only` | `bool` | |
|
||
|
|
| `callback` | `function` | |
|
||
|
|
| `asset_ctx` | `asset_attachment_context` | |
|
||
|
|
| `prompt` | `str` | |
|
||
|
|
| `visual_prompt` | `visual/prompt` | |
|
||
|
|
| `generation_request` | `visual/generation_request` | |
|
||
|
|
|
||
|
|
## Regenerate Visual Asset
|
||
|
|
|
||
|
|
`agents/visual/regenerateVisualAsset`
|
||
|
|
|
||
|
|
Node module (base type `core/Graph`) defined in `src/talemate/agents/visual/modules/regenerate-visual-asset.json`.
|
||
|
|
|
||
|
|
**Inputs**
|
||
|
|
|
||
|
|
| Input | Type | Description |
|
||
|
|
| --- | --- | --- |
|
||
|
|
| `state` | `any` | |
|
||
|
|
| `asset_id` | `str` | |
|
||
|
|
| `asset_ctx` | `asset_attachment_context` | (optional) |
|
||
|
|
| `instructions` | `str` | (optional) |
|
||
|
|
| `callback` | `function` | (optional) |
|
||
|
|
|
||
|
|
**Outputs**
|
||
|
|
|
||
|
|
| Output | Type | Description |
|
||
|
|
| --- | --- | --- |
|
||
|
|
| `state` | `any` | |
|
||
|
|
| `asset_id` | `str` | |
|
||
|
|
| `asset_ctx` | `asset_attachment_context` | |
|
||
|
|
| `instructions` | `str` | |
|
||
|
|
| `callback` | `function` | |
|
||
|
|
|
||
|
|
## Set Cover Image From Generation
|
||
|
|
|
||
|
|
`agents/visual/setCoverImageFromGeneration`
|
||
|
|
|
||
|
|
Node module (base type `core/Graph`) defined in `src/talemate/agents/visual/modules/set-cover-image-from-generation.json`.
|
||
|
|
|
||
|
|
**Inputs**
|
||
|
|
|
||
|
|
| Input | Type | Description |
|
||
|
|
| --- | --- | --- |
|
||
|
|
| `state` | `any` | |
|
||
|
|
| `generation_response` | `visual/generation_response` | |
|
||
|
|
| `reference_for` | `list` | (optional) |
|
||
|
|
|
||
|
|
**Outputs**
|
||
|
|
|
||
|
|
| Output | Type | Description |
|
||
|
|
| --- | --- | --- |
|
||
|
|
| `state` | `any` | |
|
||
|
|
| `generation_response` | `visual/generation_response` | |
|
||
|
|
| `asset_id` | `str` | |
|
||
|
|
| `reference_for` | `list` | |
|
||
|
|
|
||
|
|
## Wsh Generate Visual Asset Tags
|
||
|
|
|
||
|
|
`agents/visual/wshGenerateVisualAssetTags`
|
||
|
|
|
||
|
|
Node module (base type `agents/AgentWebsocketHandler`) defined in `src/talemate/agents/visual/modules/wsh-generate-visual-asset-tags.json`.
|
||
|
|
|
||
|
|
**Outputs**
|
||
|
|
|
||
|
|
| Output | Type | Description |
|
||
|
|
| --- | --- | --- |
|
||
|
|
| `fn` | `function` | |
|
||
|
|
| `name` | `str` | |
|
||
|
|
| `allow_multiple_calls` | `bool` | |
|
||
|
|
| `ai_callback` | `focal/callback` | |
|
||
|
|
|
||
|
|
**Properties**
|
||
|
|
|
||
|
|
| Property | Type | Default | Description |
|
||
|
|
| --- | --- | --- | --- |
|
||
|
|
| `agent` | `str` | `"visual"` | The agent to register the handler on. Choices are generated at runtime. |
|
||
|
|
| `name` | `str` | `"generate_tags"` | The name of the handler |
|
||
|
|
|
||
|
|
## Wsh Regenerate Visual Asset
|
||
|
|
|
||
|
|
`agents/visual/wshRegenerateVisualAsset`
|
||
|
|
|
||
|
|
Node module (base type `agents/AgentWebsocketHandler`) defined in `src/talemate/agents/visual/modules/wsh-regenerate-visual-asset.json`.
|
||
|
|
|
||
|
|
**Outputs**
|
||
|
|
|
||
|
|
| Output | Type | Description |
|
||
|
|
| --- | --- | --- |
|
||
|
|
| `fn` | `function` | |
|
||
|
|
| `name` | `str` | |
|
||
|
|
| `allow_multiple_calls` | `bool` | |
|
||
|
|
| `ai_callback` | `focal/callback` | |
|
||
|
|
|
||
|
|
**Properties**
|
||
|
|
|
||
|
|
| Property | Type | Default | Description |
|
||
|
|
| --- | --- | --- | --- |
|
||
|
|
| `name` | `str` | `"revisualize"` | The name of the handler |
|
||
|
|
| `agent` | `str` | `"visual"` | The agent to register the handler on. Choices are generated at runtime. |
|
||
|
|
|
||
|
|
## Wsh Visualize
|
||
|
|
|
||
|
|
`agents/visual/wshVisualize`
|
||
|
|
|
||
|
|
Node module (base type `agents/AgentWebsocketHandler`) defined in `src/talemate/agents/visual/modules/wsh-visualize.json`.
|
||
|
|
|
||
|
|
**Outputs**
|
||
|
|
|
||
|
|
| Output | Type | Description |
|
||
|
|
| --- | --- | --- |
|
||
|
|
| `fn` | `function` | |
|
||
|
|
| `name` | `str` | |
|
||
|
|
| `allow_multiple_calls` | `bool` | |
|
||
|
|
| `ai_callback` | `focal/callback` | |
|
||
|
|
|
||
|
|
**Properties**
|
||
|
|
|
||
|
|
| Property | Type | Default | Description |
|
||
|
|
| --- | --- | --- | --- |
|
||
|
|
| `agent` | `str` | `"visual"` | The agent to register the handler on. Choices are generated at runtime. |
|
||
|
|
| `name` | `str` | `"visualize"` | The name of the handler |
|