Menu

Post image 1
Post image 2
Post image 3
1 / 3
0

How I Added Multi-Turn Image Generation Support to LlamaIndex

DEV Community·Neha Prasad·18 days ago
#c0LAmTXs
Reading 0:00
15s threshold

The agent could generate an image once, but when you asked it to modify or create variations - it had no idea what image you were talking about. The conversation had no memory of the previous image. That broke a lot of interesting multi-turn creative workflows. Context While contributing to LlamaIndexTS (the TypeScript version of LlamaIndex), I noticed that image generation tools only worked for single-turn interactions. There was no clean way to reference a previously generated image in follow-up messages. This was especially painful when building agents that iterate on visuals - like creating logos, editing images, or generating multiple versions. The Investigation I started by reproducing the issue. The tool was calling OpenAI’s image generation API correctly the first time, but the response didn’t preserve any identifier for the generated image. Later messages had no context about which image to modify.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More