-
Notifications
You must be signed in to change notification settings - Fork 18
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
is text streaming possible ? #45
Comments
No, i can't see any info related to it. Matrix synapse does not provide such callback: https://matrix-org.github.io/synapse/latest/modules/index.html#current-status Besides, this project relies on matrix-nio library, the way to achieve text streaming i guess is edit text message quickly from time to time for which it may reach rate limits or ddos the server. |
thanks. if we find any method will update here in future. |
In the Matrix protocol, there is no support for message streaming over streams, but it is possible to simulate streaming output by editing messages multiple times. This approach introduces a problem: a single message will be associated with a very large number of events, which, based on my tests, can add extra burden to the server (high CPU usage) and may also impose additional loads on the clients. However, a compromise might be feasible: string putUrl = $"{baseUrl}/_matrix/client/v3/rooms/{roomId}/send/m.room.message/{numId}";
JObject putContent = new JObject
{
["msgtype"] = msgType,
["body"] = "* " + message,
["m.new_content"] = new JObject
{
["msgtype"] = msgType,
["body"] = message
},
["m.relates_to"] = new JObject
{
["rel_type"] = "m.replace",
["event_id"] = eventId
}
};
StringContent putData = new StringContent(putContent.ToString(), System.Text.Encoding.UTF8, "application/json");
HttpResponseMessage putResponse = await client.PutAsync(putUrl, putData); |
genius workaround I must say 👌 streaming also got very fast these days so line by line streaming is pretty neat. |
I have tried many traditional communication software solutions that support self-hosting, and I found that, generally, they do not support streaming output. This is the result of my tests, which might provide you with some reference. These software applications can implement streaming output through simulation or plugins:
|
thanks for enlightening us. |
@mwnu how can i reach out to you if we have any questions. you can send me a message on seshu.bonam@gmail.com or dm to @Bonbonz:matrix.org |
I have sent a message to your Matrix account. |
can you send again: https://matrix.to/#/@bonbonz:matrix.org |
hi again!
came across this update from synapse on custom modules: https://archive.fosdem.org/2022/schedule/event/matrix_extend_synapse/
wondering if the bot can stream text like chatgpt does.
The text was updated successfully, but these errors were encountered: