Skip to content

Latest commit

 

History

History
41 lines (32 loc) · 2.75 KB

dev.md

File metadata and controls

41 lines (32 loc) · 2.75 KB

Halo AI Foundation SDK Core: Single-page reference

简体中文 | English

This single-page reference provides a compact map of SDK Core. The task-oriented guides contain the maintained examples and the public API index contains every public Java type.

Integration contract

  1. Add run.halo.aifoundation:api as compileOnly.
  2. Declare ai-foundation in plugin.yaml.
  3. Resolve AiModelService through ExtensionGetter.
  4. Store AiModel.metadata.name.
  5. Keep Reactor request paths non-blocking.

Capability map

Capability Guide
Text, messages, media, reasoning, streaming, result metadata Generating text
Objects, arrays, choices, partial and final validation Structured output
Server and external tools, steps, approval, repair, input deltas Tools
Embedding batches, similarity, reranking, RAG middleware, sources Embeddings, reranking, and RAG
Text-to-image, image editing, masks, middleware, generated files Image generation
Middleware, lifecycle, cancellation, timeout, retry Middleware and lifecycle
Resolution, provider, capability, media, timeout, and output errors Error handling
UI Message validation, conversion, streaming, and persistence UI Message Stream
Exact types and grouped responsibilities Public API index

Core rules

  • Use either prompt or messages, with optional system.
  • Preserve responseMessages for continued context and tool loops.
  • Treat every StreamTextResult projection as one underlying request.
  • Continue every assistant tool call with exactly one result, error, or approval decision.
  • Treat capability data, warnings, and provider metadata as runtime data.
  • Keep authorization, persistence, vector storage, file lifecycle, and business policy in the consumer plugin.

See the complete plugin integration example.