mirror of
https://github.com/vegu-ai/talemate.git
synced 2026-05-18 05:05:39 +02:00
0.36.1 (#263)
* fix white space issues in contextual generate causing problems with list creation tasks * Implement early termination for SSE events in TextGeneratorWebuiClient when receiving "[DONE]" signal, * gemma-4 template * prompt tweaks * set 0.36.1 * update what's new * prompt tweaks * update test baselines * prompt tweaks * update changelog
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "talemate"
|
||||
version = "0.36.0"
|
||||
version = "0.36.1"
|
||||
description = "AI-backed roleplay and narrative tools"
|
||||
authors = [{name = "VeguAITools"}]
|
||||
license = {text = "GNU Affero General Public License v3.0"}
|
||||
|
||||
@@ -205,6 +205,8 @@ class TextGeneratorWebuiClient(OpenAIVisionMixin, ClientBase):
|
||||
sse = sseclient.SSEClient(stream_response)
|
||||
|
||||
for event in sse.events():
|
||||
if event.data == "[DONE]":
|
||||
break
|
||||
payload = json.loads(event.data)
|
||||
chunk = payload["choices"][0]["text"]
|
||||
response += chunk
|
||||
|
||||
@@ -127,5 +127,5 @@ Override example:
|
||||
{# END TASK DISPATCH #}
|
||||
|
||||
{# RESPONSE SCAFFOLDING #}
|
||||
{% include "contextual-generate/response-scaffolding.jinja2" %}
|
||||
{# END RESPONSE SCAFFOLDING #}
|
||||
{%- include "contextual-generate/response-scaffolding.jinja2" -%}
|
||||
{#- END RESPONSE SCAFFOLDING -#}
|
||||
|
||||
@@ -10,12 +10,12 @@
|
||||
#}
|
||||
|
||||
{# List response preparation #}
|
||||
{% if context_typ == "list" and can_coerce %}
|
||||
{% if action_task == "Add to the existing" %}
|
||||
{%- if context_typ == "list" and can_coerce -%}
|
||||
{%- if action_task == "Add to the existing" -%}
|
||||
{{ set_prepared_response('additional items:\n1.') }}
|
||||
{% else %}
|
||||
{%- else -%}
|
||||
{{ set_prepared_response('items:\n1.') }}
|
||||
{% endif %}
|
||||
{%- endif -%}
|
||||
|
||||
{# Task template defined prefix (for anchor extraction) #}
|
||||
{% elif generation_context.get_state('response_prefix') and can_coerce %}
|
||||
@@ -52,4 +52,4 @@ Continue this text: {{ generation_context.partial }}
|
||||
{%- elif context_typ not in ['scene type description', 'scene type instructions'] -%}
|
||||
{{ context_name }}:
|
||||
{%- endif -%}
|
||||
{% endif %}
|
||||
{%- endif -%}
|
||||
@@ -11,6 +11,12 @@ Override example:
|
||||
{% set last_message = scene.last_message_of_type(["character", "narrator"]) %}
|
||||
Move the story forward with a specific, purposeful event or action. Focus on what happens next rather than elaborating on the current state. Use vivid details only to support the progression of the narrative.
|
||||
|
||||
Write ONLY as the narrator. Do NOT generate dialogue entries for characters (e.g., no "CHARACTER NAME\n dialogue..." blocks). Your output should be a single continuous narration passage. You may paraphrase or summarize what characters say or do, but never write their direct dialogue lines as if you were them.
|
||||
|
||||
Do NOT re-describe sensory details, atmosphere, or environmental conditions that are already established in the scene history. If the scene has already conveyed that a corridor is warped, the air smells wrong, or the lights are flickering — trust that the reader knows. Reference established details briefly if needed for continuity, but do not re-render them at full length. Spend your words on NEW events, actions, and information.
|
||||
|
||||
Avoid repeating distinctive adjectives and similes that appear in the scene history. If you need to reference an established detail, use plain language rather than inventing a new elaborate description for the same thing.
|
||||
|
||||
{% if last_message %}
|
||||
``` the current moment in the scene
|
||||
{{ last_message }}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
__all__ = ["VERSION"]
|
||||
|
||||
VERSION = "0.36.0"
|
||||
VERSION = "0.36.1"
|
||||
|
||||
16
talemate_frontend/package-lock.json
generated
16
talemate_frontend/package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "talemate_frontend",
|
||||
"version": "0.36.0",
|
||||
"version": "0.36.1",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "talemate_frontend",
|
||||
"version": "0.36.0",
|
||||
"version": "0.36.1",
|
||||
"dependencies": {
|
||||
"@codemirror/lang-json": "^6.0.1",
|
||||
"@codemirror/lang-markdown": "^6.2.5",
|
||||
@@ -1731,9 +1731,9 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/lodash": {
|
||||
"version": "4.17.23",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.23.tgz",
|
||||
"integrity": "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==",
|
||||
"version": "4.18.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.18.1.tgz",
|
||||
"integrity": "sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/magic-string": {
|
||||
@@ -1789,9 +1789,9 @@
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/picomatch": {
|
||||
"version": "4.0.3",
|
||||
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz",
|
||||
"integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
|
||||
"version": "4.0.4",
|
||||
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz",
|
||||
"integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==",
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "talemate_frontend",
|
||||
"version": "0.36.0",
|
||||
"version": "0.36.1",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
||||
@@ -82,8 +82,25 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
dialog: false,
|
||||
selected: "0.36.0",
|
||||
selected: "0.36.1",
|
||||
whatsNew: [
|
||||
{
|
||||
version: '0.36.1',
|
||||
items: [
|
||||
{
|
||||
title: "Gemma 4 Support",
|
||||
description: "Added prompt template for Gemma 4 models."
|
||||
},
|
||||
{
|
||||
title: "Bug Fixes",
|
||||
items: [
|
||||
"Fixed white space issues in contextual generate causing problems with list creation tasks",
|
||||
"Fixed termination for SSE events in text-generation-webui client when receiving \"[DONE]\" signal",
|
||||
"Prompt tweaks for narrator progress"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
version: '0.36.0',
|
||||
items: [
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
export const FRONTEND_VERSION = "0.36.0";
|
||||
export const FRONTEND_VERSION = "0.36.1";
|
||||
|
||||
export function versionsMatch(backendVersion) {
|
||||
return FRONTEND_VERSION === backendVersion;
|
||||
|
||||
12
templates/llm-prompt/std/Gemma4.jinja2
Normal file
12
templates/llm-prompt/std/Gemma4.jinja2
Normal file
@@ -0,0 +1,12 @@
|
||||
{%- if reasoning_tokens %}{% set _ = spec.set_spec("reasoning_pattern", ".*?<channel\\|>") %}{% endif -%}
|
||||
<bos><|turn>system
|
||||
{% if reasoning_tokens %}<|think|>{% endif %}{{ system_message }}<turn|>
|
||||
<|turn>user
|
||||
{{ user_message }}<turn|>
|
||||
<|turn>model
|
||||
{% if not reasoning_tokens %}<|channel>thought
|
||||
<channel|>
|
||||
|
||||
{{ coercion_message }}
|
||||
{%- else %}{{ coercion_message }}
|
||||
{%- endif -%}
|
||||
@@ -21,6 +21,12 @@ Marcus: What brings you to these woods?
|
||||
|
||||
Move the story forward with a specific, purposeful event or action. Focus on what happens next rather than elaborating on the current state. Use vivid details only to support the progression of the narrative.
|
||||
|
||||
Write ONLY as the narrator. Do NOT generate dialogue entries for characters (e.g., no "CHARACTER NAME\n dialogue..." blocks). Your output should be a single continuous narration passage. You may paraphrase or summarize what characters say or do, but never write their direct dialogue lines as if you were them.
|
||||
|
||||
Do NOT re-describe sensory details, atmosphere, or environmental conditions that are already established in the scene history. If the scene has already conveyed that a corridor is warped, the air smells wrong, or the lights are flickering — trust that the reader knows. Reference established details briefly if needed for continuity, but do not re-render them at full length. Spend your words on NEW events, actions, and information.
|
||||
|
||||
Avoid repeating distinctive adjectives and similes that appear in the scene history. If you need to reference an established detail, use plain language rather than inventing a new elaborate description for the same thing.
|
||||
|
||||
``` the current moment in the scene
|
||||
Elena: Hello there, traveler.
|
||||
```
|
||||
|
||||
@@ -21,6 +21,12 @@ Marcus: What brings you to these woods?
|
||||
|
||||
Move the story forward with a specific, purposeful event or action. Focus on what happens next rather than elaborating on the current state. Use vivid details only to support the progression of the narrative.
|
||||
|
||||
Write ONLY as the narrator. Do NOT generate dialogue entries for characters (e.g., no "CHARACTER NAME\n dialogue..." blocks). Your output should be a single continuous narration passage. You may paraphrase or summarize what characters say or do, but never write their direct dialogue lines as if you were them.
|
||||
|
||||
Do NOT re-describe sensory details, atmosphere, or environmental conditions that are already established in the scene history. If the scene has already conveyed that a corridor is warped, the air smells wrong, or the lights are flickering — trust that the reader knows. Reference established details briefly if needed for continuity, but do not re-render them at full length. Spend your words on NEW events, actions, and information.
|
||||
|
||||
Avoid repeating distinctive adjectives and similes that appear in the scene history. If you need to reference an established detail, use plain language rather than inventing a new elaborate description for the same thing.
|
||||
|
||||
``` the current moment in the scene
|
||||
Elena: Hello there, traveler.
|
||||
```
|
||||
|
||||
@@ -21,6 +21,12 @@ Marcus: What brings you to these woods?
|
||||
|
||||
Move the story forward with a specific, purposeful event or action. Focus on what happens next rather than elaborating on the current state. Use vivid details only to support the progression of the narrative.
|
||||
|
||||
Write ONLY as the narrator. Do NOT generate dialogue entries for characters (e.g., no "CHARACTER NAME\n dialogue..." blocks). Your output should be a single continuous narration passage. You may paraphrase or summarize what characters say or do, but never write their direct dialogue lines as if you were them.
|
||||
|
||||
Do NOT re-describe sensory details, atmosphere, or environmental conditions that are already established in the scene history. If the scene has already conveyed that a corridor is warped, the air smells wrong, or the lights are flickering — trust that the reader knows. Reference established details briefly if needed for continuity, but do not re-render them at full length. Spend your words on NEW events, actions, and information.
|
||||
|
||||
Avoid repeating distinctive adjectives and similes that appear in the scene history. If you need to reference an established detail, use plain language rather than inventing a new elaborate description for the same thing.
|
||||
|
||||
``` the current moment in the scene
|
||||
Elena: Hello there, traveler.
|
||||
```
|
||||
|
||||
@@ -21,6 +21,12 @@ Marcus: What brings you to these woods?
|
||||
|
||||
Move the story forward with a specific, purposeful event or action. Focus on what happens next rather than elaborating on the current state. Use vivid details only to support the progression of the narrative.
|
||||
|
||||
Write ONLY as the narrator. Do NOT generate dialogue entries for characters (e.g., no "CHARACTER NAME\n dialogue..." blocks). Your output should be a single continuous narration passage. You may paraphrase or summarize what characters say or do, but never write their direct dialogue lines as if you were them.
|
||||
|
||||
Do NOT re-describe sensory details, atmosphere, or environmental conditions that are already established in the scene history. If the scene has already conveyed that a corridor is warped, the air smells wrong, or the lights are flickering — trust that the reader knows. Reference established details briefly if needed for continuity, but do not re-render them at full length. Spend your words on NEW events, actions, and information.
|
||||
|
||||
Avoid repeating distinctive adjectives and similes that appear in the scene history. If you need to reference an established detail, use plain language rather than inventing a new elaborate description for the same thing.
|
||||
|
||||
``` the current moment in the scene
|
||||
Elena: Hello there, traveler.
|
||||
```
|
||||
|
||||
@@ -21,6 +21,12 @@ Marcus: What brings you to these woods?
|
||||
|
||||
Move the story forward with a specific, purposeful event or action. Focus on what happens next rather than elaborating on the current state. Use vivid details only to support the progression of the narrative.
|
||||
|
||||
Write ONLY as the narrator. Do NOT generate dialogue entries for characters (e.g., no "CHARACTER NAME\n dialogue..." blocks). Your output should be a single continuous narration passage. You may paraphrase or summarize what characters say or do, but never write their direct dialogue lines as if you were them.
|
||||
|
||||
Do NOT re-describe sensory details, atmosphere, or environmental conditions that are already established in the scene history. If the scene has already conveyed that a corridor is warped, the air smells wrong, or the lights are flickering — trust that the reader knows. Reference established details briefly if needed for continuity, but do not re-render them at full length. Spend your words on NEW events, actions, and information.
|
||||
|
||||
Avoid repeating distinctive adjectives and similes that appear in the scene history. If you need to reference an established detail, use plain language rather than inventing a new elaborate description for the same thing.
|
||||
|
||||
``` the current moment in the scene
|
||||
Elena: Hello there, traveler.
|
||||
```
|
||||
|
||||
@@ -21,6 +21,12 @@ Marcus: What brings you to these woods?
|
||||
|
||||
Move the story forward with a specific, purposeful event or action. Focus on what happens next rather than elaborating on the current state. Use vivid details only to support the progression of the narrative.
|
||||
|
||||
Write ONLY as the narrator. Do NOT generate dialogue entries for characters (e.g., no "CHARACTER NAME\n dialogue..." blocks). Your output should be a single continuous narration passage. You may paraphrase or summarize what characters say or do, but never write their direct dialogue lines as if you were them.
|
||||
|
||||
Do NOT re-describe sensory details, atmosphere, or environmental conditions that are already established in the scene history. If the scene has already conveyed that a corridor is warped, the air smells wrong, or the lights are flickering — trust that the reader knows. Reference established details briefly if needed for continuity, but do not re-render them at full length. Spend your words on NEW events, actions, and information.
|
||||
|
||||
Avoid repeating distinctive adjectives and similes that appear in the scene history. If you need to reference an established detail, use plain language rather than inventing a new elaborate description for the same thing.
|
||||
|
||||
``` the current moment in the scene
|
||||
Elena: Hello there, traveler.
|
||||
```
|
||||
|
||||
@@ -21,6 +21,12 @@ Marcus: What brings you to these woods?
|
||||
|
||||
Move the story forward with a specific, purposeful event or action. Focus on what happens next rather than elaborating on the current state. Use vivid details only to support the progression of the narrative.
|
||||
|
||||
Write ONLY as the narrator. Do NOT generate dialogue entries for characters (e.g., no "CHARACTER NAME\n dialogue..." blocks). Your output should be a single continuous narration passage. You may paraphrase or summarize what characters say or do, but never write their direct dialogue lines as if you were them.
|
||||
|
||||
Do NOT re-describe sensory details, atmosphere, or environmental conditions that are already established in the scene history. If the scene has already conveyed that a corridor is warped, the air smells wrong, or the lights are flickering — trust that the reader knows. Reference established details briefly if needed for continuity, but do not re-render them at full length. Spend your words on NEW events, actions, and information.
|
||||
|
||||
Avoid repeating distinctive adjectives and similes that appear in the scene history. If you need to reference an established detail, use plain language rather than inventing a new elaborate description for the same thing.
|
||||
|
||||
``` the current moment in the scene
|
||||
Elena: Hello there, traveler.
|
||||
```
|
||||
|
||||
@@ -21,6 +21,12 @@ Marcus: What brings you to these woods?
|
||||
|
||||
Move the story forward with a specific, purposeful event or action. Focus on what happens next rather than elaborating on the current state. Use vivid details only to support the progression of the narrative.
|
||||
|
||||
Write ONLY as the narrator. Do NOT generate dialogue entries for characters (e.g., no "CHARACTER NAME\n dialogue..." blocks). Your output should be a single continuous narration passage. You may paraphrase or summarize what characters say or do, but never write their direct dialogue lines as if you were them.
|
||||
|
||||
Do NOT re-describe sensory details, atmosphere, or environmental conditions that are already established in the scene history. If the scene has already conveyed that a corridor is warped, the air smells wrong, or the lights are flickering — trust that the reader knows. Reference established details briefly if needed for continuity, but do not re-render them at full length. Spend your words on NEW events, actions, and information.
|
||||
|
||||
Avoid repeating distinctive adjectives and similes that appear in the scene history. If you need to reference an established detail, use plain language rather than inventing a new elaborate description for the same thing.
|
||||
|
||||
``` the current moment in the scene
|
||||
Elena: Hello there, traveler.
|
||||
```
|
||||
|
||||
@@ -21,6 +21,12 @@ Marcus: What brings you to these woods?
|
||||
|
||||
Move the story forward with a specific, purposeful event or action. Focus on what happens next rather than elaborating on the current state. Use vivid details only to support the progression of the narrative.
|
||||
|
||||
Write ONLY as the narrator. Do NOT generate dialogue entries for characters (e.g., no "CHARACTER NAME\n dialogue..." blocks). Your output should be a single continuous narration passage. You may paraphrase or summarize what characters say or do, but never write their direct dialogue lines as if you were them.
|
||||
|
||||
Do NOT re-describe sensory details, atmosphere, or environmental conditions that are already established in the scene history. If the scene has already conveyed that a corridor is warped, the air smells wrong, or the lights are flickering — trust that the reader knows. Reference established details briefly if needed for continuity, but do not re-render them at full length. Spend your words on NEW events, actions, and information.
|
||||
|
||||
Avoid repeating distinctive adjectives and similes that appear in the scene history. If you need to reference an established detail, use plain language rather than inventing a new elaborate description for the same thing.
|
||||
|
||||
``` the current moment in the scene
|
||||
Elena: Hello there, traveler.
|
||||
```
|
||||
|
||||
@@ -21,6 +21,12 @@ Marcus: What brings you to these woods?
|
||||
|
||||
Move the story forward with a specific, purposeful event or action. Focus on what happens next rather than elaborating on the current state. Use vivid details only to support the progression of the narrative.
|
||||
|
||||
Write ONLY as the narrator. Do NOT generate dialogue entries for characters (e.g., no "CHARACTER NAME\n dialogue..." blocks). Your output should be a single continuous narration passage. You may paraphrase or summarize what characters say or do, but never write their direct dialogue lines as if you were them.
|
||||
|
||||
Do NOT re-describe sensory details, atmosphere, or environmental conditions that are already established in the scene history. If the scene has already conveyed that a corridor is warped, the air smells wrong, or the lights are flickering — trust that the reader knows. Reference established details briefly if needed for continuity, but do not re-render them at full length. Spend your words on NEW events, actions, and information.
|
||||
|
||||
Avoid repeating distinctive adjectives and similes that appear in the scene history. If you need to reference an established detail, use plain language rather than inventing a new elaborate description for the same thing.
|
||||
|
||||
``` the current moment in the scene
|
||||
Elena: Hello there, traveler.
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user