Minor change
This commit is contained in:
parent
b2240d304e
commit
a22fe1b9e7
46
.env.example
46
.env.example
@ -1,33 +1,45 @@
|
||||
# Environment Variables for AI Agent
|
||||
# Copy to .env and modify as needed
|
||||
|
||||
# LLM Configuration
|
||||
LLM_BASE_URL=http://localhost:11434/v1
|
||||
LLM_MODEL=deepseek-r1:8b
|
||||
LLM_API_KEY=ollama
|
||||
AGENT_MAX_ITERATIONS=10
|
||||
MAX_TOOL_OUTPUT=4000
|
||||
# Transformers API Local
|
||||
# LLM_BASE_URL=http://localhost:12345/v1
|
||||
# LLM_MODEL=granite4.1:8b
|
||||
# LLM_API_KEY=sk-not-needed
|
||||
|
||||
# XMPP (default: disabled)
|
||||
XMPP_ENABLED=False
|
||||
XMPP_USERNAME=
|
||||
XMPP_PASSWORD=
|
||||
# XMPP_MUC_ROOMS=room1@conference.server,room2@conference.server
|
||||
# Ollama Local
|
||||
# LLM_BASE_URL=http://localhost:11434/v1
|
||||
# LLM_MODEL=granite4.1:8b
|
||||
# LLM_API_KEY=ollama
|
||||
|
||||
# ─── Persona / Mode ──────────────────────────────────────────────────────────
|
||||
# Mode AI: "programmer" (default, koding) | "roleplayer" (ngobrol)
|
||||
PERSONA_MODE=programmer
|
||||
# Ollama Cloud
|
||||
# LLM_BASE_URL=https://ollama.com/v1
|
||||
# LLM_MODEL=ministral-3:14b-cloud
|
||||
# LLM_API_KEY=
|
||||
|
||||
# Openrouter AI
|
||||
# LLM_BASE_URL=https://openrouter.ai/api/v1
|
||||
# LLM_MODEL=openrouter/owl-alpha
|
||||
# LLM_API_KEY=
|
||||
|
||||
AGENT_MAX_ITERATIONS=20
|
||||
AGENT_MAX_TOOL_OUTPUT=4000
|
||||
|
||||
# Personality
|
||||
PERSONA_MODE=programmer # Mode AI: "programmer" (default, koding) | "roleplayer" (ngobrol)
|
||||
PERSONA_NAME=OWL
|
||||
PERSONA_TONE=casual # casual | formal | playful | warm
|
||||
PERSONA_VERBOSITY=balanced # concise | balanced | detailed
|
||||
PERSONA_HUMOR=light # none | light | witty
|
||||
PERSONA_LANGUAGE=id # id | en | (kosong = auto)
|
||||
PERSONA_MOOD=cheerful # cheerful | calm | energetic | sarcastic
|
||||
# PERSONA_CATCHPHRASES=Siap bro!, Haha~, Wkwkwk
|
||||
PERSONA_CATCHPHRASES=Hai, Gimana kabarnya?, Wkwkwk
|
||||
|
||||
XMPP_ENABLED=False
|
||||
|
||||
# XMPP_USERNAME=
|
||||
# XMPP_PASSWORD=
|
||||
# XMPP_MUC_ROOMS=room1@conference.server,room2@conference.server
|
||||
|
||||
# Selective response (roleplayer mode): true = hanya respon kalau ada mention/relevansi.
|
||||
# false = semua pesan direspon (tanpa filter).
|
||||
PERSONA_SELECTIVE_RESPONSE=true
|
||||
XMPP_SELECTIVE_RESPONSE=true
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ llm_timeout = int( os.getenv("LLM_TIMEOUT", default="600"
|
||||
|
||||
AGENT_MAX_ITERATIONS = int( os.getenv("AGENT_MAX_ITERATIONS", default="30" ) )
|
||||
|
||||
MAX_TOOL_OUTPUT = int( os.getenv("MAX_TOOL_OUTPUT", default="40000" ) )
|
||||
AGENT_MAX_TOOL_OUTPUT = int( os.getenv("AGENT_MAX_TOOL_OUTPUT", default="40000" ) )
|
||||
|
||||
RAG_PERSIST_DIR = os.getenv("RAG_PERSIST_DIR", default="chroma_db" ) # Embedding: ChromaDB ONNX default (all-MiniLM-L6-v2, lokal, tidak perlu API call)
|
||||
|
||||
@ -50,7 +50,7 @@ PERSONA_CATCHPHRASES = os.getenv("PERSONA_CATCHPHRASES", default="").strip()
|
||||
|
||||
# Selective response: true = roleplayer hanya respon kalau ada mention/relevansi (default).
|
||||
# false = roleplayer semua pesan ikut respon (seperti biasa, tanpa filter).
|
||||
PERSONA_SELECTIVE_RESPONSE = os.getenv("PERSONA_SELECTIVE_RESPONSE", default="true").strip().lower() in ("true", "1", "yes")
|
||||
XMPP_SELECTIVE_RESPONSE = os.getenv("XMPP_SELECTIVE_RESPONSE", default="true").strip().lower() in ("true", "1", "yes")
|
||||
|
||||
# Humanize Delay Configuration (anti-bot detection)
|
||||
READ_DELAY_MIN = float( os.getenv("READ_DELAY_MIN", default="1.0" ) ) # min reading delay (second)
|
||||
|
||||
@ -369,7 +369,7 @@ class XMPPClient(ClientXMPP):
|
||||
|
||||
# ── Roleplayer: cek need_response sebelum kirim ──
|
||||
if is_roleplayer:
|
||||
if config.PERSONA_SELECTIVE_RESPONSE:
|
||||
if config.XMPP_SELECTIVE_RESPONSE:
|
||||
# Build recent history dari session messages (tanpa system prompt)
|
||||
recent_msgs = []
|
||||
for msg in session.messages[-6:]:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user