Files
life-echo/api/config/default.toml

245 lines
7.2 KiB
TOML
Raw Normal View History

# Life Echo API — default configuration (SSOT base layer)
# Environment overlays: config/development.toml | staging.toml | production.toml
[deploy]
alembic_startup_fail_fast = false
access_token_expire_minutes = 120
refresh_token_expire_days = 30
refresh_token_reuse_grace_seconds = 30
mock_sms_login_enabled = false
tencent_sms_sdk_app_id = ""
tencent_sms_sign_name = ""
tencent_sms_template_id = ""
merge dark mode and google OAuth (#35) * feat(api): implement Google OAuth login and user management - Added Google OpenID Connect login functionality, allowing users to authenticate using their Google accounts. - Created new endpoints for Google login, including user registration and linking existing accounts. - Introduced Google token verification logic and error handling for authentication failures. - Updated environment configuration to include Google OAuth client IDs and verification settings. - Enhanced user model to support OpenID and linked Google accounts. This feature improves user experience by enabling seamless sign-in with Google, while maintaining security and integrity of user data. * fix(auth): wire staging Google token verifier * chore(deps): update expo to version 55.0.6 and adjust @expo/env dependency in pnpm-lock.yaml * chore(deps): update Babel dependencies to version 7.29.7 in package-lock.json * feat(auth): enhance phone login for China users - Updated phone login functionality to support only mainland China (+86) mobile numbers. - Added user prompts and descriptions for phone login, including confirmation and cancellation options. - Adjusted translations for both English and Chinese to reflect the new phone login requirements. - Updated Google OAuth client IDs in configuration files for production and staging environments. * chore(deps): add peer flag to use-sync-external-store in package-lock.json * chore(deps): add @emnapi/core and @emnapi/runtime to package-lock.json * fix(app-expo): align Android native dependencies * fix(app-expo): normalize lockfile for npm 10 * fix(config): update environment variable handling to use static access - Introduced a static mapping for public environment variables to ensure proper access during the release bundle. - Updated the `requirePublicEnv` and `optionalPublicEnv` functions to reference the new `PUBLIC_ENV` object instead of directly accessing `process.env`. - Added comments to clarify the necessity of static access for certain environment variables. * feat(app-expo): dark mode, FAQ i18n, eval ASR, and theme cleanup (#34) * feat(app-expo): dark mode, FAQ i18n, version CI, and theme cleanup Implement light/dark scene colors across chat, reading, and headers; remove default/brand theme picker and ThemeVariablesProvider. Localize FAQ in-app, fix dark-mode text visibility, and remove the unused /api/faqs endpoint. Align About/version with Expo config and inject APP_VERSION in CI builds. Also includes phone E164 auth/SMS updates, eval ASR page, and related API work. * revert: remove phone E.164 changes from dark-mode branch These auth/SMS internationalization updates were accidentally bundled into the dark-mode commit; restore 11-digit CN phone flow and drop related API, migration, and Expo UI work from this branch. * fix: address PR review issues for dark mode and eval ASR Use light foreground colors for sepia reading in dark mode, fix chat send button contrast, stream-limit eval ASR uploads, restore LiveTester phone validation, and remove unused AudioSegmenter code. * fix(app-expo): improve chat send button contrast in light and dark mode Add dedicated send button colors (accent fill in dark, primary fill in light), use RNText to avoid NativeWind overrides, and restore dark labels in light mode for readable composer actions. --------- Co-authored-by: Kevin <kevin@brighteng.org> --------- Co-authored-by: penghanyuan <penghanyuan@gmail.com> Co-authored-by: Kevin <kevin@brighteng.org>
2026-06-09 11:14:36 +08:00
# Comma-separated Google OAuth client IDs accepted as ID-token audiences.
# Keep scopes to OpenID/email/profile to avoid sensitive-scope verification.
google_oauth_client_ids = "634059994345-9hr37dprcbrpioic7098gns02vnoe8os.apps.googleusercontent.com"
# Optional overseas verifier endpoint for Google ID tokens.
google_token_verifier_url = ""
google_token_verifier_timeout_seconds = 5.0
tencent_cos_bucket = ""
tencent_cos_base_url = ""
enable_tts = true
memoir_image_enabled = false
enable_docs = true
wechat_pay_app_id = ""
wechat_pay_mch_id = ""
wechat_pay_private_key_path = "certs/apiclient_key.pem"
wechat_pay_cert_serial_no = ""
wechat_pay_notify_url = ""
wechat_pay_platform_public_key_path = ""
wechat_pay_platform_public_key_id = ""
alipay_app_id = ""
alipay_notify_url = ""
liblib_template_uuid = ""
log_level = "INFO"
otel_enabled = false
otel_exporter_otlp_endpoint = "http://localhost:48317"
api_cors_origins = ""
[chat]
interview_max_tokens = 512
interview_max_segments = 2
interview_max_chars_per_segment = 380
opening_max_tokens = 380
profile_followup_max_tokens = 280
history_max_pairs = 15
history_max_chars = 6000
era_context_enabled = true
stage_detection_enabled = true
stage_detection_max_tokens = 128
interview_persona = "default"
interview_temperature = 0.93
memory_retrieval_enabled = true
memory_top_k = 8
memory_evidence_max_chars = 4096
memory_safe_evidence_format_enabled = true
reply_planner_llm_enabled = false
reply_planner_max_tokens = 256
reply_planner_temperature = 0.2
re_greeting_enabled = true
re_greeting_idle_hours = 6.0
topic_chips_enabled = true
topic_chips_max = 4
input_normalize_enabled = true
input_normalize_mode = "rules"
input_normalize_llm_max_tokens = 512
input_normalize_llm_max_input_chars = 8000
input_normalize_llm_voice_only = true
profile_max_turns = 8
profile_extract_max_tokens = 512
[memoir]
fidelity_check_enabled = true
fidelity_check_max_tokens = 512
oral_normalize_enabled = true
oral_normalize_mode = "rules"
oral_normalize_llm_max_tokens = 512
oral_normalize_llm_max_input_chars = 8000
phase1_batch_llm_enabled = true
phase1_batch_llm_max_tokens = 4096
phase1_batch_llm_chunk_size = 24
pipeline_run_ttl_seconds = 172800
extraction_max_tokens = 1024
classification_max_tokens = 256
narrative_max_tokens = 4096
narrative_merge_max_tokens = 8192
title_max_tokens = 256
story_route_max_tokens = 1024
story_batch_plan_max_tokens = 4096
segment_batch_min_chars = 50
segment_batch_max_wait_seconds = 60.0
narrative_immediate_char_threshold = 50
narrative_batch_min_segments = 3
narrative_batch_min_chars = 80
narrative_batch_max_wait_seconds = 120.0
extraction_updates_current_stage = false
fidelity_fail_open_on_parse_error = false
narrative_evidence_overlap_min_chars = 14
evidence_scene_anchor_check_enabled = true
title_slots_require_body_or_oral_match = true
title_hay_grounding_strict_phrases_enabled = true
recompose_retry_on_lock_contention = true
phase2_singleflight_immediate = true
route_defer_enabled = true
route_defer_seconds = 120.0
route_defer_max_attempts = 3
quality_pass_enabled = true
quality_pass_delay_seconds = 5
story_route_append_guardrail_oral_chars = 1800
min_inline_images_for_chapter_cover = 1
image_poll_interval = 3
image_max_attempts = 20
image_provider = "liblib"
image_style_default = "watercolor"
image_size_default = "1280x720"
image_download_hosts = ""
image_prompt_fallback_disabled = false
[memory]
enrichment_enabled = true
enrichment_max_chars = 12000
compaction_enabled = true
compaction_debounce_seconds = 105
compaction_lock_ttl_seconds = 600
compaction_chunk_similarity_threshold = 0.92
compaction_min_layers_for_exclude = 2
compaction_max_chunks_per_run = 200
compaction_max_excludes_per_run = 50
compaction_max_neighbors_per_chunk = 25
compaction_text_jaccard_min = 0.55
compaction_metadata_event_year_window = 1
compaction_sweep_recent_hours = 24
[story]
image_min_body_chars = 400
image_enqueue_dedup_ttl = 300
recompose_chapter_delay_seconds = 8
chapter_pipeline_lock_ttl_seconds = 360
append_max_canonical_chars = 12000
append_max_versions = 20
route_candidate_body_max_chars = 2200
route_candidate_total_max_chars = 20000
route_long_body_head_chars = 700
route_long_body_tail_chars = 700
route_summary_min_chars = 30
route_index_preview_chars = 140
title_min_body_chars = 60
evidence_top_k_default = 10
evidence_top_k_large_batch = 5
evidence_large_batch_threshold = 3
[eval]
judge_base_url = "https://open.bigmodel.cn/api/paas/v4"
judge_model = "glm-5"
judge_temperature = 0.3
judge_deepseek_model = "deepseek-v4-flash"
judge_deepseek_thinking_enabled = false
judge_deepseek_context_window_tokens = 64000
judge_context_window_tokens = 200000
judge_completion_reserve_tokens = 4096
judge_prompt_budget_safety_tokens = 2048
judge_approx_tokens_per_char = 1.0
judge_max_transcript_chars = 0
judge_max_compare_transcript_chars_each = 0
judge_compare_prompt_overhead_chars = 10000
judge_memoir_chapter_concurrency = 4
judge_memoir_body_max_chars = 36000
judge_memoir_evidence_max_chars = 32000
judge_memoir_completion_max_tokens = 3072
candidate_temperature = 0.7
gate_protected_regression_threshold = 2.0
execution_enabled = true
internal_enable_docs = false
internal_cors_origins = ""
[llm]
deepseek_base_url = "https://api.deepseek.com"
deepseek_model = "deepseek-v4-flash"
deepseek_thinking_enabled = false
temperature = 0.7
fast_model = ""
embedding_base_url = "https://open.bigmodel.cn/api/paas/v4"
embedding_model = "embedding-3"
[asr]
provider = "tencent"
# 录音文件识别极速版Flash HTTPS 同步);引擎 16k_zh_largeAppID 见 .env TENCENT_APP_ID
engine_type = "16k_zh_large"
request_timeout_seconds = 60.0
[tts]
provider = "tencent"
voice_type = 501004
voice_type_en = 501004
codec = "mp3"
[redis]
socket_timeout_seconds = 5.0
socket_connect_timeout_seconds = 2.0
health_check_interval_seconds = 30
task_tracker_ttl_seconds = 86400
[celery]
memory_enrichment_queue = "memory_idle"
broker_pool_limit = 10
broker_connection_retry_on_startup = true
memoir_soft_time_limit = 1800
memoir_hard_time_limit = 2400
image_soft_time_limit = 600
image_hard_time_limit = 900
compaction_sweep_soft_time_limit = 300
compaction_sweep_hard_time_limit = 600
enrichment_soft_time_limit = 660
enrichment_hard_time_limit = 960
[alembic]
run_on_startup = true
max_retries = 3
retry_base_seconds = 1.0
[agent_log]
agent_verbose = false
max_chars = 4096
omit_system_message_body = true
json_prompt_prefix_chars = 0
json_prompt_prefix_only_if_len_gt = 4000
prompt_mode = "preview"
prompt_dedup = false
celery_log_level = ""
httpx_log_level = ""
log_json_file = ""
[otel]
exporter_insecure = true
service_name = "life-echo-api"
metric_export_interval_ms = 10000
[misc]
algorithm = "HS256"
redis_session_ttl = 86400
tencent_sms_template_param_count = 2
tencent_cos_region = "ap-shanghai"
liblib_base_url = "https://openapi.liblibai.cloud"
alipay_sign_type = "RSA2"
alipay_under_development = "true"