diff --git a/generativeai/src/main/java/com/google/ai/client/generativeai/type/FunctionDeclarations.kt b/generativeai/src/main/java/com/google/ai/client/generativeai/type/FunctionDeclarations.kt index 21d02b08..b9ede02c 100644 --- a/generativeai/src/main/java/com/google/ai/client/generativeai/type/FunctionDeclarations.kt +++ b/generativeai/src/main/java/com/google/ai/client/generativeai/type/FunctionDeclarations.kt @@ -232,12 +232,17 @@ class Schema( nullable = false, ) - /** Registers a schema for an array */ - fun arr(name: String, description: String) = + /** + * Registers a schema for an array. + * + * @param items can be used to specify the type of the array + */ + fun arr(name: String, description: String, items: Schema? = null) = Schema>( name = name, description = description, type = FunctionType.ARRAY, + items = items, nullable = false, )