Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 23 additions & 23 deletions docs/config.html
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ <h1 class="title"> </h1>
</header>
<h1 id="lightspeed-core-stack">Lightspeed Core Stack</h1>
<hr />
<h1 id="configuration-schema">📋 Configuration schema</h1>
<h1 id="components">📋 Components</h1>
<h2 id="accessrule">AccessRule</h2>
<p>Rule defining what actions a role can perform.</p>
<table>
Expand Down Expand Up @@ -222,12 +222,12 @@ <h2 id="authenticationconfiguration">AuthenticationConfiguration</h2>
</tr>
<tr class="odd">
<td>k8s_cluster_api</td>
<td></td>
<td>string</td>
<td></td>
</tr>
<tr class="even">
<td>k8s_ca_cert_path</td>
<td></td>
<td>string</td>
<td></td>
</tr>
<tr class="odd">
Expand Down Expand Up @@ -456,7 +456,7 @@ <h2 id="configuration">Configuration</h2>
<tbody>
<tr class="odd">
<td>type</td>
<td></td>
<td>string</td>
<td></td>
</tr>
<tr class="even">
Expand Down Expand Up @@ -512,7 +512,7 @@ <h2 id="customization">Customization</h2>
<tbody>
<tr class="odd">
<td>profile_path</td>
<td></td>
<td>string</td>
<td></td>
</tr>
<tr class="even">
Expand All @@ -522,12 +522,12 @@ <h2 id="customization">Customization</h2>
</tr>
<tr class="odd">
<td>system_prompt_path</td>
<td></td>
<td>string</td>
<td></td>
</tr>
<tr class="even">
<td>system_prompt</td>
<td></td>
<td>string</td>
<td></td>
</tr>
<tr class="odd">
Expand All @@ -551,12 +551,12 @@ <h2 id="databaseconfiguration">DatabaseConfiguration</h2>
<tr class="odd">
<td>sqlite</td>
<td></td>
<td></td>
<td>SQLite database configuration</td>
</tr>
<tr class="even">
<td>postgres</td>
<td></td>
<td></td>
<td>PostgreSQL database configuration</td>
</tr>
</tbody>
</table>
Expand Down Expand Up @@ -591,12 +591,12 @@ <h2 id="inferenceconfiguration">InferenceConfiguration</h2>
<tbody>
<tr class="odd">
<td>default_model</td>
<td></td>
<td>string</td>
<td></td>
</tr>
<tr class="even">
<td>default_provider</td>
<td></td>
<td>string</td>
<td></td>
</tr>
</tbody>
Expand Down Expand Up @@ -705,22 +705,22 @@ <h2 id="llamastackconfiguration">LlamaStackConfiguration</h2>
<tbody>
<tr class="odd">
<td>url</td>
<td></td>
<td>string</td>
<td></td>
</tr>
<tr class="even">
<td>api_key</td>
<td></td>
<td>string</td>
<td></td>
</tr>
<tr class="odd">
<td>use_as_library_client</td>
<td></td>
<td>boolean</td>
<td></td>
</tr>
<tr class="even">
<td>library_client_config_path</td>
<td></td>
<td>string</td>
<td></td>
</tr>
</tbody>
Expand Down Expand Up @@ -811,7 +811,7 @@ <h2 id="modelcontextprotocolserver">ModelContextProtocolServer</h2>
</tr>
<tr class="even">
<td>namespace</td>
<td></td>
<td>string</td>
<td>Database namespace</td>
</tr>
<tr class="odd">
Expand All @@ -827,7 +827,7 @@ <h2 id="modelcontextprotocolserver">ModelContextProtocolServer</h2>
</tr>
<tr class="odd">
<td>ca_cert_path</td>
<td></td>
<td>string</td>
<td>Path to CA certificate</td>
</tr>
</tbody>
Expand Down Expand Up @@ -939,7 +939,7 @@ <h2 id="rhidentityconfiguration">RHIdentityConfiguration</h2>
<tbody>
<tr class="odd">
<td>required_entitlements</td>
<td></td>
<td>array</td>
<td></td>
</tr>
</tbody>
Expand Down Expand Up @@ -1049,17 +1049,17 @@ <h2 id="tlsconfiguration">TLSConfiguration</h2>
<tbody>
<tr class="odd">
<td>tls_certificate_path</td>
<td></td>
<td>string</td>
<td>SSL/TLS certificate file path for HTTPS support.</td>
</tr>
<tr class="even">
<td>tls_key_path</td>
<td></td>
<td>string</td>
<td>SSL/TLS private key file path for HTTPS support.</td>
</tr>
<tr class="odd">
<td>tls_key_password</td>
<td></td>
<td>string</td>
<td>Path to file containing the password to decrypt the SSL/TLS private
key.</td>
</tr>
Expand All @@ -1083,7 +1083,7 @@ <h2 id="userdatacollection">UserDataCollection</h2>
</tr>
<tr class="even">
<td>feedback_storage</td>
<td></td>
<td>string</td>
<td></td>
</tr>
<tr class="odd">
Expand All @@ -1093,7 +1093,7 @@ <h2 id="userdatacollection">UserDataCollection</h2>
</tr>
<tr class="even">
<td>transcripts_storage</td>
<td></td>
<td>string</td>
<td></td>
</tr>
</tbody>
Expand Down
46 changes: 23 additions & 23 deletions docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

