Describe the bug
I have an agent I can chat with that will generate an image. In Griptape 0.31 it would save images with a file extension. Now, it generates the images but no longer includes the extension.
import os
from dotenv import load_dotenv
from griptape.drivers import OpenAiImageGenerationDriver
from griptape.engines import PromptImageGenerationEngine
from griptape.structures import Agent
from griptape.tools import PromptImageGenerationTool
load_dotenv()
API_KEY = os.getenv("OPENAI_API_KEY")
# Create an image generation engine with the Leonardo API
engine = PromptImageGenerationEngine(
image_generation_driver=OpenAiImageGenerationDriver(
model="dall-e-3", type="png", api_key=API_KEY
)
)
# Create an image tool to give the agent
image_tool = PromptImageGenerationTool(
engine=engine, output_dir="images", off_prompt=True, type="png"
)
# Create the agent with the image tool, andd File manager so it can save images
agent = Agent(
tools=[
image_tool,
],
stream=True,
)
agent.run("a pic of a cat")
this now saves a file in images as afd1a1eaf72a4c1f9855f63c7e5ba557. If I add .png to the end of the file, I can see it's an image... but Griptape no longer uses the image extension.
Describe the bug I have an agent I can chat with that will generate an image. In Griptape 0.31 it would save images with a file extension. Now, it generates the images but no longer includes the extension.
this now saves a file in
images
asafd1a1eaf72a4c1f9855f63c7e5ba557
. If I add.png
to the end of the file, I can see it's an image... but Griptape no longer uses the image extension.