RevelryAI.Stream (RevelryAI v0.2.0)

View Source

Creates a readable stream of information that another process can consume.

Summary

Functions

This is used for endpoints that support returning text as it is generated, rather than waiting for the entire generation output to be ready.

Functions

new(start_fun)

This is used for endpoints that support returning text as it is generated, rather than waiting for the entire generation output to be ready.

Note: We use a buffer to store the response until we have a complete chunk. While RevelryAI usually returns the entire response at once, this is not guaranteed if streaming across a network boundary.