@@ -29,9 +29,6 @@ public struct FunctionDeclaration: Sendable {
29
29
/// Describes the parameters to this function; must be of type `DataType.object`.
30
30
let parameters : Schema ?
31
31
32
- // TODO: remove (added for testing)
33
- let behavior : FunctionBehavior ?
34
-
35
32
/// Constructs a new `FunctionDeclaration`.
36
33
///
37
34
/// - Parameters:
@@ -43,21 +40,8 @@ public struct FunctionDeclaration: Sendable {
43
40
/// calls; by default, all parameters are considered required.
44
41
public init ( name: String , description: String , parameters: [ String : Schema ] ,
45
42
optionalParameters: [ String ] = [ ] ) {
46
- self . init (
47
- name: name,
48
- description: description,
49
- parameters: parameters,
50
- optionalParameters: optionalParameters,
51
- functionBehavior: nil
52
- )
53
- }
54
-
55
- // TODO: remove (added for testing)
56
- public init ( name: String , description: String , parameters: [ String : Schema ] ,
57
- optionalParameters: [ String ] = [ ] , functionBehavior: FunctionBehavior ? = nil ) {
58
43
self . name = name
59
44
self . description = description
60
- behavior = functionBehavior
61
45
self . parameters = Schema . object (
62
46
properties: parameters,
63
47
optionalProperties: optionalParameters,
@@ -66,12 +50,6 @@ public struct FunctionDeclaration: Sendable {
66
50
}
67
51
}
68
52
69
- // TODO: remove (added for testing)
70
- public enum FunctionBehavior : String , Sendable , Encodable {
71
- case blocking = " BLOCKING "
72
- case nonBlocking = " NON_BLOCKING "
73
- }
74
-
75
53
/// A tool that allows the generative model to connect to Google Search to access and incorporate
76
54
/// up-to-date information from the web into its responses.
77
55
///
@@ -237,15 +215,13 @@ extension FunctionDeclaration: Encodable {
237
215
case name
238
216
case description
239
217
case parameters
240
- case behavior // TODO: remove (added for testing)
241
218
}
242
219
243
220
public func encode( to encoder: Encoder ) throws {
244
221
var container = encoder. container ( keyedBy: CodingKeys . self)
245
222
try container. encode ( name, forKey: . name)
246
223
try container. encode ( description, forKey: . description)
247
224
try container. encode ( parameters, forKey: . parameters)
248
- try container. encode ( behavior, forKey: . behavior) // TODO: remove (added for testing)
249
225
}
250
226
}
251
227
0 commit comments