Skip to content

Commit 337f96e

Browse files
committed
Added dall-e payload instructions
1 parent 2288f3b commit 337f96e

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

docs/examples/dall-e3-generate-image.mdx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ export const generateContent = task({
2929
maxAttempts: 3, // Retry up to 3 times
3030
},
3131
run: async ({ theme, description }: Payload) => {
32-
3332
// Generate text
3433
const textResult = await openai.chat.completions.create({
3534
model: "gpt-4o",
@@ -64,4 +63,15 @@ function generateTextPrompt(theme: string, description: string): any {
6463
function generateImagePrompt(theme: string, description: string): any {
6564
return `Theme: ${theme}\n\nDescription: ${description}`;
6665
}
67-
```
66+
```
67+
68+
## Testing
69+
70+
You can test this task by running it with the following payload:
71+
72+
```json
73+
{
74+
"theme": "A beautiful sunset",
75+
"description": "A sunset over the ocean with a tiny yacht in the distance."
76+
}
77+
```

0 commit comments

Comments
 (0)