-
Notifications
You must be signed in to change notification settings - Fork 17
[WIP] Agent API integration #29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
449ffa3
to
8182fad
Compare
As for known issues: the visualizer for avatars probably won't work in the "minimal" case, due to wrong order of fallbacks, will fix this soon - let's focus on the public APIs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some notes - I think some of the discussion on the web / react pull request also applies here too, and we just need to come to some consistent decisions both implementations can adopt.
VoiceAgent/Agent/AgentSession.swift
Outdated
|
||
@Published private(set) var connectionState: ConnectionState = .disconnected | ||
@Published private(set) var isListening = false | ||
var isReady: Bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Naming note: In the react / web implementation, I called this isAvailable
. We probably should standardize on one name in both implementations - I don't have a strong preference which one though. Are you attached to either one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I changed that in one of the last commits - still pretty confusing with the preconnect thing, I'm also thinking of renaming connectionState
→ roomConnectionState
.
@1egoman thank you for digging into that (again) 😄 IMO the areas of improvement are still the same (not that many of them). Let it serve as our bullet points for the meeting. |
@lukasIO @1egoman recent improvements and notable mentions:
|
@lukasIO re: separate "media/devices hook" - I updated the minimal example above 🫴 MinimalExample()
.environmentObject(DeviceSwitcher(room: room))
.environmentObject(AgentSession(credentials: Sandbox(id: "your-id"), room: room)) The key is both must point to the same The only solution it to make them coupled, so that the |
d8a2e04
to
25ce2cf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a really nice simplification
private static let sandboxId = Bundle.main.object(forInfoDictionaryKey: "LiveKitSandboxId") as! String | ||
@StateObject private var conversation = Conversation(credentials: CachingCredentialsProvider(SandboxTokenServer(id: Self.sandboxId)), | ||
// agentName: ... | ||
room: Room(roomOptions: RoomOptions(defaultScreenShareCaptureOptions: ScreenShareCaptureOptions(useBroadcastExtension: true)))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you should include some notes about alternatives and also update the readme instructions to match the changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep, let's try to merge the pyramid of PRs first, I need to bump sdk+components anyway here 👍
AppViewModel
intoConversation
Conversation
- ready to be consumed by UIChatScrollView
Minimal app example (voice agent)