diff --git a/src/ai/index.ts b/src/ai/index.ts index 767f411a9..b1c6e5b5e 100644 --- a/src/ai/index.ts +++ b/src/ai/index.ts @@ -856,7 +856,8 @@ export namespace AiModel { export interface GenerateAiPromptCompletionRequest { resources: | AiModel.AiPromptResourceWithPreTranslate - | AiModel.AiPromptResourceWithPreTranslate + | AiModel.AiPromptResourceWithAssist + | AiModel.AiPromptResourceWithAlignment | AiModel.AiPromptResourceWithCustom; tools?: { tool: { @@ -879,6 +880,14 @@ export namespace AiModel { projectId: number; targetLanguageId: string; stringIds: number[]; + overridePromptValues?: OverridePromptValues; + } + + export interface AiPromptResourceWithAlignment { + projectId: number; + targetLanguageId: string; + stringIds: number[]; + overridePromptValues?: OverridePromptValues; } export interface AiPromptResourceWithAssist { @@ -886,12 +895,18 @@ export namespace AiModel { targetLanguageId: string; stringIds: number[]; filteredStringsIds?: number[]; + overridePromptValues?: OverridePromptValues; } export interface AiPromptResourceWithCustom { projectId: number; targetLanguageId: string; stringIds: number[]; + overridePromptValues?: OverridePromptValues; + } + + export interface OverridePromptValues { + [key: string]: any; } /* ai Prompts Section END*/ diff --git a/tests/ai/api.test.ts b/tests/ai/api.test.ts index 7cb02e536..18a4ca53c 100644 --- a/tests/ai/api.test.ts +++ b/tests/ai/api.test.ts @@ -32,6 +32,13 @@ describe('AI API', () => { projectId, targetLanguageId: 'uk', stringIds: [1], + filteredStringsIds: [1], + overridePromptValues: { + sourceLanguage: 'English', + targetLanguage: 'Ukrainian', + fileContext: 'N/A', + siblingsStrings: 'N/A', + }, }, }; const type = 'open_ai';