multimodal_input

command
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2026 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Demonstrates multimodal prompt input via the opencodesdk.QueryContent one-shot helper.

This example shows three entry points:

  1. opencodesdk.QueryContent — one-shot text + image prompt
  2. opencodesdk.ImageFileInput — load an image from disk
  3. opencodesdk.Text / Blocks — ergonomic block constructors

The legacy string-only opencodesdk.Query still works for plain text — QueryContent is only needed when you want to attach images, embedded resources, or other non-text content blocks.

Image support requires the agent to advertise the "image" prompt capability during ACP initialize; opencode advertises it when attached to a multimodal-capable model. If the capability isn't advertised, the SDK rejects image blocks with ErrCapabilityUnavailable before the prompt reaches opencode.

go run ./examples/multimodal_input

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL