createObject

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.

Parameters

messages

messages

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