Update api/routes.py
Browse files- api/routes.py +6 -6
api/routes.py
CHANGED
@@ -11,8 +11,8 @@ logger = setup_logger(__name__)
|
|
11 |
|
12 |
router = APIRouter()
|
13 |
|
14 |
-
@router.options("/v1/
|
15 |
-
@router.options("/api/v1/
|
16 |
async def gizai_chat_completions_options():
|
17 |
return Response(
|
18 |
status_code=200,
|
@@ -23,13 +23,13 @@ async def gizai_chat_completions_options():
|
|
23 |
},
|
24 |
)
|
25 |
|
26 |
-
@router.get("/v1/
|
27 |
-
@router.get("/api/v1/
|
28 |
async def list_gizai_models():
|
29 |
return {"object": "list", "data": GizAI.models} # Assuming GizAI.models is accessible
|
30 |
|
31 |
-
@router.post("/v1/
|
32 |
-
@router.post("/api/v1/
|
33 |
async def gizai_chat_completions(
|
34 |
request: ChatRequest, app_secret: str = Depends(verify_app_secret)
|
35 |
):
|
|
|
11 |
|
12 |
router = APIRouter()
|
13 |
|
14 |
+
@router.options("/v1/chat/completions")
|
15 |
+
@router.options("/api/v1/chat/completions")
|
16 |
async def gizai_chat_completions_options():
|
17 |
return Response(
|
18 |
status_code=200,
|
|
|
23 |
},
|
24 |
)
|
25 |
|
26 |
+
@router.get("/v1/models")
|
27 |
+
@router.get("/api/v1/models")
|
28 |
async def list_gizai_models():
|
29 |
return {"object": "list", "data": GizAI.models} # Assuming GizAI.models is accessible
|
30 |
|
31 |
+
@router.post("/v1/chat/completions")
|
32 |
+
@router.post("/api/v1/chat/completions")
|
33 |
async def gizai_chat_completions(
|
34 |
request: ChatRequest, app_secret: str = Depends(verify_app_secret)
|
35 |
):
|