Ai

interface Ai

Gateway to AI functionality in the context of an operation. This includes both LLM and embedding models.

Functions

Link copied to clipboard
abstract fun rag(): RagService

Return the RagService

Link copied to clipboard

Get a configurable PromptRunner for this context using automatic model selection criteria. This may consider prompt and tools, so is not the same as default.

Link copied to clipboard
open fun withDefaultEmbeddingModel(): <Error class: unknown class>
Link copied to clipboard

Get a configurable PromptRunner for this context using the default model selection criteria.

Link copied to clipboard
abstract fun withEmbeddingModel(criteria: <Error class: unknown class>): <Error class: unknown class>

Return an embedding model matching the given criteria.

open fun withEmbeddingModel(model: String): <Error class: unknown class>

Return an embedding model with the given name

Link copied to clipboard
Link copied to clipboard
abstract fun withLlm(llm: <Error class: unknown class>): PromptRunner

Get a configurable PromptRunner for this context using the given LLM. Allows full control over LLM options.

open fun withLlm(model: String): PromptRunner

Get a configurable PromptRunner for this context choosing the given model by name and the default LLM options. Does not allow for any other LLM options to be set.

Link copied to clipboard

Get a configurable PromptRunner for this context choosing the given model by role and the default LLM options. Does not allow for any other LLM options to be set. Users must configure roles, for example in application.properties.