mirror of
https://github.com/ParisNeo/lollms.git
synced 2025-02-21 01:42:08 +00:00
added personality modification
This commit is contained in:
parent
6b258468d0
commit
6f120647a5
@ -274,7 +274,9 @@ class PersonalityConfig(BaseModel):
|
||||
category:str
|
||||
name:str
|
||||
config:dict
|
||||
|
||||
|
||||
|
||||
|
||||
@router.post("/set_personality_config")
|
||||
def set_personality_config(data:PersonalityConfig):
|
||||
print("- Recovering personality config")
|
||||
@ -292,6 +294,9 @@ def set_personality_config(data:PersonalityConfig):
|
||||
if config_file.exists():
|
||||
with open(config_file,"w") as f:
|
||||
yaml.safe_dump(config, f)
|
||||
|
||||
lollmsElfServer.mounted_personalities = lollmsElfServer.rebuild_personalities(reload_all=True)
|
||||
lollmsElfServer.InfoMessage("Personality updated")
|
||||
return {"status":True}
|
||||
else:
|
||||
return {"status":False, "error":"Not found"}
|
||||
|
Loading…
x
Reference in New Issue
Block a user