Spaces:
Sleeping
Sleeping
Initial commit
Browse files
app.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
| 1 |
import os
|
| 2 |
from fastapi import FastAPI, Request, HTTPException
|
| 3 |
from fastapi.middleware.cors import CORSMiddleware
|
|
|
|
| 4 |
from manager.dialogue_manager import handle_dialogue
|
| 5 |
from rag.rag_manager import chroma_initialized, load_game_docs_from_disk, add_docs, set_embedder
|
| 6 |
from contextlib import asynccontextmanager
|
|
@@ -88,6 +89,11 @@ async def wake(request: Request):
|
|
| 88 |
return {"status": "awake", "session_id": session_id}
|
| 89 |
|
| 90 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 91 |
'''
|
| 92 |
최종 game‑server → ai‑server 요청 예시
|
| 93 |
{
|
|
|
|
| 1 |
import os
|
| 2 |
from fastapi import FastAPI, Request, HTTPException
|
| 3 |
from fastapi.middleware.cors import CORSMiddleware
|
| 4 |
+
from fastapi.responses import RedirectResponse
|
| 5 |
from manager.dialogue_manager import handle_dialogue
|
| 6 |
from rag.rag_manager import chroma_initialized, load_game_docs_from_disk, add_docs, set_embedder
|
| 7 |
from contextlib import asynccontextmanager
|
|
|
|
| 89 |
return {"status": "awake", "session_id": session_id}
|
| 90 |
|
| 91 |
|
| 92 |
+
@app.get("/", include_in_schema=False)
|
| 93 |
+
async def root():
|
| 94 |
+
return RedirectResponse(url="/docs")
|
| 95 |
+
|
| 96 |
+
|
| 97 |
'''
|
| 98 |
최종 game‑server → ai‑server 요청 예시
|
| 99 |
{
|