Hansimov commited on
Commit
ad66be0
1 Parent(s): 01354e5

:zap: [Enhance] Align available models format with openai

Browse files
Files changed (1) hide show
  1. 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
- "id": "precise",
27
- "description": "Bing (Precise): Concise and straightforward.",
28
- },
29
- {
30
- "id": "balanced",
31
- "description": "Bing (Balanced): Informative and friendly.",
32
- },
33
- {
34
- "id": "creative",
35
- "description": "Bing (Creative): Original and imaginative.",
36
- },
37
- {
38
- "id": "precise-offline",
39
- "description": "Bing (Precise): (No Internet) Concise and straightforward.",
40
- },
41
- {
42
- "id": "balanced-offline",
43
- "description": "Bing (Balanced): (No Internet) Informative and friendly.",
44
- },
45
- {
46
- "id": "creative-offline",
47
- "description": "Bing (Creative): (No Internet) Original and imaginative.",
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):