Class FunctionResultMetadata


  • public class FunctionResultMetadata
    extends Object
    Metadata about the result of a function invocation.

    This class is used to return metadata about the result of a function invocation.

    • Constructor Detail

      • FunctionResultMetadata

        public FunctionResultMetadata()
        Create a new instance of FunctionResultMetadata.
      • FunctionResultMetadata

        public FunctionResultMetadata​(CaseInsensitiveMap<ContextVariable<?>> metadata)
        Create a new instance of FunctionResultMetadata.
        Parameters:
        metadata - Metadata about the result of the function invocation.
    • Method Detail

      • build

        public static FunctionResultMetadata build​(String id,
                                                   @Nullable
                                                   com.azure.ai.openai.models.CompletionsUsage usage,
                                                   @Nullable
                                                   OffsetDateTime createdAt)
        Create a new instance of FunctionResultMetadata.
        Parameters:
        id - The id of the result of the function invocation.
        usage - The usage of the result of the function invocation.
        createdAt - The time the result was created.
        Returns:
        A new instance of FunctionResultMetadata.
      • empty

        public static FunctionResultMetadata empty()
        Create a new instance of FunctionResultMetadata with no metadata.
        Returns:
        A new instance of FunctionResultMetadata.
      • getMetadata

        public CaseInsensitiveMap<ContextVariable<?>> getMetadata()
        Get the metadata about the result of the function invocation.
        Returns:
        The metadata about the result of the function invocation.
      • getId

        @Nullable
        public String getId()
        Get the id of the result of the function invocation.
        Returns:
        The id of the result of the function invocation.
      • getUsage

        @Nullable
        public com.azure.ai.openai.models.CompletionsUsage getUsage()
        Get the usage of the result of the function invocation.
        Returns:
        The usage of the result of the function invocation.
      • getCreatedAt

        @Nullable
        public OffsetDateTime getCreatedAt()
        Get the time the result was created.
        Returns:
        The time the result was created.