Skip to contents

has_reasoning() checks whether a signature's output has a field named reasoning_field, as added by with_reasoning().

Usage

has_reasoning(sig, reasoning_field = "reasoning")

Arguments

sig

A signature from signature().

reasoning_field

Name of the field to look for.

Value

TRUE or FALSE. Anything other than a signature gives FALSE.

Examples

sig <- signature("question -> answer")
has_reasoning(sig)
#> [1] FALSE
has_reasoning(with_reasoning(sig))
#> [1] TRUE