FunctionResultMetadata<UsageType> Class
- java.
lang. Object - com.
microsoft. semantickernel. orchestration. FunctionResultMetadata<UsageType>
- com.
Type Parameters
- UsageType
The result type of the function invocation.
public class FunctionResultMetadata<UsageType>
Metadata about the result of a function invocation.
This class is used to return metadata about the result of a function invocation.
Field Summary
Modifier and Type | Field and Description |
---|---|
static final java.lang.String |
CREATED_AT
The key for created |
static final java.lang.String |
ID
The key for id metadata. |
static final java.lang.String |
USAGE
The key for usage metadata. |
Constructor Summary
Constructor | Description |
---|---|
FunctionResultMetadata() |
Create a new instance of Function |
FunctionResultMetadata(CaseInsensitiveMap<ContextVariable<?>> metadata) |
Create a new instance of Function |
Method Summary
Modifier and Type | Method and Description |
---|---|
static
Function |
build(String id, UsageType usage, OffsetDateTime createdAt)
Create a new instance of Function |
static
Function |
build(String id)
Create a new instance of Function |
static
Function |
empty()
Create a new instance of Function |
java.time.OffsetDateTime |
getCreatedAt()
Get the time the result was created. |
java.lang.String |
getId()
Get the id of the result of the function invocation. |
Case |
getMetadata()
Get the metadata about the result of the function invocation. |
UsageType |
getUsage()
Get the usage of the result of the function invocation. |
Methods inherited from java.lang.Object
Field Details
CREATED_AT
public static final String CREATED_AT
The key for createdAt metadata.
ID
public static final String ID
The key for id metadata.
USAGE
public static final String USAGE
The key for usage metadata.
Constructor Details
FunctionResultMetadata
public FunctionResultMetadata()
Create a new instance of FunctionResultMetadata.
FunctionResultMetadata
public FunctionResultMetadata(CaseInsensitiveMap
Create a new instance of FunctionResultMetadata.
Parameters:
Method Details
build
public static FunctionResultMetadata
Create a new instance of FunctionResultMetadata.
Parameters:
Returns:
build
public static FunctionResultMetadata build(String id)
Create a new instance of FunctionResultMetadata.
Parameters:
Returns:
empty
public static FunctionResultMetadata empty()
Create a new instance of FunctionResultMetadata with no metadata.
Returns:
getCreatedAt
public OffsetDateTime getCreatedAt()
Get the time the result was created.
Returns:
getId
public String getId()
Get the id of the result of the function invocation.
Returns:
getMetadata
public CaseInsensitiveMap
Get the metadata about the result of the function invocation.
Returns:
getUsage
public UsageType getUsage()
Get the usage of the result of the function invocation.
Returns: