123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- # -*- coding:utf-8 -*-
- from libs.exception import BaseHTTPException
- class AppUnavailableError(BaseHTTPException):
- error_code = 'app_unavailable'
- description = "App unavailable."
- code = 400
- class NotCompletionAppError(BaseHTTPException):
- error_code = 'not_completion_app'
- description = "Not Completion App"
- code = 400
- class NotChatAppError(BaseHTTPException):
- error_code = 'not_chat_app'
- description = "Not Chat App"
- code = 400
- class ConversationCompletedError(BaseHTTPException):
- error_code = 'conversation_completed'
- description = "Conversation Completed."
- code = 400
- class ProviderNotInitializeError(BaseHTTPException):
- error_code = 'provider_not_initialize'
- description = "Provider Token not initialize."
- code = 400
- class ProviderQuotaExceededError(BaseHTTPException):
- error_code = 'provider_quota_exceeded'
- description = "Provider quota exceeded."
- code = 400
- class ProviderModelCurrentlyNotSupportError(BaseHTTPException):
- error_code = 'model_currently_not_support'
- description = "GPT-4 currently not support."
- code = 400
- class CompletionRequestError(BaseHTTPException):
- error_code = 'completion_request_error'
- description = "Completion request failed."
- code = 400
|