Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -59,7 +59,8 @@ async def query_model(payload):
|
|
59 |
@app.get("/status")
|
60 |
async def status():
|
61 |
try:
|
62 |
-
|
|
|
63 |
return JSONResponse(content=format_chat_response(response_text))
|
64 |
except Exception as e:
|
65 |
logger.error(f"Status check failed: {e}")
|
@@ -68,7 +69,6 @@ async def status():
|
|
68 |
@app.post("/v1/chat/completions")
|
69 |
async def chat_completion(request: Request):
|
70 |
try:
|
71 |
-
return print('xs')
|
72 |
data = await request.json()
|
73 |
messages = data.get("messages", [])
|
74 |
if not messages:
|
|
|
59 |
@app.get("/status")
|
60 |
async def status():
|
61 |
try:
|
62 |
+
|
63 |
+
response_text = os.getenv('HF_API_TOKEN') + "it's working"
|
64 |
return JSONResponse(content=format_chat_response(response_text))
|
65 |
except Exception as e:
|
66 |
logger.error(f"Status check failed: {e}")
|
|
|
69 |
@app.post("/v1/chat/completions")
|
70 |
async def chat_completion(request: Request):
|
71 |
try:
|
|
|
72 |
data = await request.json()
|
73 |
messages = data.get("messages", [])
|
74 |
if not messages:
|