Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import RealtimeAPI

struct ContentView: View {
@State private var newMessage: String = ""
@State private var conversation = try! Conversation()
@State private var conversation = Conversation()

var messages: [Item.Message] {
conversation.entries.compactMap { switch $0 {
Expand Down Expand Up @@ -84,7 +84,7 @@ struct ContentView: View {
}
.navigationTitle("Chat")
.navigationBarTitleDisplayMode(.inline)
.task { try! await conversation..connect(ephemeralKey: YOUR_EPHEMERAL_KEY_HERE) }
.task { try! await conversation.connect(ephemeralKey: YOUR_EPHEMERAL_KEY_HERE) }
}

func sendMessage() {
Expand All @@ -105,11 +105,11 @@ import SwiftUI
import RealtimeAPI

struct ContentView: View {
@State private var conversation = try! Conversation()
@State private var conversation = Conversation()

var body: some View {
Text("Say something!")
.task { try! await conversation..connect(ephemeralKey: YOUR_EPHEMERAL_KEY_HERE) }
.task { try! await conversation.connect(ephemeralKey: YOUR_EPHEMERAL_KEY_HERE) }
}
}
```
Expand Down