Llm Operations
interface LlmOperations
Wraps LLM operations. All user-initiated LLM operations go through this, allowing the AgentPlatform to mediate them. This interface is not directly for use in user code. Prefer PromptRunner An LlmOperations implementation is responsible for resolving all relevant tool callbacks for the current AgentProcess (in addition to those passed in directly), and emitting events.
See also
Inheritors
Functions
Link copied to clipboard
abstract fun <O> createObject(messages: List<Message>, interaction: LlmInteraction, outputClass: Class<O>, agentProcess: AgentProcess, action: Action?): O
Create an output object, in the context of an AgentProcess.
Link copied to clipboard
abstract fun <O> createObjectIfPossible(prompt: String, interaction: LlmInteraction, outputClass: Class<O>, agentProcess: AgentProcess, action: Action?): <Error class: unknown class><O>
Try to create an output object in the context of an AgentProcess. Return a failure result if the LLM does not have enough information to create the object.
Link copied to clipboard
open fun <O> doTransform(prompt: String, interaction: LlmInteraction, outputClass: Class<O>, llmRequestEvent: LlmRequestEvent<O>?): O
Low level transform, not necessarily aware of platform
abstract fun <O> doTransform(messages: List<Message>, interaction: LlmInteraction, outputClass: Class<O>, llmRequestEvent: LlmRequestEvent<O>?): O
Respond in a conversation
Link copied to clipboard
abstract fun generate(prompt: String, interaction: LlmInteraction, agentProcess: AgentProcess, action: Action?): String
Generate text in the context of an AgentProcess.