
    7 i                     X    d dl mZ d dlmZ d dlmZmZ  G d de      Zedefd       Zy)	    )	lru_cache)computed_field)BaseSettingsSettingsConfigDictc                      e Zd ZU dZeed<   dZeed<   dZeed<   dZeed<   d	Z	eed
<   dZ
eed<   dZeed<   dZeed<   dZeed<   dZeed<   dZeed<   dZedz  ed<   dZedz  ed<   dZeed<   dZeed<   dZedz  ed<   d Zedz  ed!<   dZedz  ed"<   d#Zedz  ed$<   d%Zeed&<   d'Zedz  ed(<   d)Zeed*<   d+Zeed,<   d-Zeed.<   d/Z eed0<   d1Z!eed2<   d3Z"eed4<   d5Z#eed6<   d7Z$eed8<   d9Z%eed:<   d;Z&eed<<   dZ'edz  ed=<   dZ(edz  ed><   d?Z)eed@<   dAZ*eedB<   dCZ+eedD<   dEZ,eedF<   dGZ-eedH<   dZ.edz  edI<   dJZ/eedK<   dZ0edz  edL<   dZ1edz  edM<   dZ2edz  edN<   dZ3eedO<   dPZ4eedQ<   dRZ5eedS<   dTZ6eedU<   dVZ7eedW<   dXZ8eedY<   dZZ9eed[<   d\Z:eed]<   d^Z;eed_<   d`Z<eeda<   dbZ=eedc<   d%Z>eedd<   deZ?eedf<    e@dgdhd)i      ZAeBeCdjeDe   fdk              ZEeBeCdjeDe   fdl              ZFeBeCdjefdm              ZGeBeCdjefdn              ZHdpdoZIy)qSettingszHospitality Backend Hubapp_namedevelopmentapp_environmentzWhttp://localhost:3000,http://localhost:3100,http://localhost:3200,http://localhost:3300backend_hub_cors_originszhttp://localhost:8101backend_hub_public_urlzhttp://localhost:3000portal_public_urlzhttp://localhost:3100 prenotazioni_frontend_public_urlzhttp://localhost:8100prenotazioni_backend_public_urlzhttp://localhost:3200menu_legacy_public_urlzhttp://localhost:3300ordini_frontend_public_urlzhttp://localhost:8200ordini_backend_public_urlhttps://api.groq.com/openai/v1llm_base_urlNllm_api_keyllm_proxy_internal_tokeng      >@llm_request_timeout_secondszAssistente Localeassistant_display_namezopenai/gpt-oss-120bassistant_modelzqwen/qwen3-32bassistant_planner_modelassistant_synthesis_modelzopenai/gpt-oss-20bassistant_fallback_modeli@  assistant_max_tokenslowassistant_reasoning_effortFassistant_include_reasoningg?assistant_temperaturezEurope/Romeassistant_timezoneg      .@&assistant_data_request_timeout_secondsz http://prenotazioni-backend:8000#assistant_prenotazioni_internal_urlz/app/data/baco_locale-data.jsassistant_menu_locale_data_pathzSei l'assistente operativo interno del locale. Rispondi sempre in italiano, con tono sobrio, pratico e orientato all'azione. Tratta ogni informazione come confidenziale. Se mancano dati operativi reali, dillo chiaramente e proponi il prossimo passo utile.assistant_system_promptzeIl backend-hub centralizzera' progressivamente dati sensibili, policy operative e contesto aziendale.assistant_operational_contextz/data/push-vapid-private.pempush_vapid_private_key_filezmailto:admin@powerup.coolpush_vapid_subjectgoogle_workspace_client_idgoogle_workspace_client_secretz /google-workspace/oauth/callbackgoogle_workspace_redirect_pathzopenid,https://www.googleapis.com/auth/userinfo.email,https://www.googleapis.com/auth/documents,https://www.googleapis.com/auth/spreadsheets,https://www.googleapis.com/auth/drivegoogle_workspace_scopesz /tmp/google_workspace_state.jsongoogle_workspace_state_fileg      4@(google_workspace_request_timeout_secondsi  'google_workspace_sheet_preview_max_rowsgoogle_document_ai_project_ideugoogle_document_ai_location#google_document_ai_ocr_processor_id'google_document_ai_invoice_processor_id'google_document_ai_service_account_file*google_document_ai_request_timeout_secondsi  "fiscal_document_inbox_poll_secondsz/data/platform_registry.sqlite3tenancy_registry_databasez/data/tenantstenancy_databases_dir   tenancy_session_duration_hoursz/data/menu-assetsmenu_asset_storage_dirz/data/fiscal-documentsfiscal_document_storage_diri   menu_asset_max_upload_bytes   menu_asset_pdf_max_pagesi]  #menu_asset_extracted_text_max_charsi  menu_asset_analysis_max_charsmenu_asset_context_max_charszita+engmenu_asset_ocr_languagesz.envzutf-8)env_fileenv_file_encodingcase_sensitivereturnc                     | j                   j                  d      D cg c]#  }|j                         s|j                         % c}S c c}w N,)r   splitstripselfitems     #apps/backend-hub/app/core/config.pycors_origins_listzSettings.cors_origins_listO   s;     *.)F)F)L)LS)QbUYU_U_Ua

