Class AgentInvocationContextBuilderImpl
java.lang.Object
com.flowable.agent.engine.impl.cmd.AbstractNeedsAgentDefinitionCmd
com.flowable.agent.engine.impl.cmd.AbstractNeedsKnowledgeBaseDefinitionCmd
com.flowable.agent.engine.impl.runtime.invocation.AgentInvocationContextBuilderImpl
- All Implemented Interfaces:
AgentInvocationContextBuilder
public class AgentInvocationContextBuilderImpl
extends AbstractNeedsKnowledgeBaseDefinitionCmd
implements AgentInvocationContextBuilder
- Author:
- Filip Hrisafov
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static final recordprotected static final record -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AgentDefinitionprotected AgentDefinitionModelprotected final AgentEngineConfigurationprotected AgentInstanceprotected Stringprotected final org.flowable.common.engine.impl.interceptor.CommandContextprotected Stringprotected Stringprotected booleanprotected org.apache.tika.config.TikaConfigstatic final Stringstatic final Stringprotected Stringprotected Collection<String> protected String -
Constructor Summary
ConstructorsConstructorDescriptionAgentInvocationContextBuilderImpl(AgentEngineConfiguration agentEngineConfiguration, org.flowable.common.engine.impl.interceptor.CommandContext commandContext) -
Method Summary
Modifier and TypeMethodDescriptionagentDefinition(AgentDefinition agentDefinition) The agent definition to be used.agentDefinitionModel(AgentDefinitionModel agentDefinitionModel) The agent definition model to be used.agentInstance(AgentInstance agentInstance) agentInvocationId(String agentInvocationId) create()protected AgentInvocationContextcreate(boolean nonTransactional) createOperationInfoData(String agentType, AgentDefinitionModel agentDefinitionModel, String parentDeploymentId, String tenantId) protected ContentToImageConverterdetermineContentToImageConverter(AgentDefinitionModel agentDefinitionModel, org.flowable.content.api.ContentItem contentItem) protected ContentToMarkdownConverterdetermineContentToMarkdownConverter(AgentDefinitionModel agentDefinitionModel, org.flowable.content.api.ContentItem contentItem) protected CoreContentEngineConfigurationApigetEnabledContentToImageMimetypes(AgentDefinitionModel agentDefinitionModel) getEnabledContentToMarkdownMimetypes(AgentDefinitionModel agentDefinitionModel) protected org.flowable.form.api.FormEngineConfigurationApiprotected AgentInvocationEntitygetOrCreateAgentInvocationEntity(AgentInstance agentInstance, String operationKey, String userMessage, String systemMessage, String outputSchema) protected org.apache.tika.config.TikaConfigoperationKey(String operationKey) Add a parameter for expression evaluation.parameters(Map<String, Object> parameters) Add parameters for expression evaluation.protected AgentDefinitionModelresolveDocumentAssistantOperationInfo(AgentDefinitionModel agentDefinitionModel, String parentDeploymentId, String tenantId) resolveEventCompletionData(AgentDefinitionModel agentDefinitionModel, org.flowable.common.engine.api.variable.VariableContainer variableContainer) protected KnowledgeBaseDefinitionresolveKnowledgeBaseDefinition(AgentDefinitionModel agentDefinitionModel) resolveOrchestratorAgentOperationInfo(AgentDefinitionModel agentDefinitionModel) protected StringresolveOutputSchema(AgentDefinitionModel.AgentOperation operation, AgentDefinitionModel agentDefinitionModel) protected StringuserExchangePartType(String userExchangePartType) userGroupKeys(Collection<String> userGroupKeys) protected voidvalidateFields(boolean nonTransactional) Methods inherited from class com.flowable.agent.engine.impl.cmd.AbstractNeedsKnowledgeBaseDefinitionCmd
resolveKnowledgeBaseDefinition, resolveKnowledgeBaseDefinitionMethods inherited from class com.flowable.agent.engine.impl.cmd.AbstractNeedsAgentDefinitionCmd
resolveAgentDefinition, resolveAgentDefinitionById, resolveAgentDefinitionByKey
-
Field Details
-
USER_MESSAGE_MEDIA_ATTACHED
- See Also:
-
USER_MESSAGE_MARKDOWN_CONTENT
- See Also:
-
agentEngineConfiguration
-
commandContext
protected final org.flowable.common.engine.impl.interceptor.CommandContext commandContext -
agentDefinition
-
agentDefinitionModel
-
agentInstance
-
agentInvocationId
-
tenantId
-
tenantIdSet
protected boolean tenantIdSet -
operationKey
-
userExchangePartType
-
userId
-
userGroupKeys
-
serviceData
-
tikaConfig
protected org.apache.tika.config.TikaConfig tikaConfig
-
-
Constructor Details
-
AgentInvocationContextBuilderImpl
public AgentInvocationContextBuilderImpl(AgentEngineConfiguration agentEngineConfiguration, org.flowable.common.engine.impl.interceptor.CommandContext commandContext)
-
-
Method Details
-
agentDefinition
Description copied from interface:AgentInvocationContextBuilderThe agent definition to be used. If not provided thenAgentInvocationContextBuilder.agentDefinitionModel(AgentDefinitionModel)must be provided. Not allowed to be used together withAgentInvocationContextBuilder.agentDefinitionModel(AgentDefinitionModel).- Specified by:
agentDefinitionin interfaceAgentInvocationContextBuilder- Parameters:
agentDefinition- the agent definition to use
-
agentDefinitionModel
public AgentInvocationContextBuilder agentDefinitionModel(AgentDefinitionModel agentDefinitionModel) Description copied from interface:AgentInvocationContextBuilderThe agent definition model to be used. Not allowed to be used together withAgentInvocationContextBuilder.agentDefinition(AgentDefinition).- Specified by:
agentDefinitionModelin interfaceAgentInvocationContextBuilder- Parameters:
agentDefinitionModel- the agent definition model to use
-
agentInstance
- Specified by:
agentInstancein interfaceAgentInvocationContextBuilder
-
agentInvocationId
- Specified by:
agentInvocationIdin interfaceAgentInvocationContextBuilder
-
tenantId
- Specified by:
tenantIdin interfaceAgentInvocationContextBuilder
-
operationKey
- Specified by:
operationKeyin interfaceAgentInvocationContextBuilder
-
userExchangePartType
- Specified by:
userExchangePartTypein interfaceAgentInvocationContextBuilder
-
userId
- Specified by:
userIdin interfaceAgentInvocationContextBuilder
-
userGroupKeys
- Specified by:
userGroupKeysin interfaceAgentInvocationContextBuilder
-
parameters
Description copied from interface:AgentInvocationContextBuilderAdd parameters for expression evaluation. E.g., for the user / system messages.- Specified by:
parametersin interfaceAgentInvocationContextBuilder- Parameters:
parameters- the parameters to add
-
parameter
Description copied from interface:AgentInvocationContextBuilderAdd a parameter for expression evaluation. E.g., for the user / system messages.- Specified by:
parameterin interfaceAgentInvocationContextBuilder- Parameters:
name- the name of the parametervalue- the value of the parameter
-
create
- Specified by:
createin interfaceAgentInvocationContextBuilder
-
createNonTransactional
- Specified by:
createNonTransactionalin interfaceAgentInvocationContextBuilder
-
create
-
validateFields
protected void validateFields(boolean nonTransactional) -
resolveAgentDefinitionModel
-
getOrCreateAgentInvocationEntity
protected AgentInvocationEntity getOrCreateAgentInvocationEntity(AgentInstance agentInstance, String operationKey, String userMessage, String systemMessage, String outputSchema) -
createOperationInfoData
protected AgentInvocationContextBuilderImpl.OperationInfoData createOperationInfoData(String agentType, AgentDefinitionModel agentDefinitionModel, String parentDeploymentId, String tenantId) -
resolveOrchestratorAgentOperationInfo
protected AgentInvocationContextBuilderImpl.OperationInfoData resolveOrchestratorAgentOperationInfo(AgentDefinitionModel agentDefinitionModel) -
resolveDocumentAssistantOperationInfo
protected AgentInvocationContextBuilderImpl.OperationInfoData resolveDocumentAssistantOperationInfo(AgentDefinitionModel agentDefinitionModel, String parentDeploymentId, String tenantId) -
determineContentToImageConverter
protected ContentToImageConverter determineContentToImageConverter(AgentDefinitionModel agentDefinitionModel, org.flowable.content.api.ContentItem contentItem) -
getEnabledContentToImageMimetypes
-
determineContentToMarkdownConverter
protected ContentToMarkdownConverter determineContentToMarkdownConverter(AgentDefinitionModel agentDefinitionModel, org.flowable.content.api.ContentItem contentItem) -
getEnabledContentToMarkdownMimetypes
protected Set<String> getEnabledContentToMarkdownMimetypes(AgentDefinitionModel agentDefinitionModel) -
resolveEventCompletionData
protected AgentInvocationContextBuilderImpl.EventCompletionData resolveEventCompletionData(AgentDefinitionModel agentDefinitionModel, org.flowable.common.engine.api.variable.VariableContainer variableContainer) -
resolveKnowledgeBaseDefinition
protected KnowledgeBaseDefinition resolveKnowledgeBaseDefinition(AgentDefinitionModel agentDefinitionModel) -
resolveOutputSchema
protected String resolveOutputSchema(AgentDefinitionModel.AgentOperation operation, AgentDefinitionModel agentDefinitionModel) -
getContentEngineConfiguration
-
getFormEngineConfiguration
protected org.flowable.form.api.FormEngineConfigurationApi getFormEngineConfiguration() -
resolveParentDeploymentId
-
getTikaConfig
protected org.apache.tika.config.TikaConfig getTikaConfig()
-