Skip to content

Commit c2e638e

Browse files
committed
Don't log sensitive info
1 parent 15e2233 commit c2e638e

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/app/endpoints/query.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,9 @@ async def query_endpoint_handler(
174174
"""
175175
check_configuration_loaded(configuration)
176176

177-
llama_stack_config = configuration.llama_stack_configuration
177+
# log Llama Stack configuration, but without sensitive information
178+
llama_stack_config = configuration.llama_stack_configuration.model_copy()
179+
llama_stack_config.api_key = "********"
178180
logger.info("LLama stack config: %s", llama_stack_config)
179181

180182
user_id, _, token = auth

src/app/endpoints/streaming_query.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,9 @@ async def streaming_query_endpoint_handler( # pylint: disable=too-many-locals
541541

542542
check_configuration_loaded(configuration)
543543

544-
llama_stack_config = configuration.llama_stack_configuration
544+
# log Llama Stack configuration, but without sensitive information
545+
llama_stack_config = configuration.llama_stack_configuration.model_copy()
546+
llama_stack_config.api_key = "********"
545547
logger.info("LLama stack config: %s", llama_stack_config)
546548

547549
user_id, _user_name, token = auth

0 commit comments

Comments
 (0)