-
-
Save longavailable/a6b79f934b37526b40f815948cc72d41 to your computer and use it in GitHub Desktop.
Ollama local Embedding: miti99/gte-qwen2 + LLM: llama3.1:8b
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Ollama local embedding、 llm 代替 openai 云端模型 | |
| # Ollama local Embedding: miti99/gte-qwen2 + LLM: llama3.1:8b | |
| # 模板地址:https://github.com/plastic-labs/honcho/blob/main/.env.template | |
| # Honcho Environment Variables Template | |
| # Copy this file to .env and fill in the appropriate values | |
| # | |
| # Required variables are marked with (REQUIRED) | |
| # Optional variables have default values and can be left commented out | |
| # ============================================================================= | |
| # Application Settings | |
| # ============================================================================= | |
| LOG_LEVEL=INFO | |
| # SESSION_OBSERVERS_LIMIT=10 | |
| # GET_CONTEXT_MAX_TOKENS=100000 | |
| # MAX_FILE_SIZE=5242880 # Bytes | |
| # MAX_MESSAGE_SIZE=25000 # Characters | |
| # Embedding settings | |
| # ✅ 明确启用embedding及维度 | |
| EMBED_MESSAGES=true | |
| EMBEDDING_VECTOR_DIMENSIONS=1536 | |
| # EMBEDDING_MAX_INPUT_TOKENS=8192 | |
| # EMBEDDING_MAX_TOKENS_PER_REQUEST=300000 | |
| # ✅ Ollama Embedding(覆盖默认 OpenAI) | |
| EMBEDDING_MODEL_CONFIG__TRANSPORT=openai | |
| EMBEDDING_MODEL_CONFIG__MODEL=miti99/gte-qwen2 | |
| EMBEDDING_MODEL_CONFIG__OVERRIDES__BASE_URL=http://localhost:11434/v1 | |
| # LANGFUSE_HOST= | |
| # LANGFUSE_PUBLIC_KEY= | |
| # COLLECT_METRICS_LOCAL=false | |
| # LOCAL_METRICS_FILE=metrics.jsonl | |
| # REASONING_TRACES_FILE=traces.jsonl # Path to JSONL file for reasoning traces | |
| # NAMESPACE="honcho" | |
| # ============================================================================= | |
| # Database Settings (REQUIRED) | |
| # ============================================================================= | |
| # Connection URI for PostgreSQL database with pgvector support | |
| # Must use postgresql+psycopg prefix for SQLAlchemy compatibility | |
| # # ✅ 修改为个人postgresql配置信息 | |
| DB_CONNECTION_URI=postgresql+psycopg://<username>:<passwor>@localhost:5432/honcho_db | |
| # Optional database settings | |
| # DB_SCHEMA=public | |
| # DB_POOL_CLASS=default | |
| # DB_POOL_SIZE=10 | |
| # DB_MAX_OVERFLOW=20 | |
| # DB_POOL_TIMEOUT=30 | |
| # DB_POOL_RECYCLE=300 | |
| # DB_POOL_PRE_PING=true | |
| # DB_POOL_USE_LIFO=true | |
| # DB_SQL_DEBUG=false | |
| # DB_TRACING=false | |
| # ============================================================================= | |
| # Authentication Settings | |
| # ============================================================================= | |
| # Whether to enable authentication (set to true for production) | |
| AUTH_USE_AUTH=false | |
| # JWT secret key (REQUIRED if AUTH_USE_AUTH=true) | |
| # Generate with: python scripts/generate_jwt_secret.py | |
| # AUTH_JWT_SECRET=your-secret-key-here | |
| # ============================================================================= | |
| # LLM Provider (REQUIRED) | |
| # ============================================================================= | |
| # ✅ Ollama 不需要真实 key,填任意字符串占位即可骗过校验 | |
| LLM_OPENAI_API_KEY=ollamalocal | |
| # LLM_ANTHROPIC_API_KEY= | |
| # LLM_GEMINI_API_KEY= | |
| # ============================================================================= | |
| # LLM Configuration | |
| # ============================================================================= | |
| # Global LLM settings | |
| # LLM_DEFAULT_MAX_TOKENS=2500 | |
| # LLM_MAX_TOOL_OUTPUT_CHARS=10000 # Max chars for tool output (~2500 tokens) | |
| # LLM_MAX_MESSAGE_CONTENT_CHARS=2000 # Max chars per message in tool results | |
| # ============================================================================= | |
| # Deriver (Background Worker) | |
| # ============================================================================= | |
| # DERIVER_ENABLED=true | |
| # ✅ 切到 Ollama | |
| DERIVER_MODEL_CONFIG__TRANSPORT=openai | |
| DERIVER_MODEL_CONFIG__MODEL=llama3.1:8b | |
| DERIVER_MODEL_CONFIG__OVERRIDES__BASE_URL=http://localhost:11434/v1 | |
| #DERIVER_MODEL_CONFIG__OVERRIDES__API_KEY_ENV=LLM_OPENAI_API_KEY | |
| # ============================================================================= | |
| # Dialectic (Chat) | |
| # ============================================================================= | |
| # ✅ 全部切到 Ollama | |
| DIALECTIC_LEVELS__minimal__MODEL_CONFIG__TRANSPORT=openai | |
| DIALECTIC_LEVELS__minimal__MODEL_CONFIG__MODEL=llama3.1:8b | |
| DIALECTIC_LEVELS__minimal__MODEL_CONFIG__OVERRIDES__BASE_URL=http://localhost:11434/v1 | |
| DIALECTIC_LEVELS__low__MODEL_CONFIG__TRANSPORT=openai | |
| DIALECTIC_LEVELS__low__MODEL_CONFIG__MODEL=llama3.1:8b | |
| DIALECTIC_LEVELS__low__MODEL_CONFIG__OVERRIDES__BASE_URL=http://localhost:11434/v1 | |
| DIALECTIC_LEVELS__medium__MODEL_CONFIG__TRANSPORT=openai | |
| DIALECTIC_LEVELS__medium__MODEL_CONFIG__MODEL=llama3.1:8b | |
| DIALECTIC_LEVELS__medium__MODEL_CONFIG__OVERRIDES__BASE_URL=http://localhost:11434/v1 | |
| DIALECTIC_LEVELS__high__MODEL_CONFIG__TRANSPORT=openai | |
| DIALECTIC_LEVELS__high__MODEL_CONFIG__MODEL=llama3.1:8b | |
| DIALECTIC_LEVELS__high__MODEL_CONFIG__OVERRIDES__BASE_URL=http://localhost:11434/v1 | |
| DIALECTIC_LEVELS__max__MODEL_CONFIG__TRANSPORT=openai | |
| DIALECTIC_LEVELS__max__MODEL_CONFIG__MODEL=llama3.1:8b | |
| DIALECTIC_LEVELS__max__MODEL_CONFIG__OVERRIDES__BASE_URL=http://localhost:11434/v1 | |
| # ============================================================================= | |
| # Summary | |
| # ============================================================================= | |
| # ✅ 切到 Ollama | |
| SUMMARY_MODEL_CONFIG__TRANSPORT=openai | |
| SUMMARY_MODEL_CONFIG__MODEL=llama3.1:8b | |
| SUMMARY_MODEL_CONFIG__OVERRIDES__BASE_URL=http://localhost:11434/v1 | |
| #SUMMARY_MODEL_CONFIG__OVERRIDES__API_KEY_ENV=LLM_OPENAI_API_KEY | |
| # ============================================================================= | |
| # Dream | |
| # ============================================================================= | |
| # ✅ 切到 Ollama | |
| DREAM_MODEL_CONFIG__TRANSPORT=openai | |
| DREAM_MODEL_CONFIG__MODEL=llama3.1:8b | |
| DREAM_MODEL_CONFIG__OVERRIDES__BASE_URL=http://localhost:11434/v1 | |
| #DREAM_MODEL_CONFIG__OVERRIDES__API_KEY_ENV=LLM_OPENAI_API_KEY | |
| # DREAM_MIN_HOURS_BETWEEN_DREAMS=8 | |
| # DREAM_ENABLED_TYPES=["omni"] | |
| # DREAM_MAX_TOOL_ITERATIONS=20 | |
| # DREAM_HISTORY_TOKEN_LIMIT=16384 | |
| # Surprisal sampling (advanced): | |
| # DREAM_SURPRISAL__ENABLED=false | |
| # DREAM_SURPRISAL__TREE_TYPE=kdtree | |
| # DREAM_SURPRISAL__TREE_K=5 | |
| # DREAM_SURPRISAL__SAMPLING_STRATEGY=recent | |
| # DREAM_SURPRISAL__SAMPLE_SIZE=200 | |
| # DREAM_SURPRISAL__TOP_PERCENT_SURPRISAL=0.10 | |
| # DREAM_SURPRISAL__MIN_HIGH_SURPRISAL_FOR_REPLACE=10 | |
| # DREAM_SURPRISAL__INCLUDE_LEVELS=["explicit","deductive"] | |
| # ============================================================================= | |
| # Webhook Settings | |
| # ============================================================================= | |
| # WEBHOOK_SECRET= | |
| # WEBHOOK_MAX_WORKSPACE_LIMIT=10 | |
| # ============================================================================= | |
| # Monitoring and Observability (Optional) | |
| # ============================================================================= | |
| # Sentry error tracking | |
| # SENTRY_ENABLED=false | |
| # SENTRY_DSN=your-sentry-dsn-here | |
| # SENTRY_RELEASE=your-release-semver | |
| # SENTRY_ENVIRONMENT=development | |
| # SENTRY_TRACES_SAMPLE_RATE=0.1 | |
| # SENTRY_PROFILES_SAMPLE_RATE=0.1 | |
| # ============================================================================= | |
| # Prometheus Metrics Settings (Pull-based metrics) | |
| # ============================================================================= | |
| # METRICS_ENABLED=false | |
| # METRICS_NAMESPACE=honcho # Inherits from NAMESPACE if not set | |
| # ============================================================================= | |
| # CloudEvents Telemetry Settings (Analytics events) | |
| # ============================================================================= | |
| # TELEMETRY_ENABLED=false | |
| # TELEMETRY_ENDPOINT=https://telemetry.honcho.dev/v1/events | |
| # TELEMETRY_HEADERS={"Authorization": "Bearer your-token"} # JSON string for auth headers | |
| # TELEMETRY_BATCH_SIZE=100 | |
| # TELEMETRY_FLUSH_INTERVAL_SECONDS=1.0 | |
| # TELEMETRY_FLUSH_THRESHOLD=50 | |
| # TELEMETRY_MAX_RETRIES=3 | |
| # TELEMETRY_MAX_BUFFER_SIZE=10000 | |
| # TELEMETRY_NAMESPACE=honcho # Inherits from NAMESPACE if not set | |
| # ============================================================================= | |
| # Cache | |
| # ============================================================================= | |
| # CACHE_ENABLED=false | |
| # CACHE_URL="redis://localhost:6379/0?suppress=true" | |
| # CACHE_NAMESPACE="honcho" # Inherits from NAMESPACE if not set | |
| # CACHE_DEFAULT_TTL_SECONDS=300 | |
| # CACHE_DEFAULT_LOCK_TTL_SECONDS=5 | |
| # ============================================================================= | |
| # Vector Store Settings | |
| # ============================================================================= | |
| # Vector store type: "pgvector", "turbopuffer", or "lancedb" | |
| VECTOR_STORE_TYPE=pgvector | |
| # Migration flag: set to true when migration from pgvector is complete | |
| VECTOR_STORE_MIGRATED=false | |
| # Global namespace prefix for all vector namespaces | |
| # Namespaces follow the pattern: {NAMESPACE}.{type}.{hash} | |
| # where hash is a base64url-encoded SHA-256 of the workspace/peer names | |
| # - Documents: {NAMESPACE}.doc.{hash(workspace, observer, observed)} | |
| # - Messages: {NAMESPACE}.msg.{hash(workspace)} | |
| # VECTOR_STORE_NAMESPACE=honcho # Inherits from NAMESPACE if not set | |
| # Embedding dimensions (default: 1536 for OpenAI text-embedding-3-small) | |
| VECTOR_STORE_DIMENSIONS=1536 | |
| # Turbopuffer-specific settings (required if TYPE is "turbopuffer") | |
| # VECTOR_STORE_TURBOPUFFER_API_KEY=your-turbopuffer-api-key | |
| # VECTOR_STORE_TURBOPUFFER_REGION=gcp-us-east4 | |
| # LanceDB-specific settings (local embedded mode) | |
| # VECTOR_STORE_LANCEDB_PATH=./lancedb_data | |
| # Reconciliation interval for background sync (default: 5 minutes) | |
| # VECTOR_STORE_RECONCILIATION_INTERVAL_SECONDS=300 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment