AI-Prompt-Provider-Modul
Das AI-Prompt-Provider-Modul wurde entwickelt, um die Erstellung von Prompts für benutzerdefinierte und nativ unterstützte AI-Anbieter zu vereinfachen. Durch die Integration dieses Moduls in deine App kannst du externe Auto-Übersetzungs- und Assist-Prompts erstellen, die verschiedene Arten von Kontextinformationen aus deinen Crowdin-Projekten nutzen. Mit dem Modul kannst du Prompts extern zusammenstellen und sicherstellen, dass sie ohne weitere Änderungen zur Ausführung durch den AI-Anbieter bereit sind. Dieser Ansatz ist besonders hilfreich für Nutzer mit fein abgestimmten Modellen, die bestimmte Prompt-Strukturen benötigen, die von den in Crowdin generierten Strukturen abweichen. So wird eine nahtlose Integration und optimale Leistung ermöglicht.
Du kannst Zugriff auf dieses Modul für eine der folgenden Benutzerkategorien gewähren:
Für Crowdin:
- Nur ich (also der Projektinhaber)
- Alle Projektmitglieder
- Ausgewählte Benutzer
Für Crowdin Enterprise:
- Nur Organisationsadministratoren
- Alle Benutzer in den Projekten der Organisation
- Ausgewählte Benutzer
{ "modules": { "ai-prompt-provider": [ { "key": "ai-prompt-provider", "name": "AI prompt provider", "logo": "/logo.png", "configuratorUrl": "/configurator", "compileUrl": "/compile", "environments": [ "crowdin", "crowdin-enterprise" ] } ] }}key | Typ: Erforderlich: ja Beschreibung: Kennung des Moduls innerhalb der Crowdin-App. |
name | Typ: Erforderlich: ja Beschreibung: Der für Menschen lesbare Name des Moduls. |
logo | Typ: Erforderlich: ja Beschreibung: Die relative URL zum Logo der benutzerdefinierten KI, das in der Crowdin-Benutzeroberfläche angezeigt wird. |
configuratorUrl | Typ: Erforderlich: nein Beschreibung: Die relative URL für ein iframe, das eine Reihe von Optionen bereitstellt, die im Prompt gespeichert und dem AI-Anbieter zur Verfügung gestellt werden. |
compileUrl | Typ: Erforderlich: ja Beschreibung: Die relative URL des API-Endpunkts, der zum Zusammenstellen des Prompts verwendet wird. |
environments | Typ: Zulässige Werte: Beschreibung: Menge der Umgebungen, in denen ein Modul installiert werden kann. |
Kommunikation zwischen der AI-Prompt-Provider-App und Crowdin
Abschnitt betitelt „Kommunikation zwischen der AI-Prompt-Provider-App und Crowdin“Das System sammelt die zu übersetzenden Strings zusammen mit dem gesamten zugehörigen Kontext und sendet diese Daten an die AI-Prompt-Provider-App. Die App verarbeitet die Daten und erstellt mithilfe von compileUrl einen für ein bestimmtes AI-Modell und dessen Anforderungen optimierten Prompt. Der zusammengestellte Prompt wird anschließend an Crowdin zurückgegeben und an den ausgewählten AI-Anbieter gesendet.
Anfrage von Crowdin an die App für die Assist-Aktion
Abschnitt betitelt „Anfrage von Crowdin an die App für die Assist-Aktion“Beispiel für die Nutzlast der Anfrage:
{ "action": "assist", "provider": "open_ai", "model": "gpt-4o", "limitation": { "contextWindow": 128000, "output": 4096 }, "options": null, "payload": { "project": { "id": 748586,61 ausgeblendete Zeilen
"type": 0, "sourceLanguage": { "id": "en", "name": "English", "twoLettersCode": "en", "threeLettersCode": "eng", "locale": "en-US", "pluralCategoryNames": [ "one", "other" ], "pluralRules": "(n != 1)", "pluralExamples": [ "1", "0, 2-999; 1.2, 2.07..." ], "textDirection": "ltr", "dialectOf": null }, "targetLanguages": [ { "id": "de", "name": "German", "twoLettersCode": "de", "threeLettersCode": "deu", "locale": "de-DE", "pluralCategoryNames": [ "one", "other" ], "pluralRules": "(n != 1)", "pluralExamples": [ "1", "0, 2-999; 1.2, 2.07..." ], "textDirection": "ltr", "dialectOf": null }, { "id": "uk", "name": "Ukrainian", "twoLettersCode": "uk", "threeLettersCode": "ukr", "locale": "uk-UA", "pluralCategoryNames": [ "one", "few", "many", "other" ], "pluralRules": "((n%10==1 && n%100!=11) ? 0 : ((n%10 >= 2 && n%10 <=4 && (n%100 < 12 || n%100 > 14)) ? 1 : ((n%10 == 0 || (n%10 >= 5 && n%10 <=9)) || (n%100 >= 11 && n%100 <= 14)) ? 2 : 3))", "pluralExamples": [ "1, 21, 31, 41, 51, 61, 71, 81...", "2-4, 22-24, 32-34, 42-44, 52-54, 62...", "0, 5-19, 100, 1000, 10000...", "0.0-0.9, 1.1-1.6, 10.0, 100.0..." ], "textDirection": "ltr", "dialectOf": null } ], "name": "Umbrella Android", "description": "Localization project for Umbrella Android" }, "sourceLanguage": { "id": "en", "name": "English",14 ausgeblendete Zeilen
"twoLettersCode": "en", "threeLettersCode": "eng", "locale": "en-US", "pluralCategoryNames": [ "one", "other" ], "pluralRules": "(n != 1)", "pluralExamples": [ "1", "0, 2-999; 1.2, 2.07..." ], "textDirection": "ltr", "dialectOf": null }, "targetLanguage": { "id": "de", "name": "German",14 ausgeblendete Zeilen
"twoLettersCode": "de", "threeLettersCode": "deu", "locale": "de-DE", "pluralCategoryNames": [ "one", "other" ], "pluralRules": "(n != 1)", "pluralExamples": [ "1", "0, 2-999; 1.2, 2.07..." ], "textDirection": "ltr", "dialectOf": null }, "strings": [ { "id": 5511717, "text": "Welcome!", "key": "welcome", "context": "welcome", "maxLength": null, "pluralForm": null } ], "siblingsStrings": { "previous": null, "next": { "id": 5511718, "text": "Save as...", "key": "save_as", "context": "save_as", "maxLength": null } }, "filteredStrings": [ { "id": 5511717, "text": "Welcome!", "key": "welcome", "context": "welcome", "maxLength": null }, { "id": 5511718, "text": "Save as...", "key": "save_as", "context": "save_as", "maxLength": null }, { "id": 5511719, "text": "View", "key": "view", "context": "view", "maxLength": null } ], "tmSuggestions": [ { "tmId": 736613, "phraseId": 316642, "source": { "text": "Welcome!" }, "target": { "text": "Willkommen!" }, "relevant": 100, "updatedAt": "2024-05-17T09:09:32+00:00" } ], "terms": [ { "glossaryId": 728017, "conceptId": 211993, "source": { "id": 357901, "userId": 13575027, "languageId": "en", "text": "Welcome", "description": null, "partOfSpeech": "PROPN", "status": null, "type": null, "gender": null, "note": null, "url": null, "lemma": "welcome", "createdAt": "2024-06-21T07:44:26+00:00", "updatedAt": "2024-06-21T07:44:26+00:00" }, "target": { "id": 357902, "userId": 13575027, "languageId": "de", "text": "Willkommen", "description": null, "partOfSpeech": "PROPN", "status": null, "type": null, "gender": null, "note": null, "url": null, "lemma": "willkommen", "createdAt": "2024-06-21T07:44:26+00:00", "updatedAt": "2024-06-21T07:44:26+00:00" } } ], "file": { "id": 4549, "name": "crowdin_sample_android.xml", "title": null, "context": "File context", "type": "android", "path": "/crowdin_sample_android.xml" } }}Anfrage von Crowdin an die App für die Auto-Übersetzungsaktion
Abschnitt betitelt „Anfrage von Crowdin an die App für die Auto-Übersetzungsaktion“Beispiel für die Nutzlast der Anfrage:
{ "action": "pre_translate", "provider": "open_ai", "model": "gpt-4o", "limitation": { "contextWindow": 128000, "output": 4096 }, "options": null, "payload": { "project": { "id": 748586,61 ausgeblendete Zeilen
"type": 0, "sourceLanguage": { "id": "en", "name": "English", "twoLettersCode": "en", "threeLettersCode": "eng", "locale": "en-US", "pluralCategoryNames": [ "one", "other" ], "pluralRules": "(n != 1)", "pluralExamples": [ "1", "0, 2-999; 1.2, 2.07..." ], "textDirection": "ltr", "dialectOf": null }, "targetLanguages": [ { "id": "de", "name": "German", "twoLettersCode": "de", "threeLettersCode": "deu", "locale": "de-DE", "pluralCategoryNames": [ "one", "other" ], "pluralRules": "(n != 1)", "pluralExamples": [ "1", "0, 2-999; 1.2, 2.07..." ], "textDirection": "ltr", "dialectOf": null }, { "id": "uk", "name": "Ukrainian", "twoLettersCode": "uk", "threeLettersCode": "ukr", "locale": "uk-UA", "pluralCategoryNames": [ "one", "few", "many", "other" ], "pluralRules": "((n%10==1 && n%100!=11) ? 0 : ((n%10 >= 2 && n%10 <=4 && (n%100 < 12 || n%100 > 14)) ? 1 : ((n%10 == 0 || (n%10 >= 5 && n%10 <=9)) || (n%100 >= 11 && n%100 <= 14)) ? 2 : 3))", "pluralExamples": [ "1, 21, 31, 41, 51, 61, 71, 81...", "2-4, 22-24, 32-34, 42-44, 52-54, 62...", "0, 5-19, 100, 1000, 10000...", "0.0-0.9, 1.1-1.6, 10.0, 100.0..." ], "textDirection": "ltr", "dialectOf": null } ], "name": "Umbrella Android", "description": "Localization project for Umbrella Android" }, "sourceLanguage": { "id": "en", "name": "English",14 ausgeblendete Zeilen
"twoLettersCode": "en", "threeLettersCode": "eng", "locale": "en-US", "pluralCategoryNames": [ "one", "other" ], "pluralRules": "(n != 1)", "pluralExamples": [ "1", "0, 2-999; 1.2, 2.07..." ], "textDirection": "ltr", "dialectOf": null }, "targetLanguage": { "id": "de", "name": "German",14 ausgeblendete Zeilen
"twoLettersCode": "de", "threeLettersCode": "deu", "locale": "de-DE", "pluralCategoryNames": [ "one", "other" ], "pluralRules": "(n != 1)", "pluralExamples": [ "1", "0, 2-999; 1.2, 2.07..." ], "textDirection": "ltr", "dialectOf": null }, "strings": [ { "id": 5511717, "text": "Welcome!", "key": "welcome", "context": "welcome", "maxLength": null, "pluralForm": null }, { "id": 5511718, "text": "Save as...", "key": "save_as", "context": "save_as", "maxLength": null, "pluralForm": null }, { "id": 5511719, "text": "View", "key": "view", "context": "view", "maxLength": null, "pluralForm": null } ], "tmSuggestions": [ { "tmId": 736613, "phraseId": 316642, "source": { "text": "Welcome!" }, "target": { "text": "Willkommen!" }, "relevant": 100, "updatedAt": "2024-05-17T09:09:32+00:00" }, { "tmId": 736613, "phraseId": 316643, "source": { "text": "Save as..." }, "target": { "text": "Speichern unter..." }, "relevant": 100, "updatedAt": "2024-05-17T09:09:59+00:00" } ], "terms": [ { "glossaryId": 728017, "conceptId": 211993, "source": { "id": 357901, "userId": 13575027, "languageId": "en", "text": "Welcome", "description": null, "partOfSpeech": "PROPN", "status": null, "type": null, "gender": null, "note": null, "url": null, "lemma": "welcome", "createdAt": "2024-06-21T07:44:26+00:00", "updatedAt": "2024-06-21T07:44:26+00:00" }, "target": { "id": 357902, "userId": 13575027, "languageId": "de", "text": "Willkommen", "description": null, "partOfSpeech": "PROPN", "status": null, "type": null, "gender": null, "note": null, "url": null, "lemma": "willkommen", "createdAt": "2024-06-21T07:44:26+00:00", "updatedAt": "2024-06-21T07:44:26+00:00" } }, { "glossaryId": 728017, "conceptId": 211992, "source": { "id": 357899, "userId": 13575027, "languageId": "en", "text": "Save", "description": null, "partOfSpeech": "PROPN", "status": "PREFERRED", "type": "FULL_FORM", "gender": "OTHER", "note": null, "url": null, "lemma": "save", "createdAt": "2024-05-17T09:12:36+00:00", "updatedAt": "2024-05-17T09:12:36+00:00" }, "target": null } ], "file": { "id": 4549, "name": "crowdin_sample_android.xml", "title": null, "context": "File context", "type": "android", "path": "/crowdin_sample_android.xml", "contentUrl": "https://crowdin-importer.s3.eu-central-1.amazonaws.com/72057531/748586/3407.xml?response-content-disposition=attachment%3B%20filename%3D%22crowdin_sample_android.xml%22&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential={aws-access-key-id}%2F20240621%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20240621T080230Z&X-Amz-SignedHeaders=host&X-Amz-Expires=900&X-Amz-Signature={signature}" } }}Anfrage von Crowdin an die App für die Alignment-Aktion
Abschnitt betitelt „Anfrage von Crowdin an die App für die Alignment-Aktion“Beispiel für die Nutzlast der Anfrage:
{ "action": "alignment", "provider": "open_ai", "model": "gpt-4o", "limitation": { "contextWindow": 128000, "output": 4096 }, "options": null, "payload": { "project": { "id": 748586,61 ausgeblendete Zeilen
"type": 0, "sourceLanguage": { "id": "en", "name": "English", "twoLettersCode": "en", "threeLettersCode": "eng", "locale": "en-US", "pluralCategoryNames": [ "one", "other" ], "pluralRules": "(n != 1)", "pluralExamples": [ "1", "0, 2-999; 1.2, 2.07..." ], "textDirection": "ltr", "dialectOf": null }, "targetLanguages": [ { "id": "de", "name": "German", "twoLettersCode": "de", "threeLettersCode": "deu", "locale": "de-DE", "pluralCategoryNames": [ "one", "other" ], "pluralRules": "(n != 1)", "pluralExamples": [ "1", "0, 2-999; 1.2, 2.07..." ], "textDirection": "ltr", "dialectOf": null }, { "id": "uk", "name": "Ukrainian", "twoLettersCode": "uk", "threeLettersCode": "ukr", "locale": "uk-UA", "pluralCategoryNames": [ "one", "few", "many", "other" ], "pluralRules": "((n%10==1 && n%100!=11) ? 0 : ((n%10 >= 2 && n%10 <=4 && (n%100 < 12 || n%100 > 14)) ? 1 : ((n%10 == 0 || (n%10 >= 5 && n%10 <=9)) || (n%100 >= 11 && n%100 <= 14)) ? 2 : 3))", "pluralExamples": [ "1, 21, 31, 41, 51, 61, 71, 81...", "2-4, 22-24, 32-34, 42-44, 52-54, 62...", "0, 5-19, 100, 1000, 10000...", "0.0-0.9, 1.1-1.6, 10.0, 100.0..." ], "textDirection": "ltr", "dialectOf": null } ], "name": "Umbrella Android", "description": "Localization project for Umbrella Android" }, "sourceLanguage": { "id": "en", "name": "English",14 ausgeblendete Zeilen
"twoLettersCode": "en", "threeLettersCode": "eng", "locale": "en-US", "pluralCategoryNames": [ "one", "other" ], "pluralRules": "(n != 1)", "pluralExamples": [ "1", "0, 2-999; 1.2, 2.07..." ], "textDirection": "ltr", "dialectOf": null }, "targetLanguage": { "id": "de", "name": "German",14 ausgeblendete Zeilen
"twoLettersCode": "de", "threeLettersCode": "deu", "locale": "de-DE", "pluralCategoryNames": [ "one", "other" ], "pluralRules": "(n != 1)", "pluralExamples": [ "1", "0, 2-999; 1.2, 2.07..." ], "textDirection": "ltr", "dialectOf": null }, "alignmentPairs": [ { "id": "0c92b4f9-6475-4c9e-9fe2-efc76f2917d5", "source": "Your password has been reset successfully!", "translation": "Ihr Passwort wurde erfolgreich zurückgesetzt!" }, { "id": "9e5fa3ab-3629-49ef-868d-09a6ea5f3df9", "source": "Are you sure you want to delete this message?", "translation": "Sind Sie sicher, dass Sie diese Nachricht löschen möchten?" } ] }}Erwartete Antwort der App (reiner Inhalt)
Abschnitt betitelt „Erwartete Antwort der App (reiner Inhalt)“Beispiel für die Nutzlast der Antwort:
{ "data": { "content": "<prompt>" }}Erwartete Antwort der App (Inhaltsteile)
Abschnitt betitelt „Erwartete Antwort der App (Inhaltsteile)“Beispiel für die Nutzlast der Antwort:
{ "data": { "content": [ { "type": "text", "text": "<prompt>" }, { "type": "image", "mimeType": "<mime-type>", "url": "<image-url>" } ] }}Die Struktur der Antworten der App muss den dargestellten Beispielen entsprechen. Andernfalls betrachtet Crowdin sie als ungültig.