From dc006631a87b0cd3300ffd7b6e1c0a1703483087 Mon Sep 17 00:00:00 2001 From: Andrew Heard Date: Mon, 29 Apr 2024 18:03:35 -0400 Subject: [PATCH] Add default `nil` value for `requiredParameters` in `FunctionDeclaration` (#153) --- Sources/GoogleAI/FunctionCalling.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/GoogleAI/FunctionCalling.swift b/Sources/GoogleAI/FunctionCalling.swift index 17c9611..57130eb 100644 --- a/Sources/GoogleAI/FunctionCalling.swift +++ b/Sources/GoogleAI/FunctionCalling.swift @@ -142,7 +142,7 @@ public struct FunctionDeclaration { /// the values are ``Schema`` objects describing them. /// - requiredParameters: A list of required parameters by name. public init(name: String, description: String, parameters: [String: Schema]?, - requiredParameters: [String]?) { + requiredParameters: [String]? = nil) { self.name = name self.description = description self.parameters = Schema(