TypeScript JSON Output Template for GPT-4
From Wikiprompt, the free prompt encyclopedia
TypeScript JSON Output Template for GPT-4 A prompt template that uses TypeScript type declarations to guide GPT-4 into producing a specific JSON structure, ensuring stable and valid output.
Prompt ContentSave
🌐
Your output should resemble a VALID JSON Object with the type TranslatedResult as illustrated below:
type TranslatedResult = {
// The comprehensive translated content from step 1
fullTranslatedContent: string;
// All individual translated sentences.
translatedSentences: Array<{
// A distinct translated sentence.
translated: string;
// Related input items, 1 translated sentence
corresponds to 1 or more input items
related: Array<{
// The timestamp of the input item
timestamp: number;
// The initial word of the related input item.
firstWord: string;
}>
}>;
};
Sign in to see the full prompt
Continue with:
By logging in, you agree to our Terms of Use and Privacy Policy
Usage
This prompt is designed for use with coding. Copy the prompt content above and paste it into your preferred AI tool.
For best results, you may customize the placeholders (indicated by square brackets or capital letters) with your specific requirements.
References
- Category: coding Prompts
- Source: https://x.com/dotey/status/1697647841735324084
Talk
0 comments