Spaces:
Runtime error
Runtime error
Update apis/chat_api.py
Browse files- 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):
|