@@ -113,20 +113,20 @@ final class GenerativeModelTests: XCTestCase {
113
113
XCTAssertEqual ( candidate. content. parts. count, 1 )
114
114
XCTAssertEqual ( response. text, " Some information cited from an external source " )
115
115
let citationMetadata = try XCTUnwrap ( candidate. citationMetadata)
116
- XCTAssertEqual ( citationMetadata. citationSources . count, 3 )
117
- let citationSource1 = try XCTUnwrap ( citationMetadata. citationSources [ 0 ] )
116
+ XCTAssertEqual ( citationMetadata. citations . count, 3 )
117
+ let citationSource1 = try XCTUnwrap ( citationMetadata. citations [ 0 ] )
118
118
XCTAssertEqual ( citationSource1. uri, " https://www.example.com/some-citation-1 " )
119
119
XCTAssertEqual ( citationSource1. startIndex, 0 )
120
120
XCTAssertEqual ( citationSource1. endIndex, 128 )
121
121
XCTAssertNil ( citationSource1. title)
122
122
XCTAssertNil ( citationSource1. license)
123
- let citationSource2 = try XCTUnwrap ( citationMetadata. citationSources [ 1 ] )
123
+ let citationSource2 = try XCTUnwrap ( citationMetadata. citations [ 1 ] )
124
124
XCTAssertEqual ( citationSource2. title, " some-citation-2 " )
125
125
XCTAssertEqual ( citationSource2. startIndex, 130 )
126
126
XCTAssertEqual ( citationSource2. endIndex, 265 )
127
127
XCTAssertNil ( citationSource2. uri)
128
128
XCTAssertNil ( citationSource2. license)
129
- let citationSource3 = try XCTUnwrap ( citationMetadata. citationSources [ 2 ] )
129
+ let citationSource3 = try XCTUnwrap ( citationMetadata. citations [ 2 ] )
130
130
XCTAssertEqual ( citationSource3. uri, " https://www.example.com/some-citation-3 " )
131
131
XCTAssertEqual ( citationSource3. startIndex, 272 )
132
132
XCTAssertEqual ( citationSource3. endIndex, 431 )
@@ -947,7 +947,7 @@ final class GenerativeModelTests: XCTestCase {
947
947
responses. append ( content)
948
948
XCTAssertNotNil ( content. text)
949
949
let candidate = try XCTUnwrap ( content. candidates. first)
950
- if let sources = candidate. citationMetadata? . citationSources {
950
+ if let sources = candidate. citationMetadata? . citations {
951
951
citations. append ( contentsOf: sources)
952
952
}
953
953
}
0 commit comments