createObject

open override fun <O> createObject(prompt: String, interaction: LlmInteraction, outputClass: Class<O>, agentProcess: AgentProcess, action: Action?): O

Create an output object, in the context of an AgentProcess.

Parameters

prompt

Function to generate the prompt from the input object

interaction

Llm options and tool callbacks to use, plus unique identifier

outputClass

Class of the output object

agentProcess

Agent process we are running within

action

Action we are running within if we are running within an action

Throws

InvalidLlmReturnFormatException

if the LLM returns an object of the wrong type