Process Context
data class ProcessContext(val processOptions: ProcessOptions = ProcessOptions(), platformServices: PlatformServices, val outputChannel: OutputChannel = platformServices.outputChannel, val agentProcess: AgentProcess) : LlmOperations, AgenticEventListener
Process state and services. Created by the platform, not user code.
Constructors
Link copied to clipboard
constructor(processOptions: ProcessOptions = ProcessOptions(), platformServices: PlatformServices, outputChannel: OutputChannel = platformServices.outputChannel, agentProcess: AgentProcess)
Properties
Functions
Link copied to clipboard
open override 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
open override 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 override fun <O> doTransform(prompt: String, interaction: LlmInteraction, outputClass: Class<O>, llmRequestEvent: LlmRequestEvent<O>?): O
Low level transform, not necessarily aware of platform
open override fun <O> doTransform(messages: List<Message>, interaction: LlmInteraction, outputClass: Class<O>, llmRequestEvent: LlmRequestEvent<O>?): O
Respond in a conversation
Link copied to clipboard
open override fun generate(prompt: String, interaction: LlmInteraction, agentProcess: AgentProcess, action: Action?): String
Generate text in the context of an AgentProcess.
Link copied to clipboard
An event relating to the platform or leading to the creation of an AgentProcess, such as the choice of a goal. No process is available at this point.
Link copied to clipboard
Listen to an event during the execution of an AgentProcess