-
Notifications
You must be signed in to change notification settings - Fork 2
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
Rename rtvi-client-android to pipecat-client-android #7
Merged
Merged
Changes from 2 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
9905233
Rename rtvi-client-android to pipecat-client-android
marcus-daily 579b570
Fixes
marcus-daily 78a0aec
Renaming PipecatClient back to RTVIClient
marcus-daily ea531c7
Make baseUrl and connect endpoint nullable
marcus-daily 6a46cf7
Logo header
marcus-daily File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,37 @@ | ||
package ai.rtvi.client | ||
|
||
import ai.rtvi.client.helper.RTVIClientHelper | ||
import ai.rtvi.client.helper.RegisteredRTVIClient | ||
import ai.rtvi.client.result.Future | ||
import ai.rtvi.client.result.Promise | ||
import ai.rtvi.client.result.RTVIError | ||
import ai.rtvi.client.result.RTVIException | ||
import ai.rtvi.client.result.Result | ||
import ai.rtvi.client.result.resolvedPromiseErr | ||
import ai.rtvi.client.result.withPromise | ||
import ai.rtvi.client.result.withTimeout | ||
import ai.rtvi.client.transport.AuthBundle | ||
import ai.rtvi.client.transport.MsgClientToServer | ||
import ai.rtvi.client.transport.MsgServerToClient | ||
import ai.rtvi.client.transport.Transport | ||
import ai.rtvi.client.transport.TransportContext | ||
import ai.rtvi.client.transport.TransportFactory | ||
import ai.rtvi.client.types.ActionDescription | ||
import ai.rtvi.client.types.Config | ||
import ai.rtvi.client.types.MediaDeviceId | ||
import ai.rtvi.client.types.Option | ||
import ai.rtvi.client.types.RegisteredHelper | ||
import ai.rtvi.client.types.ServiceConfig | ||
import ai.rtvi.client.types.ServiceConfigDescription | ||
import ai.rtvi.client.types.Transcript | ||
import ai.rtvi.client.types.TransportState | ||
import ai.rtvi.client.types.Value | ||
import ai.rtvi.client.utils.ConnectionBundle | ||
import ai.rtvi.client.utils.JSON_INSTANCE | ||
import ai.rtvi.client.utils.ThreadRef | ||
import ai.rtvi.client.utils.parseServerSentEvents | ||
import ai.rtvi.client.utils.post | ||
import ai.rtvi.client.utils.valueFrom | ||
package ai.pipecat.client | ||
|
||
import ai.pipecat.client.helper.RTVIClientHelper | ||
import ai.pipecat.client.helper.RegisteredPipecatClient | ||
import ai.pipecat.client.result.Future | ||
import ai.pipecat.client.result.Promise | ||
import ai.pipecat.client.result.RTVIError | ||
import ai.pipecat.client.result.RTVIException | ||
import ai.pipecat.client.result.Result | ||
import ai.pipecat.client.result.resolvedPromiseErr | ||
import ai.pipecat.client.result.withPromise | ||
import ai.pipecat.client.result.withTimeout | ||
import ai.pipecat.client.transport.AuthBundle | ||
import ai.pipecat.client.transport.MsgClientToServer | ||
import ai.pipecat.client.transport.MsgServerToClient | ||
import ai.pipecat.client.transport.Transport | ||
import ai.pipecat.client.transport.TransportContext | ||
import ai.pipecat.client.transport.TransportFactory | ||
import ai.pipecat.client.types.ActionDescription | ||
import ai.pipecat.client.types.Config | ||
import ai.pipecat.client.types.MediaDeviceId | ||
import ai.pipecat.client.types.Option | ||
import ai.pipecat.client.types.RegisteredHelper | ||
import ai.pipecat.client.types.ServiceConfig | ||
import ai.pipecat.client.types.ServiceConfigDescription | ||
import ai.pipecat.client.types.Transcript | ||
import ai.pipecat.client.types.TransportState | ||
import ai.pipecat.client.types.Value | ||
import ai.pipecat.client.utils.ConnectionBundle | ||
import ai.pipecat.client.utils.JSON_INSTANCE | ||
import ai.pipecat.client.utils.ThreadRef | ||
import ai.pipecat.client.utils.parseServerSentEvents | ||
import ai.pipecat.client.utils.post | ||
import ai.pipecat.client.utils.valueFrom | ||
import android.util.Log | ||
import kotlinx.serialization.json.JsonElement | ||
import kotlinx.serialization.json.JsonPrimitive | ||
|
@@ -40,7 +40,7 @@ import kotlinx.serialization.json.jsonObject | |
import okhttp3.MediaType.Companion.toMediaType | ||
import okhttp3.RequestBody.Companion.toRequestBody | ||
|
||
private const val RTVI_PROTOCOL_VERSION = "0.2.0" | ||
private const val RTVI_PROTOCOL_VERSION = "0.3.0" | ||
|
||
/** | ||
* An RTVI client. Connects to an RTVI backend and handles bidirectional audio and video | ||
|
@@ -53,7 +53,7 @@ private const val RTVI_PROTOCOL_VERSION = "0.2.0" | |
* @param options Additional options for configuring the client and backend. | ||
*/ | ||
@Suppress("unused") | ||
open class RTVIClient( | ||
open class PipecatClient( | ||
transport: TransportFactory, | ||
callbacks: RTVIEventCallbacks, | ||
private var options: RTVIClientOptions, | ||
|
@@ -101,12 +101,12 @@ open class RTVIClient( | |
private val transportCtx = object : TransportContext { | ||
|
||
override val options | ||
get() = this@RTVIClient.options | ||
get() = this@PipecatClient.options | ||
|
||
override val callbacks | ||
get() = this@RTVIClient.callbacks | ||
get() = this@PipecatClient.callbacks | ||
|
||
override val thread = this@RTVIClient.thread | ||
override val thread = this@PipecatClient.thread | ||
|
||
override fun onMessage(msg: MsgServerToClient) = thread.runOnThread { | ||
|
||
|
@@ -117,7 +117,7 @@ open class RTVIClient( | |
val data = | ||
JSON_INSTANCE.decodeFromJsonElement<MsgServerToClient.Data.BotReady>(msg.data) | ||
|
||
this@RTVIClient.transport.setState(TransportState.Ready) | ||
this@PipecatClient.transport.setState(TransportState.Ready) | ||
|
||
connection?.ready?.resolveOk(Unit) | ||
|
||
|
@@ -345,7 +345,7 @@ open class RTVIClient( | |
throw RTVIException(RTVIError.OtherError("Helper targeting service '$service' already registered")) | ||
} | ||
|
||
helper.registerVoiceClient(RegisteredRTVIClient(this, service)) | ||
helper.registerVoiceClient(RegisteredPipecatClient(this, service)) | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same for this one. |
||
val entry = RegisteredHelper( | ||
helper = helper, | ||
|
8 changes: 4 additions & 4 deletions
8
.../java/ai/rtvi/client/RTVIClientOptions.kt → ...va/ai/pipecat/client/RTVIClientOptions.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
...n/java/ai/rtvi/client/RTVIClientParams.kt → ...ava/ai/pipecat/client/RTVIClientParams.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 10 additions & 10 deletions
20
...java/ai/rtvi/client/RTVIEventCallbacks.kt → ...a/ai/pipecat/client/RTVIEventCallbacks.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...main/java/ai/rtvi/client/helper/Legacy.kt → ...n/java/ai/pipecat/client/helper/Legacy.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
package ai.rtvi.client.helper | ||
package ai.pipecat.client.helper | ||
|
||
@Deprecated("VoiceClientHelper renamed to RTVIClientHelper") | ||
typealias VoiceClientHelper = RTVIClientHelper | ||
|
||
@Deprecated("RegisteredVoiceClient renamed to RegisteredRTVIClient") | ||
typealias RegisteredVoiceClient = RegisteredRTVIClient | ||
typealias RegisteredVoiceClient = RegisteredPipecatClient |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I believe we are keeping
RTVIClient
in other platforms.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 made the changes before seeing Mark's comment in the Slack thread. Will change this back tomorrow morning.