Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions crowdin_api/api_resources/ai/tests/test_ai_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -1129,6 +1129,38 @@ def test_get_ai_file_translations_path(self, in_params, path, base_absolut_url):
"targetLanguageId": "uk",
},
),
(
AiFileTranslationRequest(
storageId=1,
targetLanguageId="uk",
sourceLanguageId="en",
type="txt",
parserVersion=1,
tmIds=[123],
glossaryIds=[456],
styleGuideIds=[654],
aiPromptId=789,
aiProviderId=12,
aiModelId="gpt-4.1",
instructions=["Keep a formal tone"],
attachmentIds=[123],
),
{
"storageId": 1,
"targetLanguageId": "uk",
"sourceLanguageId": "en",
"type": "txt",
"parserVersion": 1,
"tmIds": [123],
"glossaryIds": [456],
"styleGuideIds": [654],
"aiPromptId": 789,
"aiProviderId": 12,
"aiModelId": "gpt-4.1",
"instructions": ["Keep a formal tone"],
"attachmentIds": [123],
},
),
),
)
@mock.patch("crowdin_api.requester.APIRequester.request")
Expand Down Expand Up @@ -2449,6 +2481,38 @@ def test_get_ai_file_translations_path(self, in_params, path, base_absolut_url):
"targetLanguageId": "uk",
},
),
(
AiFileTranslationRequest(
storageId=1,
targetLanguageId="uk",
sourceLanguageId="en",
type="txt",
parserVersion=1,
tmIds=[123],
glossaryIds=[456],
styleGuideIds=[654],
aiPromptId=789,
aiProviderId=12,
aiModelId="gpt-4.1",
instructions=["Keep a formal tone"],
attachmentIds=[123],
),
{
"storageId": 1,
"targetLanguageId": "uk",
"sourceLanguageId": "en",
"type": "txt",
"parserVersion": 1,
"tmIds": [123],
"glossaryIds": [456],
"styleGuideIds": [654],
"aiPromptId": 789,
"aiProviderId": 12,
"aiModelId": "gpt-4.1",
"instructions": ["Keep a formal tone"],
"attachmentIds": [123],
},
),
),
)
@mock.patch("crowdin_api.requester.APIRequester.request")
Expand Down
1 change: 1 addition & 0 deletions crowdin_api/api_resources/ai/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ class AiFileTranslationRequest(TypedDict):
parserVersion: Optional[int]
tmIds: Optional[Iterable[int]]
glossaryIds: Optional[Iterable[int]]
styleGuideIds: Optional[Iterable[int]]
aiPromptId: Optional[int]
aiProviderId: Optional[int]
aiModelId: Optional[str]
Expand Down
Loading