mirror of
https://github.com/vegu-ai/talemate.git
synced 2026-09-01 19:48:52 +02:00
fix: prevent duplicated character descriptions in prompts
This commit is contained in:
@@ -48,6 +48,7 @@
|
||||
- "macOS Modifiers: Ctrl+click affordances throughout the UI now also accept Cmd (Meta) on macOS, where the OS reserves Ctrl+click for the system context menu. Tooltips, hints, and docs label the modifier as Cmd on Mac and Ctrl elsewhere. Affects regenerate, scene tools (narrator/director/actor/creative), world state manager, contextual generate, message asset image, autocomplete (Ctrl+Enter), and history navigation. (#261)"
|
||||
- "Game Loop Actor Iter: Fixed a bug where the `game_loop_actor_iter` event was only firing for player turns, so agents that listen for actor iteration (like passive narration) silently skipped AI turns."
|
||||
- "OpenRouter: Fixed redundant provider/model list fetches when multiple OpenRouter clients are configured. Concurrent `status()` calls all saw the fetched-flag as still false and each kicked off its own HTTP request; the fetches are now serialized with an asyncio lock and double-checked locking so only one request runs."
|
||||
- "Character Prompts: Fixed duplicated character description in prompts. When the LLM-generated character sheet contained a `description` attribute (common — the extractor often emits one), it was rendered alongside the standalone description field, repeating the same text twice. Templates that render both now filter `description` out of the sheet (case-insensitive). Affects the dialogue, narrator, director (voice assignment), and creator (dialogue examples, dialogue instructions, character goals, contextual generate) prompt paths."
|
||||
improvements:
|
||||
- "System Prompt Override Indicators: The system prompt override list now shows a pencil icon next to entries that have an active override, making it easy to see which prompts have been customized."
|
||||
- "Search Strictness: The distance_mod embedding preset value is now a float (was int) with a range of 0.1–2.0, allowing both tighter and looser similarity matching. A 'Search Strictness' slider is now available in the Context Database UI, letting users tune search sensitivity on the fly. Changes persist to the active embedding preset immediately."
|
||||
|
||||
@@ -140,10 +140,11 @@ class Character(pydantic.BaseModel):
|
||||
"description": self.description,
|
||||
}
|
||||
|
||||
exclude_lower = {e.lower() for e in exclude}
|
||||
sheet_list = []
|
||||
|
||||
for key, value in sheet.items():
|
||||
if key not in exclude:
|
||||
if key.lower() not in exclude_lower:
|
||||
sheet_list.append(f"{key}: {value}")
|
||||
|
||||
return "\n".join(sheet_list)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
{# active characters #}{% for character in characters|default(scene.characters) %}
|
||||
{% if not skip_characters or character.name not in skip_characters %}
|
||||
### {{ character.name }}
|
||||
{% if not skip_sheet %}{{ character.sheet }}{% endif %}
|
||||
{% if not skip_sheet %}{{ character.sheet_filtered("description") }}{% endif %}
|
||||
|
||||
{% if query_personality -%}
|
||||
{{ query_memory("what is "+character.name+"'s personality?", as_question_answer=False) }}
|
||||
|
||||
@@ -11,7 +11,7 @@ Override example:
|
||||
<|SECTION:CHARACTERS|>
|
||||
{% for character in characters %}
|
||||
### {{ character.name }}
|
||||
{{ character.sheet }}
|
||||
{{ character.sheet_filtered("description") }}
|
||||
|
||||
{{ character.description }}
|
||||
{% endfor %}
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
{{ character.description }}
|
||||
|
||||
{% if not character or not character.name %}name: {{ character_name }}{% endif %}
|
||||
{{ character.sheet_filtered(context_name) }}
|
||||
{{ character.sheet_filtered(context_name, "description") }}
|
||||
{% else %}
|
||||
{{ character.sheet }}
|
||||
{% endif %}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
{# CHARACTER CONTEXT #}
|
||||
{% set character_context %}
|
||||
<|SECTION:CHARACTER|>
|
||||
{{ character.sheet }}
|
||||
{{ character.sheet_filtered("description") }}
|
||||
{{ character.description }}
|
||||
<|CLOSE_SECTION|>
|
||||
{% endset %}
|
||||
|
||||
@@ -8,7 +8,7 @@ Override example:
|
||||
-#}
|
||||
{% set extra_context_content %}
|
||||
<|SECTION:CHARACTER|>
|
||||
{{ character.sheet }}
|
||||
{{ character.sheet_filtered("description") }}
|
||||
{{ character.description }}
|
||||
<|CLOSE_SECTION|>
|
||||
{% include "task-information.jinja2" %}
|
||||
|
||||
@@ -14,7 +14,7 @@ Override example:
|
||||
<|SECTION:CHARACTERS|>
|
||||
{% for character in scene.characters %}
|
||||
### {{ character.name }}
|
||||
{{ character.sheet }}
|
||||
{{ character.sheet_filtered("description") }}
|
||||
|
||||
{{ character.description }}
|
||||
{% endfor %}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<|SECTION:CHARACTER DETAILS - {{ character.name }}|>
|
||||
{{ character.description }}
|
||||
|
||||
{{ character.sheet }}
|
||||
{{ character.sheet_filtered("description") }}
|
||||
<|CLOSE_SECTION|>
|
||||
<|SECTION:VOICES|>
|
||||
{% for voice in voices %}
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
{% endif %}
|
||||
{% if feature_character is defined %}
|
||||
<|SECTION:{{ feature_character.name|upper }}|>
|
||||
{{ feature_character.sheet }}
|
||||
{{ feature_character.sheet_filtered("description") }}
|
||||
|
||||
{{ feature_character.description }}
|
||||
<|CLOSE_SECTION|>
|
||||
|
||||
Reference in New Issue
Block a user