feat: add public model catalog discovery
This commit is contained in:
@@ -25,6 +25,7 @@ from apps.api.serializers import (
|
||||
RechargeStatusRequestSerializer,
|
||||
)
|
||||
from apps.api.throttles import GenerateRateThrottle, throttle_api_auth_failure
|
||||
from apps.ai.catalog import get_public_model_catalog
|
||||
from apps.billing.models import RechargeOrder
|
||||
from apps.billing.payment_gateways import (
|
||||
PaymentOrderCreateError,
|
||||
@@ -117,6 +118,14 @@ class BalanceView(ExternalApiView):
|
||||
)
|
||||
|
||||
|
||||
class ModelsView(ExternalApiView):
|
||||
def get(self, request):
|
||||
return Response(
|
||||
{"models": get_public_model_catalog()},
|
||||
status=status.HTTP_200_OK,
|
||||
)
|
||||
|
||||
|
||||
class PortalSessionApiView(APIView):
|
||||
authentication_classes = (SessionAuthentication,)
|
||||
permission_classes = (IsAuthenticated,)
|
||||
|
||||
Reference in New Issue
Block a user