File tree 1 file changed +6
-4
lines changed
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 9
9
10
10
import toml
11
11
from dotenv import load_dotenv
12
- from pydantic import BaseModel , ValidationError
12
+ from pydantic import BaseModel , SecretStr , ValidationError
13
13
14
14
from openhands .core import logger
15
15
from openhands .core .config .agent_config import AgentConfig
@@ -192,7 +192,7 @@ def load_from_toml(cfg: AppConfig, toml_file: str = 'config.toml'):
192
192
custom_fields [k ] = v
193
193
merged_llm_dict = generic_llm_fields .copy ()
194
194
merged_llm_dict .update (custom_fields )
195
-
195
+
196
196
custom_llm_config = LLMConfig (** merged_llm_dict )
197
197
cfg .set_llm_config (custom_llm_config , nested_key )
198
198
@@ -287,8 +287,10 @@ def finalize_config(cfg: AppConfig):
287
287
pathlib .Path (cfg .cache_dir ).mkdir (parents = True , exist_ok = True )
288
288
289
289
if not cfg .jwt_secret :
290
- cfg .jwt_secret = get_or_create_jwt_secret (
291
- get_file_store (cfg .file_store , cfg .file_store_path )
290
+ cfg .jwt_secret = SecretStr (
291
+ get_or_create_jwt_secret (
292
+ get_file_store (cfg .file_store , cfg .file_store_path )
293
+ )
292
294
)
293
295
294
296
You can’t perform that action at this time.
0 commit comments