定制 carmelosantana/coqui-toolkit-images 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

carmelosantana/coqui-toolkit-images

Composer 安装命令:

composer require carmelosantana/coqui-toolkit-images

包简介

AI image generation and library management toolkit for Coqui — generate, preview, tag, categorize, and search images across OpenAI and Ollama backends.

README 文档

README

carmelosantana/coqui-toolkit-images adds AI image generation and image-library tools to Coqui.

Features

  • Text-to-image generation with OpenAI (gpt-image-1) and Ollama CLI backends
  • Workspace image library with JSON index at workspace/images/index.json
  • PNG tEXt metadata embedding (prompt, vendor, model, profile, owner, tags, category)
  • Low-fidelity colored block previews via ext-gd (optional)
  • Atomic index writes to prevent corruption
  • Workspace path boundary enforcement
  • Configurable OpenAI timeout

Tools

Tool Description
image_preflight Check readiness before generation (credentials, model availability)
image_generate Generate and save an image
image_preview Render an existing workspace image as a low-fidelity REPL preview
image_library List, search, get, tag, delete, and inspect saved images
image_config Inspect the resolved image toolkit configuration

REPL Commands

When used with Coqui core, the /image slash command provides:

/image generate <prompt> [--model=vendor/model] [--vendor=openai|ollama] [--tags=a,b] [--category=name]
/image preview <path> [--width=60]
/image list [--profile=name] [--vendor=openai|ollama]
/image search <query> [--category=name]
/image get <record-id>
/image tag <record-id> <tag1,tag2> [--category=name]
/image delete <record-id>
/image config

Configuration

The toolkit resolves its defaults from Coqui context when available, then environment variables:

Variable Purpose
COQUI_IMAGE_MODEL Fallback image model in vendor/model format
OPENAI_API_KEY Required for OpenAI image generation
OLLAMA_HOST Optional local Ollama host hint
COQUI_WORKSPACE Fallback workspace path when no Coqui context is provided
COQUI_ACTIVE_PROFILE Fallback active profile name when no Coqui context is provided

OpenAI vendor settings (via openclaw.json agents.defaults.imageConfig.vendors.openai):

  • apiKey — API key override
  • baseUrl — API base URL override
  • timeout — HTTP request timeout in seconds (default: 240)

Fallback model resolution: if no model is configured, the toolkit infers one — preferring openai/gpt-image-1 when OPENAI_API_KEY is set, or ollama/gemma3 when the Ollama CLI is available.

Default output path:

workspace/images/{profile-name}/{file-hint}-{timestamp}.png

Generated-image responses and image_preview both emit ANSI-colored block previews using the brightness ramp ░ ░ ▒ ▓ █, so the REPL can show a low-resolution impression of the image without opening an external viewer.

Development

composer install
composer test
composer analyse

统计信息

  • 总下载量: 322
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-04-20

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固