Package io.camunda.client.impl.command
Class CreateAgentHistoryItemCommandImpl
java.lang.Object
io.camunda.client.impl.command.CreateAgentHistoryItemCommandImpl
- All Implemented Interfaces:
CreateAgentHistoryItemCommandStep1,CreateAgentHistoryItemCommandStep1.CreateAgentHistoryItemCommandStep2,CreateAgentHistoryItemCommandStep1.CreateAgentHistoryItemCommandStep3,CreateAgentHistoryItemCommandStep1.CreateAgentHistoryItemCommandStep4,CreateAgentHistoryItemCommandStep1.CreateAgentHistoryItemCommandStep5,CreateAgentHistoryItemCommandStep1.CreateAgentHistoryItemFinalCommandStep,FinalCommandStep<CreateAgentHistoryItemResponse>
public class CreateAgentHistoryItemCommandImpl
extends Object
implements CreateAgentHistoryItemCommandStep1, CreateAgentHistoryItemCommandStep1.CreateAgentHistoryItemCommandStep2, CreateAgentHistoryItemCommandStep1.CreateAgentHistoryItemCommandStep3, CreateAgentHistoryItemCommandStep1.CreateAgentHistoryItemCommandStep4, CreateAgentHistoryItemCommandStep1.CreateAgentHistoryItemCommandStep5, CreateAgentHistoryItemCommandStep1.CreateAgentHistoryItemFinalCommandStep
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.camunda.client.api.command.CreateAgentHistoryItemCommandStep1
CreateAgentHistoryItemCommandStep1.CreateAgentHistoryItemCommandStep2, CreateAgentHistoryItemCommandStep1.CreateAgentHistoryItemCommandStep3, CreateAgentHistoryItemCommandStep1.CreateAgentHistoryItemCommandStep4, CreateAgentHistoryItemCommandStep1.CreateAgentHistoryItemCommandStep5, CreateAgentHistoryItemCommandStep1.CreateAgentHistoryItemFinalCommandStep -
Constructor Summary
ConstructorsConstructorDescriptionCreateAgentHistoryItemCommandImpl(HttpClient httpClient, JsonMapper jsonMapper, long agentInstanceKey) -
Method Summary
Modifier and TypeMethodDescriptioncontent(List<AgentInstanceHistoryContent> content) Sets the content blocks of this history item.elementInstanceKey(long elementInstanceKey) Sets the element instance key of the element instance this history item belongs to.jobKey(long jobKey) Sets the job key of the currently active job during which this item was produced.Sets the opaque job lease token received from the job activation response.loopIteration(int loopIteration) Sets the sequential loopIteration number this item belongs to.metrics(AgentInstanceHistoryMetrics metrics) Sets per-call token and latency metrics.producedAt(OffsetDateTime producedAt) Sets the connector-side timestamp when this message was produced.requestTimeout(Duration requestTimeout) Sets the request timeout for the command.role(AgentInstanceHistoryRole role) Sets the role of this history item in the conversation.send()Sends the command to the Camunda gateway.toolCalls(List<AgentInstanceHistoryToolCall> toolCalls) Sets the tool calls associated with this history item.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.camunda.client.api.command.FinalCommandStep
execute
-
Constructor Details
-
CreateAgentHistoryItemCommandImpl
public CreateAgentHistoryItemCommandImpl(HttpClient httpClient, JsonMapper jsonMapper, long agentInstanceKey)
-
-
Method Details
-
elementInstanceKey
public CreateAgentHistoryItemCommandStep1.CreateAgentHistoryItemCommandStep2 elementInstanceKey(long elementInstanceKey) Description copied from interface:CreateAgentHistoryItemCommandStep1Sets the element instance key of the element instance this history item belongs to.- Specified by:
elementInstanceKeyin interfaceCreateAgentHistoryItemCommandStep1- Parameters:
elementInstanceKey- the key of the element instance. Must be greater than 0.- Returns:
- this builder for method chaining
-
jobKey
Description copied from interface:CreateAgentHistoryItemCommandStep1.CreateAgentHistoryItemCommandStep2Sets the job key of the currently active job during which this item was produced.- Specified by:
jobKeyin interfaceCreateAgentHistoryItemCommandStep1.CreateAgentHistoryItemCommandStep2- Parameters:
jobKey- the key of the active job. Must be greater than 0.- Returns:
- this builder for method chaining
-
role
public CreateAgentHistoryItemCommandStep1.CreateAgentHistoryItemCommandStep4 role(AgentInstanceHistoryRole role) Description copied from interface:CreateAgentHistoryItemCommandStep1.CreateAgentHistoryItemCommandStep3Sets the role of this history item in the conversation.- Specified by:
rolein interfaceCreateAgentHistoryItemCommandStep1.CreateAgentHistoryItemCommandStep3- Parameters:
role- the conversation role. Must not be null.- Returns:
- this builder for method chaining
-
content
public CreateAgentHistoryItemCommandStep1.CreateAgentHistoryItemCommandStep5 content(List<AgentInstanceHistoryContent> content) Description copied from interface:CreateAgentHistoryItemCommandStep1.CreateAgentHistoryItemCommandStep4Sets the content blocks of this history item.- Specified by:
contentin interfaceCreateAgentHistoryItemCommandStep1.CreateAgentHistoryItemCommandStep4- Parameters:
content- the list of content blocks. Must not be null; may be empty.- Returns:
- this builder for method chaining
-
producedAt
public CreateAgentHistoryItemCommandStep1.CreateAgentHistoryItemFinalCommandStep producedAt(OffsetDateTime producedAt) Description copied from interface:CreateAgentHistoryItemCommandStep1.CreateAgentHistoryItemCommandStep5Sets the connector-side timestamp when this message was produced.- Specified by:
producedAtin interfaceCreateAgentHistoryItemCommandStep1.CreateAgentHistoryItemCommandStep5- Parameters:
producedAt- the production timestamp. Must not be null.- Returns:
- this builder for method chaining
-
jobLease
public CreateAgentHistoryItemCommandStep1.CreateAgentHistoryItemFinalCommandStep jobLease(String jobLease) Description copied from interface:CreateAgentHistoryItemCommandStep1.CreateAgentHistoryItemFinalCommandStepSets the opaque job lease token received from the job activation response.Job leasing is not yet enforced (#55033); this field is optional until support is added.
- Specified by:
jobLeasein interfaceCreateAgentHistoryItemCommandStep1.CreateAgentHistoryItemFinalCommandStep- Parameters:
jobLease- the lease token. Must not be null or empty.- Returns:
- this builder for method chaining
-
loopIteration
public CreateAgentHistoryItemCommandStep1.CreateAgentHistoryItemFinalCommandStep loopIteration(int loopIteration) Description copied from interface:CreateAgentHistoryItemCommandStep1.CreateAgentHistoryItemFinalCommandStepSets the sequential loopIteration number this item belongs to.- Specified by:
loopIterationin interfaceCreateAgentHistoryItemCommandStep1.CreateAgentHistoryItemFinalCommandStep- Parameters:
loopIteration- the loopIteration number.- Returns:
- this builder for method chaining
-
toolCalls
public CreateAgentHistoryItemCommandStep1.CreateAgentHistoryItemFinalCommandStep toolCalls(List<AgentInstanceHistoryToolCall> toolCalls) Description copied from interface:CreateAgentHistoryItemCommandStep1.CreateAgentHistoryItemFinalCommandStepSets the tool calls associated with this history item.- Specified by:
toolCallsin interfaceCreateAgentHistoryItemCommandStep1.CreateAgentHistoryItemFinalCommandStep- Parameters:
toolCalls- the list of tool calls. May be null.- Returns:
- this builder for method chaining
-
metrics
public CreateAgentHistoryItemCommandStep1.CreateAgentHistoryItemFinalCommandStep metrics(AgentInstanceHistoryMetrics metrics) Description copied from interface:CreateAgentHistoryItemCommandStep1.CreateAgentHistoryItemFinalCommandStepSets per-call token and latency metrics. Present on ASSISTANT items only.- Specified by:
metricsin interfaceCreateAgentHistoryItemCommandStep1.CreateAgentHistoryItemFinalCommandStep- Parameters:
metrics- the metrics. May be null.- Returns:
- this builder for method chaining
-
requestTimeout
public CreateAgentHistoryItemCommandStep1.CreateAgentHistoryItemFinalCommandStep requestTimeout(Duration requestTimeout) Description copied from interface:FinalCommandStepSets the request timeout for the command. The default request timeout can be configured usingCamundaClientBuilder.defaultRequestTimeout(Duration).- Specified by:
requestTimeoutin interfaceFinalCommandStep<CreateAgentHistoryItemResponse>- Parameters:
requestTimeout- the request timeout- Returns:
- the configured command
-
send
Description copied from interface:FinalCommandStepSends the command to the Camunda gateway. This operation is asynchronous. In case of success, the future returns the event that was generated by the Camunda gateway in response to the command.Call
CamundaFuture.join()to wait until the response is available.Future<JobEventinvalid input: '>' future = command.send(); JobEvent event = future.join();- Specified by:
sendin interfaceFinalCommandStep<CreateAgentHistoryItemResponse>- Returns:
- a future tracking state of success/failure of the command.
-