Package de.ubs.xdm3.wrapper
Class EntityGeneratorWrapper
java.lang.Object
de.ubs.xdm3.wrapper.GeneratorWrapper<EntityGeneratorProcessor>
de.ubs.xdm3.wrapper.EntityGeneratorWrapper
Wrapper class for the EntityGeneratorProcessor.
This class is responsible for managing the entity generation process.
It provides methods to generate entities and interact with a Large Language Model (LLM) for entity generation.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Map<String, AttributeGeneratorProcessor> protected ChatClientServiceFields inherited from class de.ubs.xdm3.wrapper.GeneratorWrapper
parameters, processor, processorFactory -
Constructor Summary
ConstructorsConstructorDescriptionEntityGeneratorWrapper(ProcessorFactory processorFactory, EntityGeneratorProcessor processor, Map<String, Object> parameters) Constructs a new EntityGeneratorWrapper with the specified processor factory, processor, and parameters. -
Method Summary
Modifier and TypeMethodDescriptionbuildEntity(Map<String, AttributeGeneratorProcessor> attributeGenerators) Builds an entity instance using the provided attribute generators.Generates an entity instance.llm()This method calls an LLM (Large Language Model) to generate entity instances.This method calls an LLM (Large Language Model) to generate entity instances.Methods inherited from class de.ubs.xdm3.wrapper.GeneratorWrapper
init
-
Field Details
-
chatClientService
-
attributeGenerators
-
-
Constructor Details
-
EntityGeneratorWrapper
public EntityGeneratorWrapper(ProcessorFactory processorFactory, EntityGeneratorProcessor processor, Map<String, Object> parameters) Constructs a new EntityGeneratorWrapper with the specified processor factory, processor, and parameters.- Parameters:
processorFactory- the processor factory to useprocessor- the entity generator processorparameters- the parameters to set in the processor
-
-
Method Details
-
generateEntity
Generates an entity instance. This function is called multiple times to generate a new entity. The generated value must be returned. The returned value must be an instance of EntityInstance. Use the buildEntity() method to create an instance.- Returns:
- the generated entity instance
-
buildEntity
Builds an entity instance using the provided attribute generators.- Parameters:
attributeGenerators- the attribute generators to use- Returns:
- the built entity instance
-
llm
This method calls an LLM (Large Language Model) to generate entity instances.- Returns:
- the generated entity instance
- See Also:
-
llm
This method calls an LLM (Large Language Model) to generate entity instances. The method uses descriptions of the domain entity and its attributes to guide the LLM. Additional instructions can be provided to this function guide the LLM.- Parameters:
n- the number of entity instances to generate with one LLM call.instructions- Additional instructions added to the prompt to guide the LLM.attributeInstructions- Additional instructions for each attribute to guide the LLM.- Returns:
- the generated entity instances
-