File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -129,10 +129,12 @@ def redact_config(config: TConfig | TEmbeddingConfig) -> TConfig | TEmbeddingCon
129129 '''
130130 Redact sensitive information from the config for logging
131131 '''
132- if isinstance (config , TConfig ):
133- em_conf = config .embedding
132+ config_copy = config .model_copy (deep = True )
133+
134+ if isinstance (config_copy , TConfig ):
135+ em_conf = config_copy .embedding
134136 else :
135- em_conf = config
137+ em_conf = config_copy
136138
137139 if em_conf .auth :
138140 if isinstance (em_conf .auth , TEmbeddingAuthApiKey ):
@@ -141,4 +143,4 @@ def redact_config(config: TConfig | TEmbeddingConfig) -> TConfig | TEmbeddingCon
141143 em_conf .auth .username = '***REDACTED***'
142144 em_conf .auth .password = '***REDACTED***' # noqa: S105
143145
144- return config
146+ return config_copy
You can’t perform that action at this time.
0 commit comments