Added emotion normalization and URL config.

This commit is contained in:
2026-03-18 06:19:01 -04:00
parent 68038e2a77
commit 13983ae636
6 changed files with 162 additions and 59 deletions

View File

@@ -8,25 +8,30 @@ label start:
scene bg room
show anita happy with dissolve
$ response = fetch_llm('Start the conversation.')[0]
$ sanitized = sanitize_speech(response)
$ emotion, line = parse_emotion(sanitized)
show anita happy
python:
response = fetch_llm('Start the conversation.')[0]
sanitized = sanitize_speech(response)
emotion, line = parse_emotion(sanitized)
a "[line]"
while True:
$ message = renpy.input(prompt = "What do you say to her?")
$ response = fetch_llm(message)
$ i = 0
python:
message = renpy.input(prompt = "What do you say to her?")
response = fetch_llm(message)
i = 0
while i < len(response):
$ r = response[i].strip()
$ s = sanitize_speech(r)
python:
r = response[i].strip()
s = sanitize_speech(r)
if s != '':
$ emotion, line = parse_emotion(s)
if emotion is not None:
show expression f'anita {emotion}'
a "[line]"
$ i += 1