Hansimov commited on
Commit
a2d3414
1 Parent(s): 6e2fad5

:zap: [Enhance] Display schema of /api/v1 for user-friendly compatibility

Browse files
Files changed (1) hide show
  1. apis/chat_api.py +5 -1
apis/chat_api.py CHANGED
@@ -137,7 +137,11 @@ class ChatAPIApp:
137
 
138
  def setup_routes(self):
139
  for prefix in ["", "/v1", "/api", "/api/v1"]:
140
- include_in_schema = True if prefix == "" else False
 
 
 
 
141
  self.app.get(
142
  prefix + "/models",
143
  summary="Get available models",
 
137
 
138
  def setup_routes(self):
139
  for prefix in ["", "/v1", "/api", "/api/v1"]:
140
+ if prefix in ["/api/v1"]:
141
+ include_in_schema = True
142
+ else:
143
+ include_in_schema = False
144
+
145
  self.app.get(
146
  prefix + "/models",
147
  summary="Get available models",