Skip to content

Commit 9e6fba2

Browse files
committed
Fix existing tests and samples
1 parent e96ed04 commit 9e6fba2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Examples/GenerativeAISample/FunctionCallingSample/ViewModels/FunctionCallingViewModel.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ class FunctionCallingViewModel: ObservableObject {
157157
case let .functionCall(functionCall):
158158
messages.insert(functionCall.chatMessage(), at: messages.count - 1)
159159
functionCalls.append(functionCall)
160-
case .data, .fileData, .functionResponse:
160+
case .data, .fileData, .functionResponse, .executableCode, .codeExecutionResult:
161161
fatalError("Unsupported response content.")
162162
}
163163
}

Tests/GoogleAITests/GenerativeModelTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ final class GenerativeModelTests: XCTestCase {
285285
let functionCalls = response.functionCalls
286286
XCTAssertEqual(functionCalls.count, 2)
287287
let text = try XCTUnwrap(response.text)
288-
XCTAssertEqual(text, "The sum of [1, 2, 3] is")
288+
XCTAssertEqual(text, "The sum of [1, 2,\n3] is")
289289
}
290290

291291
func testGenerateContent_usageMetadata() async throws {

0 commit comments

Comments
 (0)