mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2025-01-18 02:39:47 +00:00
Add defaulting to english when no argument for language is given
This commit is contained in:
parent
87be7f961f
commit
659557c974
4
app.py
4
app.py
@ -775,12 +775,16 @@ class LoLLMsWebUI(LoLLMsAPPI):
|
||||
|
||||
def list_personalities_categories(self):
|
||||
language = request.args.get('language')
|
||||
if language is None:
|
||||
language = 'english'
|
||||
personalities_categories_dir = self.lollms_paths.personalities_zoo_path/f'{language}' # replace with the actual path to the models folder
|
||||
personalities_categories = [f.stem for f in personalities_categories_dir.iterdir() if f.is_dir() and not f.name.startswith(".")]
|
||||
return jsonify(personalities_categories)
|
||||
|
||||
def list_personalities(self):
|
||||
language = request.args.get('language')
|
||||
if language is None:
|
||||
language = 'english'
|
||||
category = request.args.get('category')
|
||||
if not category:
|
||||
return jsonify([])
|
||||
|
Loading…
Reference in New Issue
Block a user