mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-09-05 08:10:39 +00:00
Add API-backend imagegen test workflow for sandbox.env e2e testing
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
9a823447fa
commit
6ea5cc8f38
2 changed files with 20 additions and 0 deletions
11
tmp/imagegen-api.dot
Normal file
11
tmp/imagegen-api.dot
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
digraph ImageGen {
|
||||
graph [goal="A cute robot painting a landscape"]
|
||||
rankdir=LR
|
||||
|
||||
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"]
|
||||
|
||||
start -> generate -> exit
|
||||
}
|
||||
9
tmp/imagegen-api.toml
Normal file
9
tmp/imagegen-api.toml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
version = 1
|
||||
goal = "A cute robot painting a landscape"
|
||||
graph = "imagegen-api.dot"
|
||||
|
||||
[sandbox]
|
||||
provider = "daytona"
|
||||
|
||||
[sandbox.env]
|
||||
GEMINI_API_KEY = "${env.GEMINI_API_KEY}"
|
||||
Loading…
Add table
Reference in a new issue