简体中文 | 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.
- Add
run.halo.aifoundation:apiascompileOnly. - Declare
ai-foundationinplugin.yaml. - Resolve
AiModelServicethroughExtensionGetter. - Store
AiModel.metadata.name. - Keep Reactor request paths non-blocking.
| 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 |
- Use either
promptormessages, with optionalsystem. - Preserve
responseMessagesfor continued context and tool loops. - Treat every
StreamTextResultprojection 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.