mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2024-12-24 06:36:37 +00:00
Merge branch 'main' of https://github.com/nomic-ai/gpt4all-ui
This commit is contained in:
commit
4ed1be30dc
4
app.py
4
app.py
@ -776,12 +776,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