From 7534c6bdf37490a36cdfe71eb0e644e52b1fe17d Mon Sep 17 00:00:00 2001 From: imbytecat Date: Sat, 21 Mar 2026 14:07:48 +0800 Subject: [PATCH] Update README for batch jobs workflow --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 6aa4c17..a4e87a1 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ cp .env.example .env To run: ```bash -bun run src/index.ts "A tiny banana robot exploring a neon greenhouse" +bun run src/index.ts ``` What it does: @@ -23,8 +23,10 @@ What it does: - Reads `FLOW2API_BASE_URL`, `FLOW2API_API_KEY`, and `FLOW2API_MODEL` from `.env` - Accepts either a root endpoint or a `/v1` endpoint and normalizes root URLs to the OpenAI-compatible `/v1` base URL automatically - Also accepts older `GEMINI_MODEL` and `OPENAI_MODEL` env names for compatibility -- Uses AI SDK's `streamText` for streaming text, then downloads the generated image from the streamed Markdown image link -- Saves the generated image into `images/` with a timestamp-based filename +- Reads batch jobs from `src/jobs.ts`, where each item can define `name`, `prompt`, `images`, and `enabled` +- Treats relative `images` entries in each job as files under the local `images/` directory +- Sends `prompt` plus any local input images through AI SDK's `streamText`, then downloads the generated image from the streamed Markdown image link +- Saves each generated image into `output/` with a job-based timestamp filename - Keeps runtime code under `src/` and uses the `@/*` TypeScript alias for internal imports This project was created using `bun init` in bun v1.3.11. [Bun](https://bun.com) is a fast all-in-one JavaScript runtime.