Spaces:
Paused
Paused
:zap: [Enhance] Align available models format with openai
Browse files- apis/chat_api.py +47 -26
apis/chat_api.py
CHANGED
|
@@ -21,32 +21,53 @@ class ChatAPIApp:
|
|
| 21 |
self.setup_routes()
|
| 22 |
|
| 23 |
def get_available_models(self):
|
| 24 |
-
self.available_models =
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
return self.available_models
|
| 51 |
|
| 52 |
class CreateConversationSessionPostItem(BaseModel):
|
|
|
|
| 21 |
self.setup_routes()
|
| 22 |
|
| 23 |
def get_available_models(self):
|
| 24 |
+
self.available_models = {
|
| 25 |
+
"object": "list",
|
| 26 |
+
"data": [
|
| 27 |
+
{
|
| 28 |
+
"id": "precise",
|
| 29 |
+
"description": "Bing (Precise): Concise and straightforward.",
|
| 30 |
+
"object": "model",
|
| 31 |
+
"created": 1700000000,
|
| 32 |
+
"owned_by": "bing",
|
| 33 |
+
},
|
| 34 |
+
{
|
| 35 |
+
"id": "balanced",
|
| 36 |
+
"description": "Bing (Balanced): Informative and friendly.",
|
| 37 |
+
"object": "model",
|
| 38 |
+
"created": 1700000000,
|
| 39 |
+
"owned_by": "bing",
|
| 40 |
+
},
|
| 41 |
+
{
|
| 42 |
+
"id": "creative",
|
| 43 |
+
"description": "Bing (Creative): Original and imaginative.",
|
| 44 |
+
"object": "model",
|
| 45 |
+
"created": 1700000000,
|
| 46 |
+
"owned_by": "bing",
|
| 47 |
+
},
|
| 48 |
+
{
|
| 49 |
+
"id": "precise-offline",
|
| 50 |
+
"description": "Bing (Precise): (No Internet) Concise and straightforward.",
|
| 51 |
+
"object": "model",
|
| 52 |
+
"created": 1700000000,
|
| 53 |
+
"owned_by": "bing",
|
| 54 |
+
},
|
| 55 |
+
{
|
| 56 |
+
"id": "balanced-offline",
|
| 57 |
+
"description": "Bing (Balanced): (No Internet) Informative and friendly.",
|
| 58 |
+
"object": "model",
|
| 59 |
+
"created": 1700000000,
|
| 60 |
+
"owned_by": "bing",
|
| 61 |
+
},
|
| 62 |
+
{
|
| 63 |
+
"id": "creative-offline",
|
| 64 |
+
"description": "Bing (Creative): (No Internet) Original and imaginative.",
|
| 65 |
+
"object": "model",
|
| 66 |
+
"created": 1700000000,
|
| 67 |
+
"owned_by": "bing",
|
| 68 |
+
},
|
| 69 |
+
],
|
| 70 |
+
}
|
| 71 |
return self.available_models
|
| 72 |
|
| 73 |
class CreateConversationSessionPostItem(BaseModel):
|