@@ -147,9 +147,10 @@ public struct FunctionCallPart: Part {
147
147
148
148
public var isThought : Bool { _isThought ?? false }
149
149
150
- /// Unique id of the function call. If present, the returned ``FunctionResponsePart``
151
- /// should have a matching `id` field.
152
- public var id : String ? { functionCall. id }
150
+ /// Unique id of the function call.
151
+ ///
152
+ /// If present, the returned ``FunctionResponsePart`` should have a matching `functionId` field.
153
+ public var functionId : String ? { functionCall. id }
153
154
154
155
/// Constructs a new function call part.
155
156
///
@@ -196,7 +197,7 @@ public struct FunctionResponsePart: Part {
196
197
let thoughtSignature : String ?
197
198
198
199
/// Matching `id` for a ``FunctionCallPart``, if one was provided.
199
- public var id : String ? { functionResponse. id }
200
+ public var functionId : String ? { functionResponse. id }
200
201
201
202
/// The name of the function that was called.
202
203
public var name : String { functionResponse. name }
@@ -222,10 +223,10 @@ public struct FunctionResponsePart: Part {
222
223
/// - Parameters:
223
224
/// - name: The name of the function that was called.
224
225
/// - response: The function's response.
225
- /// - id : Matching `id ` for a ``FunctionCallPart``, if one was provided.
226
- public init ( name: String , response: JSONObject , id : String ? = nil ) {
226
+ /// - functionId : Matching `functionId ` for a ``FunctionCallPart``, if one was provided.
227
+ public init ( name: String , response: JSONObject , functionId : String ? = nil ) {
227
228
self . init (
228
- FunctionResponse ( name: name, response: response, id: id ) ,
229
+ FunctionResponse ( name: name, response: response, id: functionId ) ,
229
230
isThought: nil ,
230
231
thoughtSignature: nil
231
232
)
0 commit comments