String schema with validation options.
Value parameters
- description
-
Human-readable description shown to the LLM
- enumValues
-
Restricts valid values to this closed set
- maxLength
-
Maximum allowed string length
- minLength
-
Minimum allowed string length
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait SchemaDefinition[String]class Objecttrait Matchableclass AnyShow all
Members list
Value members
Concrete methods
Serialise this schema to a JSON Schema ujson.Value.
Serialise this schema to a JSON Schema ujson.Value.
Value parameters
- strict
-
When
true, all object properties are treated as required, matching OpenAI strict-mode tool definitions.
Attributes
Replace the description shown to the LLM.
Replace the description shown to the LLM.
Attributes
Restrict valid values to the given closed enumeration.
Restrict valid values to the given closed enumeration.
Value parameters
- values
-
Allowed string values
Attributes
Set or clear the closed enumeration; None lifts the restriction. Duplicates are dropped.
Set or clear the closed enumeration; None lifts the restriction. Duplicates are dropped.
Attributes
Add minimum and/or maximum length constraints.
Add minimum and/or maximum length constraints.
Value parameters
- max
-
Optional maximum length (inclusive)
- min
-
Optional minimum length (inclusive)
Attributes
Set the maximum allowed string length (inclusive).
Set the maximum allowed string length (inclusive).
Attributes
Set or clear the maximum allowed string length (inclusive).
Set or clear the maximum allowed string length (inclusive).
Attributes
Set the minimum allowed string length (inclusive).
Set the minimum allowed string length (inclusive).
Attributes
Set or clear the minimum allowed string length (inclusive).
Set or clear the minimum allowed string length (inclusive).
Attributes
Inherited methods
Attributes
- Inherited from:
- Product
Attributes
- Inherited from:
- Product