Interface SpanAttributes.Builder
- All Superinterfaces:
Buildable,CopyableBuilder<SpanAttributes.Builder,,SpanAttributes> SdkBuilder<SpanAttributes.Builder,,SpanAttributes> SdkPojo
- Enclosing class:
SpanAttributes
-
Method Summary
Modifier and TypeMethodDescriptionAmazon Connect agent IDaiAgentArn(String aiAgentArn) AI agent ARNAI agent identifieraiAgentInvoker(String aiAgentInvoker) Entity that invoked the AI agentaiAgentName(String aiAgentName) AI agent nameaiAgentOrchestratorUseCase(String aiAgentOrchestratorUseCase) AI agent orchestrator use caseaiAgentType(String aiAgentType) AI agent typeaiAgentType(AIAgentType aiAgentType) AI agent typeaiAgentVersion(Integer aiAgentVersion) AI agent version numbercacheReadInputTokens(Integer cacheReadInputTokens) Number of input tokens that were retrieved from cachecacheWriteInputTokens(Integer cacheWriteInputTokens) Number of input tokens that were written to cache in this requestAmazon Connect contact identifierError classification if span failed (e.g., throttle, timeout)initialContactId(String initialContactId) Amazon Connect contact identifierinputMessages(Collection<SpanMessage> inputMessages) Input message collection sent to LLMinputMessages(Consumer<SpanMessage.Builder>... inputMessages) Input message collection sent to LLMinputMessages(SpanMessage... inputMessages) Input message collection sent to LLMinstanceArn(String instanceArn) Amazon Connect instance ARNoperationName(String operationName) Action being performedoutputMessages(Collection<SpanMessage> outputMessages) Output message collection received from LLMoutputMessages(Consumer<SpanMessage.Builder>... outputMessages) Output message collection received from LLMoutputMessages(SpanMessage... outputMessages) Output message collection received from LLMAI prompt ARNAI prompt identifierpromptName(String promptName) AI prompt namepromptType(String promptType) AI prompt typepromptType(AIPromptType promptType) AI prompt typepromptVersion(Integer promptVersion) AI prompt version numberproviderName(String providerName) Model provider identifier (e.g., aws.bedrock)requestMaxTokens(Integer requestMaxTokens) Maximum tokens configured for generationrequestModel(String requestModel) LLM model ID for request (e.g., anthropic.claude-3-sonnet)responseFinishReasons(String... responseFinishReasons) Generation termination reasons (e.g., stop, max_tokens)responseFinishReasons(Collection<String> responseFinishReasons) Generation termination reasons (e.g., stop, max_tokens)responseModel(String responseModel) Actual model used for response (usually matches requestModel)sessionName(String sessionName) Session namesystemInstructions(Collection<SpanMessageValue> systemInstructions) System prompt instructionssystemInstructions(Consumer<SpanMessageValue.Builder>... systemInstructions) System prompt instructionssystemInstructions(SpanMessageValue... systemInstructions) System prompt instructionstemperature(Float temperature) Sampling temperature for generationTop-p sampling parameter for generationusageInputTokens(Integer usageInputTokens) Number of input tokens in promptusageOutputTokens(Integer usageOutputTokens) Number of output tokens in responseusageTotalTokens(Integer usageTotalTokens) Total tokens consumed (input + output)Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copyMethods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, buildMethods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFields
-
Method Details
-
operationName
Action being performed
- Parameters:
operationName- Action being performed- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
providerName
Model provider identifier (e.g., aws.bedrock)
- Parameters:
providerName- Model provider identifier (e.g., aws.bedrock)- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
errorType
Error classification if span failed (e.g., throttle, timeout)
- Parameters:
errorType- Error classification if span failed (e.g., throttle, timeout)- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
agentId
Amazon Connect agent ID
- Parameters:
agentId- Amazon Connect agent ID- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
instanceArn
Amazon Connect instance ARN
- Parameters:
instanceArn- Amazon Connect instance ARN- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
contactId
Amazon Connect contact identifier
- Parameters:
contactId- Amazon Connect contact identifier- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
initialContactId
Amazon Connect contact identifier
- Parameters:
initialContactId- Amazon Connect contact identifier- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
sessionName
Session name
- Parameters:
sessionName- Session name- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
aiAgentArn
AI agent ARN
- Parameters:
aiAgentArn- AI agent ARN- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
aiAgentType
AI agent type
- Parameters:
aiAgentType- AI agent type- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
aiAgentType
AI agent type
- Parameters:
aiAgentType- AI agent type- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
aiAgentName
AI agent name
- Parameters:
aiAgentName- AI agent name- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
aiAgentId
AI agent identifier
- Parameters:
aiAgentId- AI agent identifier- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
aiAgentVersion
AI agent version number
- Parameters:
aiAgentVersion- AI agent version number- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
aiAgentInvoker
Entity that invoked the AI agent
- Parameters:
aiAgentInvoker- Entity that invoked the AI agent- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
aiAgentOrchestratorUseCase
AI agent orchestrator use case
- Parameters:
aiAgentOrchestratorUseCase- AI agent orchestrator use case- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
requestModel
LLM model ID for request (e.g., anthropic.claude-3-sonnet)
- Parameters:
requestModel- LLM model ID for request (e.g., anthropic.claude-3-sonnet)- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
requestMaxTokens
Maximum tokens configured for generation
- Parameters:
requestMaxTokens- Maximum tokens configured for generation- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
temperature
Sampling temperature for generation
- Parameters:
temperature- Sampling temperature for generation- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
topP
Top-p sampling parameter for generation
- Parameters:
topP- Top-p sampling parameter for generation- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
responseModel
Actual model used for response (usually matches requestModel)
- Parameters:
responseModel- Actual model used for response (usually matches requestModel)- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
responseFinishReasons
Generation termination reasons (e.g., stop, max_tokens)
- Parameters:
responseFinishReasons- Generation termination reasons (e.g., stop, max_tokens)- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
responseFinishReasons
Generation termination reasons (e.g., stop, max_tokens)
- Parameters:
responseFinishReasons- Generation termination reasons (e.g., stop, max_tokens)- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
usageInputTokens
Number of input tokens in prompt
- Parameters:
usageInputTokens- Number of input tokens in prompt- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
usageOutputTokens
Number of output tokens in response
- Parameters:
usageOutputTokens- Number of output tokens in response- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
usageTotalTokens
Total tokens consumed (input + output)
- Parameters:
usageTotalTokens- Total tokens consumed (input + output)- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
cacheReadInputTokens
Number of input tokens that were retrieved from cache
- Parameters:
cacheReadInputTokens- Number of input tokens that were retrieved from cache- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
cacheWriteInputTokens
Number of input tokens that were written to cache in this request
- Parameters:
cacheWriteInputTokens- Number of input tokens that were written to cache in this request- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
inputMessages
Input message collection sent to LLM
- Parameters:
inputMessages- Input message collection sent to LLM- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
inputMessages
Input message collection sent to LLM
- Parameters:
inputMessages- Input message collection sent to LLM- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
inputMessages
Input message collection sent to LLM
This is a convenience method that creates an instance of theSpanMessage.Builderavoiding the need to create one manually viaSpanMessage.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed toinputMessages(List<SpanMessage>).- Parameters:
inputMessages- a consumer that will call methods onSpanMessage.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
outputMessages
Output message collection received from LLM
- Parameters:
outputMessages- Output message collection received from LLM- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
outputMessages
Output message collection received from LLM
- Parameters:
outputMessages- Output message collection received from LLM- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
outputMessages
Output message collection received from LLM
This is a convenience method that creates an instance of theSpanMessage.Builderavoiding the need to create one manually viaSpanMessage.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tooutputMessages(List<SpanMessage>).- Parameters:
outputMessages- a consumer that will call methods onSpanMessage.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
systemInstructions
System prompt instructions
- Parameters:
systemInstructions- System prompt instructions- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
systemInstructions
System prompt instructions
- Parameters:
systemInstructions- System prompt instructions- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
systemInstructions
System prompt instructions
This is a convenience method that creates an instance of theSpanMessageValue.Builderavoiding the need to create one manually viaSpanMessageValue.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tosystemInstructions(List<SpanMessageValue>).- Parameters:
systemInstructions- a consumer that will call methods onSpanMessageValue.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
promptArn
AI prompt ARN
- Parameters:
promptArn- AI prompt ARN- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
promptId
AI prompt identifier
- Parameters:
promptId- AI prompt identifier- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
promptType
AI prompt type
- Parameters:
promptType- AI prompt type- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
promptType
AI prompt type
- Parameters:
promptType- AI prompt type- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
promptName
AI prompt name
- Parameters:
promptName- AI prompt name- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
promptVersion
AI prompt version number
- Parameters:
promptVersion- AI prompt version number- Returns:
- Returns a reference to this object so that method calls can be chained together.
-