Skip to content

Commit 71acb55

Browse files
committed
Revert andrew's prototyping changes
1 parent 0c23c7d commit 71acb55

File tree

1 file changed

+4
-27
lines changed

1 file changed

+4
-27
lines changed

FirebaseAI/Tests/TestApp/Sources/ContentView.swift

Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -12,40 +12,17 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
import FirebaseAI
1615
import SwiftUI
1716

1817
struct ContentView: View {
19-
// TODO: Revert changes in this file. For prototyping purposes only.
20-
let liveModel: LiveGenerativeModel = {
21-
// let firebaseAI = FirebaseAI.firebaseAI(backend: .vertexAI())
22-
let firebaseAI = FirebaseAI.firebaseAI()
23-
return firebaseAI.liveModel(
24-
modelName: "gemini-2.0-flash-live-001",
25-
generationConfig: LiveGenerationConfig(responseModalities: [.text])
26-
)
27-
}()
28-
29-
@State private var responses: [String] = []
30-
3118
var body: some View {
3219
VStack {
33-
List(responses, id: \.self) {
34-
Text($0)
35-
}
20+
Image(systemName: "globe")
21+
.imageScale(.large)
22+
.foregroundStyle(.tint)
23+
Text("Hello, world!")
3624
}
3725
.padding()
38-
.task {
39-
do {
40-
let liveSession = liveModel.connect()
41-
try await liveSession.sendMessage("Why is the sky blue?")
42-
for try await response in liveSession.responses {
43-
responses.append(String(describing: response))
44-
}
45-
} catch {
46-
print(error)
47-
}
48-
}
4926
}
5027
}
5128

0 commit comments

Comments
 (0)