jonathanjordan21 commited on
Commit
6072755
1 Parent(s): 55b4f54

Update apis/chat_api.py

Browse files
Files changed (1) hide show
  1. apis/chat_api.py +1 -2
apis/chat_api.py CHANGED
@@ -45,8 +45,7 @@ class ChatAPIApp:
45
  return {"object": "list", "data": AVAILABLE_MODELS_DICTS}
46
 
47
  def get_available_models_ollama(self):
48
- ollama_models_dict = AVAILABLE_MODELS_DICTS.copy()
49
- ollama_models_dict['name'] = ollama_models_dict.pop('id')
50
  return {"object": "list", "models":ollama_models_dict}
51
 
52
  def extract_api_key(
 
45
  return {"object": "list", "data": AVAILABLE_MODELS_DICTS}
46
 
47
  def get_available_models_ollama(self):
48
+ ollama_models_dict = [{"name" if k == "id" else k:v for k,v in d.items()} for d in AVAILABLE_MODELS_DICTS.copy()]
 
49
  return {"object": "list", "models":ollama_models_dict}
50
 
51
  def extract_api_key(