Skip to content

Commit

Permalink
feat(ai): support for AI resource (#166)
Browse files Browse the repository at this point in the history
  • Loading branch information
OmAximani0 authored Jul 1, 2024
1 parent 67a979e commit f21813f
Show file tree
Hide file tree
Showing 8 changed files with 1,390 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crowdin_api/api_resources/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from .ai.resource import AIResource, EnterpriseAIResource
from .application.resource import ApplicationResource
from .bundles.resource import BundlesResource
from .dictionaries.resource import DictionariesResource
Expand Down Expand Up @@ -28,6 +29,8 @@
from .workflows.resource import WorkflowsResource

__all__ = [
"AIResource",
"EnterpriseAIResource",
"ApplicationResource",
"BundlesResource",
"DictionariesResource",
Expand Down
1 change: 1 addition & 0 deletions crowdin_api/api_resources/ai/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__pdoc__ = {'tests': False}
39 changes: 39 additions & 0 deletions crowdin_api/api_resources/ai/enums.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
from enum import Enum


class AIPromptAction(Enum):
ASSIST = "assist"
PRE_TRANSLATE = "pre_translate"


class AIPromptOperation(Enum):
REPLACE = "replace"
TEST = "test"


class EditAIPromptPath(Enum):
NAME = "/name"
ACTION = "/action"
AI_PROVIDER_ID = "/aiProviderId"
AI_MODEL_ID = "/aiModelId"
IS_ENABLED = "/isEnabled"
ENABLED_PROJECT_IDS = "/enabledProjectIds"
CONFIG = "/config"


class AIProviderType(Enum):
OPEN_AI = "open_ai"
AZUER_OPEN_AI = "azure_open_ai"
GOOGLE_GEMINI = "google_gemini"
MISTRAL_AI = "mistral_ai"
ANTHROPIC = "anthropic"
CUSTOM_AI = "custom_ai"


class EditAIProviderPath(Enum):
NAME = "/name"
TYPE = "/type"
CREDENTIALS = "/credentials"
CONFIG = "/config"
IS_ENABLED = "/isEnabled"
USE_SYSTEM_CREDENTIALS = "/useSystemCredentials"
Loading

0 comments on commit f21813f

Please sign in to comment.