Class DummyObjectCreatingLlmOperations
-
- All Implemented Interfaces:
-
com.embabel.agent.spi.LlmOperations
public class DummyObjectCreatingLlmOperations extends DummyInstanceCreator implements LlmOperations
Fake LLM transformer that generates valid classes with random strings.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classDummyObjectCreatingLlmOperations.Companion
-
Field Summary
Fields Modifier and Type Field Description public final static DummyObjectCreatingLlmOperations.CompanionCompanion
-
Constructor Summary
Constructors Constructor Description DummyObjectCreatingLlmOperations(List<String> stringsToUse)
-
Method Summary
Modifier and Type Method Description <O extends Any> OdoTransform(List<Message> messages, LlmInteraction interaction, Class<O> outputClass, LlmRequestEvent<O> llmRequestEvent)Low level transform, not necessarily aware of platform <O extends Any> Result<O>createObjectIfPossible(List<Message> messages, LlmInteraction interaction, Class<O> outputClass, AgentProcess agentProcess, Action action)Try to create an output object in the context of an AgentProcess. <O extends Any> OcreateObject(List<Message> messages, LlmInteraction interaction, Class<O> outputClass, AgentProcess agentProcess, Action action)Create an output object, in the context of an AgentProcess. -
Methods inherited from class com.embabel.agent.spi.LlmOperations
doTransform, generate -
Methods inherited from class com.embabel.common.util.DummyInstanceCreator
createDummyInstance -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
doTransform
<O extends Any> O doTransform(List<Message> messages, LlmInteraction interaction, Class<O> outputClass, LlmRequestEvent<O> llmRequestEvent)
Low level transform, not necessarily aware of platform
- Parameters:
messages- messagesinteraction- The LLM call optionsoutputClass- Class of the output objectllmRequestEvent- Event already published for this request if one has been
-
createObjectIfPossible
<O extends Any> Result<O> createObjectIfPossible(List<Message> messages, LlmInteraction interaction, Class<O> outputClass, AgentProcess agentProcess, Action action)
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:
messages- messagesinteraction- Llm options and tool callbacks to use, plus unique identifieroutputClass- Class of the output objectagentProcess- Agent process we are running withinaction- Action we are running within if we are running within an action
-
createObject
<O extends Any> O createObject(List<Message> messages, LlmInteraction interaction, Class<O> outputClass, AgentProcess agentProcess, Action action)
Create an output object, in the context of an AgentProcess.
- Parameters:
messages- messages in the conversation so far.interaction- Llm options and tool callbacks to use, plus unique identifieroutputClass- Class of the output objectagentProcess- Agent process we are running withinaction- Action we are running within if we are running within an action
-
-
-
-