BasePublisherModel

abstract class BasePublisherModel(val name: String) : Model

Java-friendly base for implementing a Model. A Java subclass overrides generateContentJava, which returns a Reactive Streams Publisher; this base adapts it to the Flow-returning generateContent contract that Java cannot express. Both the unary and streaming cases flow through the one method, exactly as they do for a Kotlin Model.

Constructors

Link copied to clipboard
constructor(name: String)

Properties

Link copied to clipboard
override val name: String

The name of the model.

Functions

Link copied to clipboard
override fun generateContent(request: LlmRequest, stream: Boolean = false): ERROR CLASS: Symbol not found for Flow<com/google/adk/kt/models/LlmResponse>

Generates content for the given LlmRequest. This returns a Flow of LlmResponses.