Isaac Quarenta commited on
Commit
0bbf010
·
1 Parent(s): feca3d8

fix: pre-warm ThinkingEngine usa think() correto, fallback cot_max_tokens=800, pg_ctlcluster 15

Browse files
modules/api.py CHANGED
@@ -2818,7 +2818,7 @@ class AkiraAPI:
2818
  get_embedding_model_instance()
2819
  # Pré-aquece ThinkingEngine
2820
  te = ThinkingEngine()
2821
- _ = te.generate_thought("warmup", "olá")
2822
  logger.info("Pre-warm concluido: ThinkingEngine + BERT carregados")
2823
  except Exception as e:
2824
  logger.debug(f"Pre-warm falhou (não crítico): {e}")
 
2818
  get_embedding_model_instance()
2819
  # Pré-aquece ThinkingEngine
2820
  te = ThinkingEngine()
2821
+ _ = te.think(mensagem="olá", llm_manager=None)
2822
  logger.info("Pre-warm concluido: ThinkingEngine + BERT carregados")
2823
  except Exception as e:
2824
  logger.debug(f"Pre-warm falhou (não crítico): {e}")
modules/thinking_engine.py CHANGED
@@ -849,7 +849,7 @@ class ThinkingEngine:
849
  try:
850
  from . import config
851
  cot_timeout = getattr(config, 'THINKING_COT_TIMEOUT', 30)
852
- cot_max_tokens = getattr(config, 'THINKING_COT_MAX_TOKENS', 2000)
853
  except Exception:
854
  cot_timeout = 30
855
  cot_max_tokens = 2000
 
849
  try:
850
  from . import config
851
  cot_timeout = getattr(config, 'THINKING_COT_TIMEOUT', 30)
852
+ cot_max_tokens = getattr(config, 'THINKING_COT_MAX_TOKENS', 800)
853
  except Exception:
854
  cot_timeout = 30
855
  cot_max_tokens = 2000
scripts/init_pg.sh CHANGED
@@ -16,7 +16,7 @@ if [ ! -f "$PGDATA/PG_VERSION" ]; then
16
  su - postgres -c "initdb -D $PGDATA" 2>/dev/null || true
17
  fi
18
 
19
- su - postgres -c "pg_ctl -D $PGDATA start" 2>/dev/null || pg_ctlcluster 17 main start 2>/dev/null || service postgresql start
20
 
21
  for i in $(seq 1 30); do
22
  if pg_isready -q 2>/dev/null; then
 
16
  su - postgres -c "initdb -D $PGDATA" 2>/dev/null || true
17
  fi
18
 
19
+ su - postgres -c "pg_ctl -D $PGDATA start" 2>/dev/null || pg_ctlcluster 15 main start 2>/dev/null || service postgresql start
20
 
21
  for i in $(seq 1 30); do
22
  if pg_isready -q 2>/dev/null; then