Class ActionRunResult<T>

java.lang.Object
com.google.genkit.core.ActionRunResult<T>
Type Parameters:
T - the type of the result

public class ActionRunResult<T> extends Object
ActionRunResult contains the result of an action execution along with telemetry information.
  • Constructor Details

    • ActionRunResult

      public ActionRunResult(T result, String traceId, String spanId)
      Creates a new ActionRunResult.
      Parameters:
      result - the action result
      traceId - the trace ID for this execution
      spanId - the span ID for this execution
  • Method Details

    • getResult

      public T getResult()
      Returns the action result.
      Returns:
      the result
    • getTraceId

      public String getTraceId()
      Returns the trace ID for this execution.
      Returns:
      the trace ID
    • getSpanId

      public String getSpanId()
      Returns the span ID for this execution.
      Returns:
      the span ID
    • builder

      public static <T> ActionRunResult.Builder<T> builder()
      Creates a builder for ActionRunResult.
      Type Parameters:
      T - the result type
      Returns:
      a new builder