Spaces:
Running
Running
Commit History
Yesterday
-
fix(kiami): concorrência independente + provedores vivos + BD silencioso Running
Isaac Quarenta- providers: 404/model-gone blacklist 30min; groq fallback list (3.1-8b-instant default); cerebras llama-3.3-70b no lugar do gemma arquivado + 404 continue/raise; cohere propaga 429 - concorrência: blacklist temporária partilhada entre instâncias — 1 request queima = todos saltam; menos burn = sem 'Servidor ocupado' sob msgs simultâneas - BD: PG fail-fast silencioso no init + logs debug em fallback esperado; migração user_emotional_profiles (user_id/profile_data + UNIQUE); finetuning placeholders SQLite (fim do near-%) - lstm stopwords ele/ela (+interrogações)0b44440
21 days ago
-
fix(kiami): bot volta a chamar-se Kiami em prompts, logs e codigo
Isaac Quarenta- rename Belmira->Kiami (502 tokens, 31 ficheiros): SYSTEM_PROMPT, identidade CoT, seeds, logs, classes - preservados: contas externas GITBELMIRA_* e CONTEXT_SALT (sessoes existentes) - dedupe kiami_persona duplicado (thinking_engine, api)87e6231 -
fix(kiami): respostas voltam a chegar — alias Akira, PV sempre responde, PG fail-fast, fila 30s, SQL SQLite
Isaac Quarenta- listen_engine: aliases Akira + PV requer resposta + privilegiado normalizado + reply por qualquer numero do bot - api/escutar: encaminha reply_metadata, rede PV, retorna requer_resposta/deve_chamar_akira; fila Akira 300s->30s + semaforo com timeout - database_pg/database: fail-fast no proxy morto (circuit imediato, timeout 3s, DISABLE_PG), SQLite direto com circuito aberto - aprendizado_continuo/database: INSERT SQLite sem ON CONFLICT, placeholders seguros, kwarg numero_usuario255c3b7
-
fix(identity): Belmira not Kiami - fix bot identity in prompts and database
opencode868802e -
fix(openrouter): remove top_k param + fix(persona): Belmira not Kiami in seeds/overrides
opencode4dd4eba -
fix(backup): suppress pg_dump version mismatch error to debug level
opencodebce4ce8
-
fix(knowledge): buscar_prompts_relevantes implementado + fuzzy typos + seed softedge_linkedin
opencode61f75c2
-
fix: statement_timeout 5s nas queries PG + timing granular no gap pós-EMOTION UPDATE
opencodec822bb0
-
fix(checkpoint): pg_dump version mismatch 18.6 vs 17.11 silencioso - fallback COPY corrigido + erro degradado para debug/return True (HF Spaces)
Belmira SoftEdgee35c32b
-
feat(knowledge): vagas/carreiras - sem vagas abertas, candidatura espontanea + beneficios + como candidatar
Belmira SoftEdge9293e8e -
feat(knowledge): seed completo softedge - sobre, servicos, equipe, stack, trajetoria, contatos (fonte https://softedge-corporation.up.railway.app/)
Belmira SoftEdge36b024a -
fix(knowledge): softedge_website oficial https://softedge-corporation.up.railway.app/ (railway primario, softedge.co.ao alias) - COT info_softedge ja obriga fonte verificada
Belmira SoftEdge4381bb1 -
fix(memory): STM persist + isolation + cache - _save_stm get_all_messages, UNIQUE(conv,msg), pre-save user antes LLM, fallback SALT, thinking cache por conv
Belmira SoftEdge987743c -
feat: Belmira V1 SoftEdge - remodelagem total Akira->Belmira (23 patriota Angola JID 40755431264474/WA 956464620) STM/listen fulano->ciclano claro + persistencia por usuario HF potentes free Qwen72B/Llama70B overwrite production
Belmira SoftEdge35358da
-
fix: CoT usa nome real do utilizador + corrige KeyError frequencia em girias
Isaac Quarenta- Adiciona regra #14 no CoT: forca uso do nome real em todas as referencias - Reforca campos EMOCAO_INTENCAO/CONTEXTO_RELEVANTE/RISCOS_ALUCINACAO com nome - Adiciona verificacao de nome no campo RISCOS_ALUCINACAO [SIM/NAO] - Inclui nome na SUGESTAO_RESPOSTA quando utilizador pergunta o nome - Corrige recuperador_girias_usuario: retorna COALESCE(frequencia, 1) para evitar KeyError - Adiciona .gitignore para __pycache__/logs/tasksae4e396
-
fix: respostas curtas curtas + anti-delirio + CENTRO vs TERCEIRO
Isaac Quarenta- api.py SEARCH BLOCK: mensagens vagas triviais (deixa a outra/ela nao quer/estou pensando) ate 7 palavras sem ? nao disparam web_search, evita 10k bloat e prompt 4174 tokens - api.py web_content: 10000->1800 + filtro ERRO + regra ignorar se nao menciona msg atual - api.py LENGTH: mover LENGTH para final (soberano) + lock FINAL INEGOCIAVEL + hard truncate 3-5 palavras >12 words -> corta para CoT sugestao (ex: Tou cagando.) - database_pg.py buscar_conhecimento: 'ela/outra' so injeta softedge se contexto tem softedge/empresa, evita delirio softedge em msg interpessoal - api.py _build_prompt: anti-hallucination absoluto no topo (Railway/storage/kernel/root/Null Sector) + LSTM suppress para vagas interpessoais (speakers_topics) - api.py STM: fix author_name Kiami + user, CENTRO vs TERCEIRO tagging em context_history e thinking_formatted, intervencao terceiro log - thinking_engine: param replied_to_author + REPLY_ATTRIBUTION intervencao terceiro (Tou cagando. exemplo ele vs voce) - api.py _…6197c5f
-
fix: Kiami não se chama mimi + modelo free + identidade
Isaac Quarenta- config.py:1107, database_pg:1642/1681: APELIDOS agora explicita 'TU NUNCA TE CHAMAS mimi' — mimi é apelido que Isaac usa PARA TI, tu és sempre Kiami - modules/api.py:4186 STRICT_IDENTITY: adiciona anti-alucinação mimi - OPENROUTER_MODEL: google/gemma-3-27b-it:free (404 sem free tier) -> openai/gpt-oss-20b:free (free confirmado, tool calling, 131K)21ae067
-
fix: use apenas DATABASE_URL para PostgreSQL, ignorar SUPABASE_DB_URL
Isaac Quarenta- Database agora só usa DATABASE_URL como gatilho para PostgreSQL - SUPABASE_DB_URL não é mais usado (evita erros em HF Spaces) - Adicionado circuit breaker no database_pg.py para fallback rápido - Adicionadas tabelas faltantes no SQLite (continuous_learning, finetuning_examples, etc) - Corrigido bug de posicionamento conversacional no prompt - Aumentado SESSION_UNSTABLE_COOLDOWN para 5min95259b2
-
chore: atualiza configuracoes e modulos do akira
Isaac Quarenta- .env.example: remove chaves de API reais (secrets nao devem ficar no repo) - config/local_llm/api: ajustes de provedores e rotacao de chaves - modulos de memoria/contexto/persona: refinamentos de sessao - Dockerfile/main: ajustes de runtime9f01c1e
-
Fix: pooler fallback agresivo (mais regiões + session pooler), fix SQLite %s→?, fix finetuning queries, pooler retry em todas tentativas
Isaac Quarentaefbacd8 -
fix: force IPv4 resolution for Supabase pooler hostnames in DNS helper
Isaac QuarentaThe IPv4-first getaddrinfo wrapper now explicitly handles '.supabase.co' direct hosts and 'aws-0-*.pooler.supabase.com' Supavisor pooler hostnames, ensuring they are always resolved via AF_INET to prevent 'Network is unreachable' on HF Spaces.5e3306f -
fix: replace invalid deepseek-ai/DeepSeek-V3 with deepseek/deepseek-chat on OpenRouter
Isaac QuarentaThe model ID 'deepseek-ai/DeepSeek-V3' was rejected by OpenRouter with error 400. Replaced all 9 references across config.py, local_llm.py and modules/ with the correct OpenRouter ID 'deepseek/deepseek-chat'.392e81b -
fix: resolve PostgreSQL hostname to IPv4 first to avoid HF Spaces IPv6 issue
Isaac Quarenta0695520 -
Upload 60 files
Verified signature86f56cb
-
fix(akira): reconnect dead PG pool + cache /api/timers/pending
Isaac QuarentaTwo related production issues observed 2026-07-29 11:49-12:03: 1. Render's managed Postgres drops idle SSL connections, surfacing as 'SSL connection has been closed unexpectedly' in _get_connection and _execute_with_retry. Added psycopg2 keepalives (idle=30, interval=10, count=5) so dead sockets are pinged before being handed out, plus one-shot reconnect on OperationalError with 'SSL connection has been closed' or 'server closed the connection unexpectedly'. 2. /api/timers/pending was being polled every 1-2 seconds with no backoff. Added Cache-Control: max-age=2 header to the response so intermediate caches and well-behaved clients stop hammering the endpoint. Same JSON body, ~50x fewer roundtrips expected. Cascading LSTM background errors should clear once the pool is healthy.a8b1d4d
-
refactor: reforço do tom anti-robô e descolado da Kiami (instructions_prompt, fallbacks, constraints, thinking engine)
Isaac Quarenta0324abf -
feat: Kiami personality overhaul — menos robótica, mais humana, nunca diz 'sou código'
Isaac Quarentace51dbc -
feat: vocabulary in DB, new nicknames mimi/weza/nila/Kianda
Isaac Quarenta- Added vocabulary to persona_config table (vocab_abreviacoes, vocab_vicios, vocab_regras) - build_system_prompt now loads vocabulary from DB dynamically - Replaced beu/bel nicknames with mimi, weza, nila, Kianda - Fixed abbreviations: vpd→vcs, removed qlqr/tb (not needed) - Cleaned hardcoded vocab from prompt9ab5683 -
fix: erro emocional _aggression_profile + pg_dump version mismatch fallback
Isaac Quarenta- api.py: calcula aggression_profile dentro de _build_prompt (não depende de variável externa) - database_pg.py: detecta incompatibilidade pg_dump/server e usa COPY como fallbackb7abb5e
-
feat: personalidade Kiami leve, tímida, séria, 18 anos - config.py, database_pg, root config
Isaac Quarentaac5d009 -
fix: atualizar numero WhatsApp do bot para 30842898366561
Isaac Quarentadefaae2 -
fix: idade 18 anos no database_pg.py
Isaac Quarenta2fce1ef -
refactor: renomear Belmira para Kiami em todo o backend Python
Isaac Quarenta- modules/config.py: SYSTEM_PROMPT_BASE e PersonaConfig - modules/api.py: persona, quoted_author_name, strict_override - modules/database_pg.py: persona_config e system prompts - modules/thinking_engine.py: persona e instruções internas - modules/skills_library.py: skills e BelmiraCoins→KiamiCoins - modules/skills/autonomous_agent.py: agente autónomo - config.py (root): persona e system prompt - migrate_lstm_tables.py: context_ids - test_fix_validation.py: testesa118436
-
fix: move DB seeding to background thread, increase init timeout to 240s
Isaac Quarenta- seed_all_config() removed from DatabasePG.__init__ (was blocking ~88s) - New _run_background_seeding() runs 5 seeds in daemon thread - API starts immediately while seeding runs in parallel - Timeout increased from 120s to 240s as safety net - Fixed error message to match actual timeout valueb5532eb -
fix: startup hang - single AkiraAPI instance, DB connect_timeout=10, startup logging
60951f1
-
feat: prompts e tone config migrados para PG, fix indent unified_context
2e335f8 -
feat: migrate STM to PostgreSQL (stm_messages table + persistence)
3347559 -
feat: PG migration (persona, moderation, tone) + fix oie prefix
b0ed2fd -
fix: tool_calls dispatch (cerebras/torouter), knowledge matching, website URL
b9a30ee -
fix: knowledge injection ANTES do thinking engine + seed atualiza dados antigos
- Thinking engine agora recebe conhecimento_context do PG - Conhecimento é injetado no system prompt do thinking ANTES de gerar CoT - Seed sempre atualiza (ON CONFLICT DO UPDATE em vez de DO NOTHING) - Remove check 'se vazio retorna' — dados são sempre atualizados644218d -
fix: mega-sweep - crash fixes, autonomous_agent TS, memory leaks, DB bugs
CRITICAL CRASH FIXES: - api.py: raw_str NameError on doc/image messages (line 1964) - api.py: media_response AttributeError when skill returns non-dict AUTONOMOUS AGENT: - LLM prompt said 'Akira' instead of 'Belmira' + wrong action names - 'cu' substring matched 'cuidar','curta' (word boundary for short patterns) - Belmira was moderating herself (self-check guard added) - _action_log memory leak (capped at 500 entries) - _spam_tracker memory leak (prune empty keys) - JSON regex greedy match (use non-greedy [^{}]*) DATABASE_PG: - recuperar_humor queried 'humor' but column is 'humor_atual' - isinstance(memoryview) missing second argument - import fcntl crashed on Windows (graceful fallback) BASE_SKILL: - cache_ttl always ignored (_make_cache_key was popping it)9bddcf0 -
fix: website da Softedge atualizado para railway.app
b2fd145 -
feat: knowledge injection da Softedge via PG (só quando keyword match)
c38e81d
-
fix: cria tabela system_events que faltava no init do PG
cb7891e -
fix: idempotency check + content dedup para prevenir reprocessamento apos redeploy
5236e80 -
fix: cross-worker dedup via PostgreSQL atomic claim
af26b43
-
Upload 58 files
Verified signature83d7af2
-
Upload database_pg.py
Verified signature722c0fc -
Upload 2 files
Verified signatureafa68f2 -
Upload 2 files
Verified signature46e25ce