bbb
   A	A	c                     | j                   j                  d      D cg c]#  }|j                         s|j                         % c}S c c}w rL   )r.   rN   rO   rP   s     rS   google_workspace_scopes_listz%Settings.google_workspace_scopes_listT   s;     *.)E)E)K)KC)PaTXT^T^T`

aaarU   c                 T    | j                   j                  d       | j                   S )N/)r   rstripr-   rQ   s    rS   google_workspace_redirect_uriz&Settings.google_workspace_redirect_uriY   s,     --44S9:4;^;^:_``    c                 V    | j                   j                         j                         dv S )N>   prod
production)r   rO   lowerr[   s    rS   is_productionzSettings.is_production^   s(     ##))+1137MMMr]   c                     | j                   sy | j                  xs dj                         st        d      | j                  j                  d      dk(  r*| j                  xs dj                         st        d      y y )N z6LLM_PROXY_INTERNAL_TOKEN e' obbligatorio in produzionerY   r   z<LLM_API_KEY e' obbligatoria quando LLM_BASE_URL punta a Groq)rb   r   rO   RuntimeErrorr   rZ   r   r[   s    rS   validate_runtimezSettings.validate_runtimec   sy    !!--3::<WXX##C(,LLVZVfVfVljlUsUsUu]^^ VvLr]   )rJ   N)J__name__
__module____qualname__r	   str__annotations__r   r   r   r   r   r   r   r   r   r   r   r   r   floatr   r   r   r   r   r   intr    r!   boolr"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r4   r5   r6   r7   r8   r9   r:   r;   r=   r>   r?   r@   rB   rC   rD   rE   rF   r   model_configr   propertylistrT   rW   r\   rb   rf    r]   rS   r   r      sf   -Hc-(OS($}c}"9C94s4,C$cC+B#SB"9C9&==%<s<8L#8"Kt"+/cDj/)--"5C5"7OS4Z7*:S4Z:,AsTzA+?cDj? $#$-2d
2(--#&5&++48*E8/Q'Q+J#SJ	P S  	p "3  (FE99-1d
115"C$J5*L"CL	0 S  (JI6:,e:37+S704!3:4'++6:'t::>+S4Z>:>+S4Z>8<.<.1&1%FsF!030*-"C-"5C5'??'//$&c&/4'4)-!3-(, #,$-c-%vafgLc49 c  c bd3i b  b as a  a Nt N  N_r]   r   rJ   c                      t               S )N)r   rr   r]   rS   get_settingsrt   l   s
    :r]   N)		functoolsr   pydanticr   pydantic_settingsr   r   r   rt   rr   r]   rS   <module>rx      s:     # >b_| b_J h  r]   