radinhas commited on
Commit
0aeab64
1 Parent(s): 901702c

Update apis/chat_api.py

Browse files
Files changed (1) hide show
  1. apis/chat_api.py +2 -11
apis/chat_api.py CHANGED
@@ -22,17 +22,8 @@ class ChatAPIApp:
22
  self.setup_routes()
23
 
24
  def get_available_models(self):
25
- f = open('lang_name.json')
26
- self.available_models = [
27
- {
28
- "code": "auto",
29
- "name": "Detect"
30
- },
31
- {
32
- "code": "fa",
33
- "name": "persian"
34
- }
35
- ]
36
  return self.available_models
37
 
38
  class ChatCompletionsPostItem(BaseModel):
 
22
  self.setup_routes()
23
 
24
  def get_available_models(self):
25
+ f = open('lang_name.json', "r")
26
+ self.available_models = json.loads(f.read())
 
 
 
 
 
 
 
 
 
27
  return self.available_models
28
 
29
  class ChatCompletionsPostItem(BaseModel):