feat: add public model catalog discovery

This commit is contained in:
QiuSW
2026-07-04 10:14:16 +08:00
parent 3a661afaa5
commit 898329e047
16 changed files with 533 additions and 14 deletions
+10
View File
@@ -7,6 +7,7 @@ from django.urls import reverse, reverse_lazy
from django.views import View
from django.views.generic import FormView, TemplateView
from apps.ai.catalog import get_public_model_catalog
from apps.billing.payment_gateways import PaymentOrderCreateError
from apps.billing.pricing import NoExchangeRateError
from apps.billing.models import PointsLedger, RechargeOrder
@@ -139,6 +140,15 @@ class ApiKeyDeleteView(LoginRequiredMixin, View):
return redirect("portal-apikeys")
class ModelCatalogView(LoginRequiredMixin, TemplateView):
template_name = "portal/models.html"
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
context["models"] = get_public_model_catalog()
return context
class RechargePageView(LoginRequiredMixin, FormView):
template_name = "portal/recharge.html"
form_class = RechargeCreateForm