mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-09-07 08:27:12 +00:00
Fix imagegen-api.dot to avoid double variable expansion
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
6ea5cc8f38
commit
3eb15dab4e
1 changed files with 1 additions and 1 deletions
|
|
@ -5,7 +5,7 @@ digraph ImageGen {
|
|||
start [shape=Mdiamond, label="Start"]
|
||||
exit [shape=Msquare, label="Exit"]
|
||||
|
||||
generate [label="Generate Image", prompt="Generate an image of: $goal\n\nUse the shell tool to call the Gemini image generation API.\nThe GEMINI_API_KEY env var is already set in your environment.\n\nRun this curl command (substituting $$GEMINI_API_KEY from env):\n\ncurl -s --fail-with-body -X POST \"https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash-image:generateContent?key=$$GEMINI_API_KEY\" -H 'Content-Type: application/json' -d '{\"contents\": [{\"parts\": [{\"text\": \"A cute robot painting a landscape\"}]}], \"generationConfig\": {\"responseModalities\": [\"TEXT\", \"IMAGE\"]}}' | jq -r '.candidates[0].content.parts[] | select(.inlineData) | .inlineData.data' | head -1 | base64 -d > generated.png\n\nThen verify the file was created with ls -la generated.png"]
|
||||
generate [label="Generate Image", prompt="Generate an image of: $goal\n\nUse the shell tool to call the Gemini image generation API.\nThe GEMINI_API_KEY env var is already set in your environment.\n\nSteps:\n1. Use the shell tool to run: echo GEMINI_API_KEY is set: ${#GEMINI_API_KEY} chars\n2. Then run a curl command to POST to https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash-image:generateContent with the API key as query param.\n Pass JSON body with contents/parts/text for the prompt and generationConfig with responseModalities TEXT and IMAGE.\n3. Extract base64 image data from response using jq, decode with base64 -d, save to generated.png\n4. Verify with ls -la generated.png"]
|
||||
|
||||
start -> generate -> exit
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue