Skip to content

Latest commit

 

History

History
42 lines (33 loc) · 2.25 KB

README.md

File metadata and controls

42 lines (33 loc) · 2.25 KB

SDK Core

简体中文 | English

SDK Core is the provider-neutral Java API published as run.halo.aifoundation:api. Consumer plugins depend on this module; Halo administrators choose providers, models, capabilities, and parameter mappings.

modelName always means AiModel.metadata.name, not a provider type or provider-side model ID.

Guides

  1. Getting started
  2. Generating and streaming text
  3. Structured output
  4. Tools and multi-step generation
  5. Embeddings, reranking, and RAG
  6. Image generation
  7. Middleware, step control, and lifecycle
  8. Error handling
  9. Complete public API index

Entry points

Need Main types
Resolve a model AiModelService
Generate text LanguageModel, GenerateTextRequest, GenerateTextResult
Stream text StreamTextResult, TextStreamPart
Structured output OutputSpec, JsonSchema, StructuredSchema
Tools ToolDefinition, ToolChoice, StopCondition, PreparedStep
Embeddings EmbeddingModel, EmbeddingRequest, EmbeddingUtils
Reranking and RAG RerankingModel, RagMiddlewares, RagMiddlewareOptions
Images ImageGenerationModel, GenerateImageRequest, GeneratedFile
Request control CancellationSource, GenerationTimeouts, lifecycle APIs
Browser stream bridge UIMessageChatHandlers, UIMessageStreamResponse

The API is reactive: completed values normally use Mono<T> and event streams use Flux<T>. Preserve responseMessages when continuing a conversation or tool loop, and treat model capabilities and warnings as runtime data.

Return to the developer documentation.