Interface Ai
-
- All Implemented Interfaces:
public interface AiGateway to AI functionality in the context of an operation. This includes both LLM and embedding models.
-
-
Method Summary
Modifier and Type Method Description EmbeddingServicewithEmbeddingService(String model)Return an embedding service with the given name abstract EmbeddingServicewithEmbeddingService(ModelSelectionCriteria criteria)Return an embedding service matching the given criteria. EmbeddingServicewithDefaultEmbeddingService()abstract PromptRunnerwithLlm(LlmOptions llm)Get a configurable PromptRunner for this context using the given LLM. PromptRunnerwithLlm(String model)Get a configurable PromptRunner for this context choosing the given model by name and the default LLM options. PromptRunnerwithLlmByRole(String role)Get a configurable PromptRunner for this context choosing the given model by role and the default LLM options. PromptRunnerwithAutoLlm()Get a configurable PromptRunner for this context using automatic model selection criteria. PromptRunnerwithDefaultLlm()Get a configurable PromptRunner for this context using the default model selection criteria. PromptRunnerwithFirstAvailableLlmOf(String llms)-
-
Method Detail
-
withEmbeddingService
EmbeddingService withEmbeddingService(String model)
Return an embedding service with the given name
-
withEmbeddingService
abstract EmbeddingService withEmbeddingService(ModelSelectionCriteria criteria)
Return an embedding service matching the given criteria.
-
withDefaultEmbeddingService
EmbeddingService withDefaultEmbeddingService()
-
withLlm
abstract PromptRunner withLlm(LlmOptions llm)
Get a configurable PromptRunner for this context using the given LLM. Allows full control over LLM options.
-
withLlm
PromptRunner withLlm(String model)
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.
-
withLlmByRole
PromptRunner withLlmByRole(String role)
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.
-
withAutoLlm
PromptRunner withAutoLlm()
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.
-
withDefaultLlm
PromptRunner withDefaultLlm()
Get a configurable PromptRunner for this context using the default model selection criteria.
-
withFirstAvailableLlmOf
PromptRunner withFirstAvailableLlmOf(String llms)
-
-
-
-