(no commit message)
This commit is contained in:
28
config.py
Normal file
28
config.py
Normal file
@@ -0,0 +1,28 @@
|
||||
"""Shared configuration loaded from .env for the Minecraft friend agent."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import os
|
||||
from dataclasses import dataclass
|
||||
|
||||
from dotenv import load_dotenv
|
||||
|
||||
load_dotenv()
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class Settings:
|
||||
groq_api_key: str | None = os.getenv("GROQ_API_KEY")
|
||||
main_model: str = os.getenv("MAIN_MODEL", "groq/openai/gpt-oss-120b")
|
||||
sub_model: str = os.getenv("SUB_MODEL", "groq/openai/gpt-oss-20b")
|
||||
|
||||
persona_name: str = os.getenv("PERSONA_NAME", "Spruce")
|
||||
poll_seconds: float = float(os.getenv("POLL_SECONDS", "2"))
|
||||
idle_chitchat_seconds: float = float(os.getenv("IDLE_CHITCHAT_SECONDS", "90"))
|
||||
|
||||
mcp_minecraft_host: str = os.getenv("MCP_MINECRAFT_HOST", "127.0.0.1")
|
||||
mcp_minecraft_port: int = int(os.getenv("MCP_MINECRAFT_PORT", "25565"))
|
||||
bot_username: str = os.getenv("BOT_USERNAME", "Bot1")
|
||||
|
||||
|
||||
SETTINGS = Settings()
|
||||
Reference in New Issue
Block a user