int / float
int / float
Numerical values as denoted more specifically in BAML.
We support implicit casting of int -> float, but if you need something to explicitly be a float, use 0.0 instead of 0.
int / float
Numerical values as denoted more specifically in BAML.
| Value | Description |
|---|---|
int | Integer |
float | Floating point number |
We support implicit casting of int -> float, but if you need something to explicitly be a float, use 0.0 instead of 0.
1 function DescribeCircle(radius: int | float, pi: float?) -> string { 2 client "openai/gpt-5-mini" 3 prompt #" 4 Describe a circle with a radius of {{ radius }} units. 5 Include the area of the circle using pi as {{ pi or 3.14159 }}. 6 7 What are some properties of the circle? 8 "# 9 } 10 11 test CircleDescription { 12 functions [DescribeCircle] 13 // will be cast to int 14 args { radius 5 } 15 } 16 17 test CircleDescription2 { 18 functions [DescribeCircle] 19 // will be cast to float 20 args { 21 radius 5.0 22 pi 3.14 23 } 24 }