mirror of
https://github.com/Dasemu/si-no-o-indiferente.git
synced 2026-11-27 07:46:31 +00:00
Add player difficulty ratings, drop hint system, use Peninsular Spanish in Gemini prompt
Players can now submit a voluntary 1-5 difficulty rating after a story ends (POST /api/stories/:id/ratings), stored in data/ratings.json. A new reclassifyDifficulty script (wired to a weekly systemd timer) averages those ratings and adjusts a story's difficulty band once it has enough votes. The progressive hint system is removed end-to-end (schema, Gemini prompt/response schema, generation instructions), and the Gemini prompt is rewritten in Peninsular Spanish with an explicit instruction to generate story content in Spain Spanish rather than any LatAm variant. Also translates remaining Spanish code comments/error strings to English and updates the backend README and systemd units accordingly.
This commit is contained in:
1 parent
7f3e6cc839
commit
99a903f6e1
20 files changed
+275
-97
No files matched your search
+13
-9
@@ -1,21 +1,25 @@
|
||||
# Puerto donde escucha la API
|
||||
# Port the API listens on
|
||||
PORT=8787
|
||||
|
||||
# Origen permitido para CORS (la URL desde donde se sirve el frontend/PWA).
|
||||
# Usa "*" solo en desarrollo.
|
||||
# Allowed CORS origin (the URL the frontend/PWA is served from).
|
||||
# Use "*" only in development.
|
||||
CORS_ORIGIN=*
|
||||
|
||||
# API key de Google Gemini (https://aistudio.google.com/apikey)
|
||||
# Google Gemini API key (https://aistudio.google.com/apikey)
|
||||
GEMINI_API_KEY=
|
||||
|
||||
# Modelo de Gemini a usar para generar historias
|
||||
# Gemini model used to generate stories
|
||||
GEMINI_MODEL=gemini-2.5-flash
|
||||
|
||||
# Cuantas historias nuevas generar por dia
|
||||
# How many new stories to generate per day
|
||||
STORIES_PER_DAY=5
|
||||
|
||||
# Carpeta donde se guardan las historias generadas (JSON), relativa al backend
|
||||
# Folder where generated stories (JSON) are stored, relative to the backend
|
||||
DATA_DIR=./data
|
||||
|
||||
# Token secreto para poder disparar la generacion manualmente via POST /api/admin/generate
|
||||
ADMIN_TOKEN=cambia-este-token
|
||||
# Secret token to manually trigger generation via POST /api/admin/generate
|
||||
ADMIN_TOKEN=change-this-token
|
||||
|
||||
# Minimum number of player ratings a story needs before the periodic
|
||||
# reclassification job will adjust its difficulty
|
||||
MIN_RATINGS_FOR_RECLASSIFICATION=3
|
||||
Reference in new issue
Block a user