---

# 📋 Configuration schema
# 📋 Components



Expand Down Expand Up @@ -37,8 +37,8 @@ Authentication configuration.
|-------|------|-------------|
| module | string | |
| skip_tls_verification | boolean | |
| k8s_cluster_api | | |
| k8s_ca_cert_path | | |
| k8s_cluster_api | string | |
| k8s_ca_cert_path | string | |
| jwk_config | | |
| rh_identity_config | | |

Expand Down Expand Up @@ -125,7 +125,7 @@ Conversation cache configuration.

| Field | Type | Description |
|-------|------|-------------|
| type | | |
| type | string | |
| memory | | |
| sqlite | | |
| postgres | | |
Expand All @@ -151,10 +151,10 @@ Service customization.

| Field | Type | Description |
|-------|------|-------------|
| profile_path | | |
| profile_path | string | |
| disable_query_system_prompt | boolean | |
| system_prompt_path | | |
| system_prompt | | |
| system_prompt_path | string | |
| system_prompt | string | |
| custom_profile | | |


Expand All @@ -166,8 +166,8 @@ Database configuration.

| Field | Type | Description |
|-------|------|-------------|
| sqlite | | |
| postgres | | |
| sqlite | | SQLite database configuration |
| postgres | | PostgreSQL database configuration |


## InMemoryCacheConfig
Expand All @@ -189,8 +189,8 @@ Inference configuration.

| Field | Type | Description |
|-------|------|-------------|
| default_model | | |
| default_provider | | |
| default_model | string | |
| default_provider | string | |


## JsonPathOperator
Expand Down Expand Up @@ -249,10 +249,10 @@ Llama stack configuration.

| Field | Type | Description |
|-------|------|-------------|
| url | | |
| api_key | | |
| use_as_library_client | | |
| library_client_config_path | | |
| url | string | |
| api_key | string | |
| use_as_library_client | boolean | |
| library_client_config_path | string | |


## ModelContextProtocolServer
Expand Down Expand Up @@ -291,10 +291,10 @@ Useful resources:
| db | string | Database name to connect to |
| user | string | Database user name used to authenticate |
| password | string | Password used to authenticate |
| namespace | | Database namespace |
| namespace | string | Database namespace |
| ssl_mode | string | SSL mode |
| gss_encmode | string | This option determines whether or with what priority a secure GSS TCP/IP connection will be negotiated with the server. |
| ca_cert_path | | Path to CA certificate |
| ca_cert_path | string | Path to CA certificate |


## QuotaHandlersConfiguration
Expand Down Expand Up @@ -346,7 +346,7 @@ Red Hat Identity authentication configuration.

| Field | Type | Description |
|-------|------|-------------|
| required_entitlements | | |
| required_entitlements | array | |


## SQLiteDatabaseConfiguration
Expand Down Expand Up @@ -398,9 +398,9 @@ Useful resources:

| Field | Type | Description |
|-------|------|-------------|
| tls_certificate_path | | SSL/TLS certificate file path for HTTPS support. |
| tls_key_path | | SSL/TLS private key file path for HTTPS support. |
| tls_key_password | | Path to file containing the password to decrypt the SSL/TLS private key. |
| tls_certificate_path | string | SSL/TLS certificate file path for HTTPS support. |
| tls_key_path | string | SSL/TLS private key file path for HTTPS support. |
| tls_key_password | string | Path to file containing the password to decrypt the SSL/TLS private key. |


## UserDataCollection
Expand All @@ -412,6 +412,6 @@ User data collection configuration.
| Field | Type | Description |
|-------|------|-------------|
| feedback_enabled | boolean | |
| feedback_storage | | |
| feedback_storage | string | |
| transcripts_enabled | boolean | |
| transcripts_storage | | |
| transcripts_storage | string | |
17 changes: 14 additions & 3 deletions src/models/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,17 @@ def check_postgres_configuration(self) -> Self:
class DatabaseConfiguration(ConfigurationBase):
"""Database configuration."""

sqlite: Optional[SQLiteDatabaseConfiguration] = None
postgres: Optional[PostgreSQLDatabaseConfiguration] = None
sqlite: Optional[SQLiteDatabaseConfiguration] = Field(
None,
title="SQLite configuration",
description="SQLite database configuration",
)

postgres: Optional[PostgreSQLDatabaseConfiguration] = Field(
None,
title="PostgreSQL configuration",
description="PostgreSQL database configuration",
)

@model_validator(mode="after")
def check_database_configuration(self) -> Self:
Expand Down Expand Up @@ -762,7 +771,9 @@ class Configuration(ConfigurationBase):
service: ServiceConfiguration
llama_stack: LlamaStackConfiguration
user_data_collection: UserDataCollection
database: DatabaseConfiguration = Field(default_factory=DatabaseConfiguration)
database: DatabaseConfiguration = Field(
default_factory=lambda: DatabaseConfiguration(sqlite=None, postgres=None),
)
mcp_servers: list[ModelContextProtocolServer] = Field(default_factory=list)
authentication: AuthenticationConfiguration = Field(
default_factory=AuthenticationConfiguration
Expand Down
Loading