Interface SessionState.Builder

    • Method Detail

      • conversationHistory

        SessionState.Builder conversationHistory​(ConversationHistory conversationHistory)

        The state's conversation history.

        Parameters:
        conversationHistory - The state's conversation history.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • files

        SessionState.Builder files​(Collection<InputFile> files)

        Contains information about the files used by code interpreter.

        Parameters:
        files - Contains information about the files used by code interpreter.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • files

        SessionState.Builder files​(InputFile... files)

        Contains information about the files used by code interpreter.

        Parameters:
        files - Contains information about the files used by code interpreter.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • invocationId

        SessionState.Builder invocationId​(String invocationId)

        The identifier of the invocation of an action. This value must match the invocationId returned in the InvokeAgent response for the action whose results are provided in the returnControlInvocationResults field. For more information, see Return control to the agent developer and Control session context.

        Parameters:
        invocationId - The identifier of the invocation of an action. This value must match the invocationId returned in the InvokeAgent response for the action whose results are provided in the returnControlInvocationResults field. For more information, see Return control to the agent developer and Control session context.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • knowledgeBaseConfigurations

        SessionState.Builder knowledgeBaseConfigurations​(Collection<KnowledgeBaseConfiguration> knowledgeBaseConfigurations)

        An array of configurations, each of which applies to a knowledge base attached to the agent.

        Parameters:
        knowledgeBaseConfigurations - An array of configurations, each of which applies to a knowledge base attached to the agent.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • knowledgeBaseConfigurations

        SessionState.Builder knowledgeBaseConfigurations​(KnowledgeBaseConfiguration... knowledgeBaseConfigurations)

        An array of configurations, each of which applies to a knowledge base attached to the agent.

        Parameters:
        knowledgeBaseConfigurations - An array of configurations, each of which applies to a knowledge base attached to the agent.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • promptSessionAttributes

        SessionState.Builder promptSessionAttributes​(Map<String,​String> promptSessionAttributes)

        Contains attributes that persist across a prompt and the values of those attributes.

        • In orchestration prompt template, these attributes replace the $prompt_session_attributes$ placeholder variable. For more information, see Prompt template placeholder variables.

        • In multi-agent collaboration, the promptSessionAttributes will only be used by supervisor agent when $prompt_session_attributes$ is present in prompt template.

        Parameters:
        promptSessionAttributes - Contains attributes that persist across a prompt and the values of those attributes.

        • In orchestration prompt template, these attributes replace the $prompt_session_attributes$ placeholder variable. For more information, see Prompt template placeholder variables.

        • In multi-agent collaboration, the promptSessionAttributes will only be used by supervisor agent when $prompt_session_attributes$ is present in prompt template.

        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • sessionAttributes

        SessionState.Builder sessionAttributes​(Map<String,​String> sessionAttributes)

        Contains attributes that persist across a session and the values of those attributes. If sessionAttributes are passed to a supervisor agent in multi-agent collaboration, it will be forwarded to all agent collaborators.

        Parameters:
        sessionAttributes - Contains attributes that persist across a session and the values of those attributes. If sessionAttributes are passed to a supervisor agent in multi-agent collaboration, it will be forwarded to all agent collaborators.
        Returns:
        Returns a reference to this object so that method calls can be chained together.