Spaces:
Running
Running
:zap: [Enhance] Display schema of /api/v1 for user-friendly compatibility
Browse files- 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 |
-
|
|
|
|
|
|
|
|
|
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",
|