feat: add public model catalog discovery
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user