create Object If Possible
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.
Parameters
prompt
User prompt
interaction
Llm options and tool callbacks to use, plus unique identifier
output Class
Class of the output object
agent Process
Agent process we are running within
action
Action we are running within if we are running within an action
Throws
if the LLM returns an object of the wrong type