diff --git a/docs/config.png b/docs/config.png index d32bc8a5..e9cf9022 100644 Binary files a/docs/config.png and b/docs/config.png differ diff --git a/docs/config.puml b/docs/config.puml index 0a1d0b21..492e564c 100644 --- a/docs/config.puml +++ b/docs/config.puml @@ -27,13 +27,13 @@ class "CORSConfiguration" as src.models.config.CORSConfiguration { check_cors_configuration() -> Self } class "Configuration" as src.models.config.Configuration { - authentication + authentication : Optional[AuthenticationConfiguration] authorization : Optional[AuthorizationConfiguration] customization : Optional[Customization] - database - inference + database : Optional[DatabaseConfiguration] + inference : Optional[InferenceConfiguration] llama_stack - mcp_servers : list[ModelContextProtocolServer] + mcp_servers : Optional[list[ModelContextProtocolServer]] name : str service user_data_collection @@ -64,7 +64,7 @@ class "JsonPathOperator" as src.models.config.JsonPathOperator { name } class "JwkConfiguration" as src.models.config.JwkConfiguration { - jwt_configuration + jwt_configuration : Optional[JwtConfiguration] url : AnyHttpUrl } class "JwtConfiguration" as src.models.config.JwtConfiguration { @@ -84,7 +84,7 @@ class "JwtRoleRule" as src.models.config.JwtRoleRule { check_roles() -> Self } class "LlamaStackConfiguration" as src.models.config.LlamaStackConfiguration { - api_key : Optional[str] + api_key : Optional[SecretStr] library_client_config_path : Optional[str] url : Optional[str] use_as_library_client : Optional[bool] @@ -101,7 +101,7 @@ class "PostgreSQLDatabaseConfiguration" as src.models.config.PostgreSQLDatabaseC gss_encmode : str host : str namespace : Optional[str] - password : str + password : SecretStr port : Annotated ssl_mode : str user : str @@ -114,10 +114,10 @@ class "ServiceConfiguration" as src.models.config.ServiceConfiguration { access_log : bool auth_enabled : bool color_log : bool - cors + cors : Optional[CORSConfiguration] host : str port : Annotated - tls_config + tls_config : Optional[TLSConfiguration] workers : Annotated check_service_configuration() -> Self } @@ -152,15 +152,9 @@ src.models.config.SQLiteDatabaseConfiguration --|> src.models.config.Configurati src.models.config.ServiceConfiguration --|> src.models.config.ConfigurationBase src.models.config.TLSConfiguration --|> src.models.config.ConfigurationBase src.models.config.UserDataCollection --|> src.models.config.ConfigurationBase -src.models.config.AuthenticationConfiguration --* src.models.config.Configuration : authentication -src.models.config.CORSConfiguration --* src.models.config.ServiceConfiguration : cors -src.models.config.DatabaseConfiguration --* src.models.config.Configuration : database -src.models.config.InferenceConfiguration --* src.models.config.Configuration : inference src.models.config.JsonPathOperator --* src.models.config.JwtRoleRule : operator -src.models.config.JwtConfiguration --* src.models.config.JwkConfiguration : jwt_configuration src.models.config.LlamaStackConfiguration --* src.models.config.Configuration : llama_stack src.models.config.SQLiteDatabaseConfiguration --* src.models.config.DatabaseConfiguration : sqlite src.models.config.ServiceConfiguration --* src.models.config.Configuration : service -src.models.config.TLSConfiguration --* src.models.config.ServiceConfiguration : tls_config src.models.config.UserDataCollection --* src.models.config.Configuration : user_data_collection @enduml diff --git a/docs/config.svg b/docs/config.svg index 97b3e8fe..358724d1 100644 --- a/docs/config.svg +++ b/docs/config.svg @@ -1,444 +1,408 @@ - + - - - - AccessRule - - actions : list[Action] - role : str - + + + + AccessRule + + actions : list[Action] + role : str + - - - - Action - - name - + + + + Action + + name + - - - - AuthenticationConfiguration - - jwk_config : Optional[JwkConfiguration] - jwk_configuration - k8s_ca_cert_path : Optional[FilePath] - k8s_cluster_api : Optional[AnyHttpUrl] - module : str - skip_tls_verification : bool - - check_authentication_model() -> Self + + + + AuthenticationConfiguration + + jwk_config : Optional[JwkConfiguration] + jwk_configuration + k8s_ca_cert_path : Optional[FilePath] + k8s_cluster_api : Optional[AnyHttpUrl] + module : str + skip_tls_verification : bool + + check_authentication_model() -> Self - - - - AuthorizationConfiguration - - access_rules : Optional[list[AccessRule]] - + + + + AuthorizationConfiguration + + access_rules : Optional[list[AccessRule]] + - - - - CORSConfiguration - - allow_credentials : bool - allow_headers : list[str] - allow_methods : list[str] - allow_origins : list[str] - - check_cors_configuration() -> Self + + + + CORSConfiguration + + allow_credentials : bool + allow_headers : list[str] + allow_methods : list[str] + allow_origins : list[str] + + check_cors_configuration() -> Self - - - - Configuration - - authentication - authorization : Optional[AuthorizationConfiguration] - customization : Optional[Customization] - database - inference - llama_stack - mcp_servers : list[ModelContextProtocolServer] - name : str - service - user_data_collection - - dump(filename: str) -> None + + + + Configuration + + authentication : Optional[AuthenticationConfiguration] + authorization : Optional[AuthorizationConfiguration] + customization : Optional[Customization] + database : Optional[DatabaseConfiguration] + inference : Optional[InferenceConfiguration] + llama_stack + mcp_servers : Optional[list[ModelContextProtocolServer]] + name : str + service + user_data_collection + + dump(filename: str) -> None - - - - ConfigurationBase - - model_config - + + + + ConfigurationBase + + model_config + - - - - Customization - - disable_query_system_prompt : bool - system_prompt : Optional[str] - system_prompt_path : Optional[FilePath] - - check_customization_model() -> Self + + + + Customization + + disable_query_system_prompt : bool + system_prompt : Optional[str] + system_prompt_path : Optional[FilePath] + + check_customization_model() -> Self - - - - DatabaseConfiguration - - config - db_type - postgres : Optional[PostgreSQLDatabaseConfiguration] - sqlite : Optional[SQLiteDatabaseConfiguration] - - check_database_configuration() -> Self + + + + DatabaseConfiguration + + config + db_type + postgres : Optional[PostgreSQLDatabaseConfiguration] + sqlite : Optional[SQLiteDatabaseConfiguration] + + check_database_configuration() -> Self - - - - InferenceConfiguration - - default_model : Optional[str] - default_provider : Optional[str] - - check_default_model_and_provider() -> Self + + + + InferenceConfiguration + + default_model : Optional[str] + default_provider : Optional[str] + + check_default_model_and_provider() -> Self - - - - JsonPathOperator - - name - + + + + JsonPathOperator + + name + - - - - JwkConfiguration - - jwt_configuration - url : AnyHttpUrl - + + + + JwkConfiguration + + jwt_configuration : Optional[JwtConfiguration] + url : AnyHttpUrl + - - - - JwtConfiguration - - role_rules : Optional[list[JwtRoleRule]] - user_id_claim : str - username_claim : str - + + + + JwtConfiguration + + role_rules : Optional[list[JwtRoleRule]] + user_id_claim : str + username_claim : str + - - - - JwtRoleRule - - compiled_regex - jsonpath : str - negate : bool - operator - roles : list[str] - value : Any - - check_jsonpath() -> Self - check_regex_pattern() -> Self - check_roles() -> Self + + + + JwtRoleRule + + compiled_regex + jsonpath : str + negate : bool + operator + roles : list[str] + value : Any + + check_jsonpath() -> Self + check_regex_pattern() -> Self + check_roles() -> Self - - - - LlamaStackConfiguration - - api_key : Optional[str] - library_client_config_path : Optional[str] - url : Optional[str] - use_as_library_client : Optional[bool] - - check_llama_stack_model() -> Self + + + + LlamaStackConfiguration + + api_key : Optional[SecretStr] + library_client_config_path : Optional[str] + url : Optional[str] + use_as_library_client : Optional[bool] + + check_llama_stack_model() -> Self - - - - ModelContextProtocolServer - - name : str - provider_id : str - url : str - + + + + ModelContextProtocolServer + + name : str + provider_id : str + url : str + - - - - PostgreSQLDatabaseConfiguration - - ca_cert_path : Optional[FilePath] - db : str - gss_encmode : str - host : str - namespace : Optional[str] - password : str - port : Annotated - ssl_mode : str - user : str - - check_postgres_configuration() -> Self + + + + PostgreSQLDatabaseConfiguration + + ca_cert_path : Optional[FilePath] + db : str + gss_encmode : str + host : str + namespace : Optional[str] + password : SecretStr + port : Annotated + ssl_mode : str + user : str + + check_postgres_configuration() -> Self - - - - SQLiteDatabaseConfiguration - - db_path : str - + + + + SQLiteDatabaseConfiguration + + db_path : str + - - - - ServiceConfiguration - - access_log : bool - auth_enabled : bool - color_log : bool - cors - host : str - port : Annotated - tls_config - workers : Annotated - - check_service_configuration() -> Self + + + + ServiceConfiguration + + access_log : bool + auth_enabled : bool + color_log : bool + cors : Optional[CORSConfiguration] + host : str + port : Annotated + tls_config : Optional[TLSConfiguration] + workers : Annotated + + check_service_configuration() -> Self - - - - TLSConfiguration - - tls_certificate_path : Optional[FilePath] - tls_key_password : Optional[FilePath] - tls_key_path : Optional[FilePath] - - check_tls_configuration() -> Self + + + + TLSConfiguration + + tls_certificate_path : Optional[FilePath] + tls_key_password : Optional[FilePath] + tls_key_path : Optional[FilePath] + + check_tls_configuration() -> Self - - - - UserDataCollection - - feedback_enabled : bool - feedback_storage : Optional[str] - transcripts_enabled : bool - transcripts_storage : Optional[str] - - check_storage_location_is_set_when_needed() -> Self + + + + UserDataCollection + + feedback_enabled : bool + feedback_storage : Optional[str] + transcripts_enabled : bool + transcripts_storage : Optional[str] + + check_storage_location_is_set_when_needed() -> Self - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - - - - - - - authentication - - - - - - cors - - - - - - database - - - - - - inference + + - - - operator - - - - - - jwt_configuration + + + operator - - - llama_stack + + + llama_stack - - - sqlite + + + sqlite - - - service - - - - - - tls_config + + + service - - - user_data_collection + + + user_data_collection - +