feat: add openai-compatible model gateway

This commit is contained in:
hailin
2026-07-14 13:44:55 +08:00
parent 13b0768dfd
commit 11bab3e98f
22 changed files with 940 additions and 4 deletions

View File

@@ -21,6 +21,7 @@ INSTALLED_APPS = [
"apps.tickets",
"apps.solutions",
"apps.knowledge",
"apps.modelhub",
]
MIDDLEWARE = [
@@ -90,3 +91,13 @@ DJANGO_SUPERUSER_EMAIL = os.getenv("DJANGO_SUPERUSER_EMAIL", "admin@example.com"
CELERY_BROKER_URL = os.getenv("CELERY_BROKER_URL", "redis://localhost:6379/0")
CELERY_RESULT_BACKEND = os.getenv("CELERY_RESULT_BACKEND", "redis://localhost:6379/1")
AI_CREDENTIAL_ENCRYPTION_KEY = os.getenv("AI_CREDENTIAL_ENCRYPTION_KEY", "")
AI_RUN_RETENTION_DAYS = int(os.getenv("AI_RUN_RETENTION_DAYS", "90"))
CELERY_BEAT_SCHEDULE = {
"cleanup-expired-agent-runs": {
"task": "apps.agents.tasks.cleanup_expired_agent_runs",
"schedule": 86400.0,
}
}

View File

@@ -10,3 +10,7 @@ DATABASES = {
PASSWORD_HASHERS = [
"django.contrib.auth.hashers.MD5PasswordHasher",
]
AI_CREDENTIAL_ENCRYPTION_KEY = "t8XuQv9e8WDoFv7RXT4-zdw1hQChGFKtr7E6ccRZAzU="
CELERY_TASK_ALWAYS_EAGER = True
CELERY_TASK_EAGER_PROPAGATES = True