Update main.py
Browse files
main.py
CHANGED
@@ -210,8 +210,10 @@ async def verify_app_secret(app_secret: str):
|
|
210 |
raise HTTPException(status_code=403, detail="Forbidden")
|
211 |
|
212 |
@app.post("/v1/chat/completions")
|
213 |
-
async def chat_completions(
|
214 |
-
|
|
|
|
|
215 |
|
216 |
# Validate model
|
217 |
if request.model not in Blackbox.models:
|
|
|
210 |
raise HTTPException(status_code=403, detail="Forbidden")
|
211 |
|
212 |
@app.post("/v1/chat/completions")
|
213 |
+
async def chat_completions(
|
214 |
+
request: ChatRequest,
|
215 |
+
app_secret: str = Depends(lambda: os.getenv("APP_SECRET"))
|
216 |
+
):
|
217 |
|
218 |
# Validate model
|
219 |
if request.model not in Blackbox.models:
|