This commit is contained in:
2026-03-04 20:05:33 +08:00
parent fdbe06a077
commit 6998d694bb
25 changed files with 572 additions and 37 deletions

View File

@@ -14,7 +14,7 @@ from channels.auth import AuthMiddlewareStack
from channels.security.websocket import AllowedHostsOriginValidator
from django.core.asgi import get_asgi_application
from chat.url import websocket_urlpatterns
from prompt.url import websocket_urlpatterns
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "api.settings")

View File

@@ -27,7 +27,7 @@ BASE_DIR = Path(__file__).resolve().parent.parent
SECRET_KEY = os.getenv("SECRET_KEY")
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False
DEBUG = True
DEV = os.getenv("ENV") != "production"
@@ -55,7 +55,7 @@ INSTALLED_APPS = [
"account",
"task",
"submission",
"chat",
"prompt",
]
MIDDLEWARE = [
@@ -201,3 +201,8 @@ NINJA_PAGINATION_PER_PAGE = 10
MEDIA_URL = "/media/"
MEDIA_ROOT = BASE_DIR / "media"
# LLM Configuration
LLM_API_KEY = os.environ.get("LLM_API_KEY", "")
LLM_BASE_URL = os.environ.get("LLM_BASE_URL", "https://api.deepseek.com")
LLM_MODEL = os.environ.get("LLM_MODEL", "deepseek-chat")

View File

@@ -28,6 +28,7 @@ api.add_router("tutorial/", "task.tutorial.router")
api.add_router("challenge/", "task.challenge.router")
api.add_router("submission/", "submission.api.router")
api.add_router("upload/", "utils.upload.router")
api.add_router("prompt/", "prompt.api.router")
apis = [